Skip to content

Commit 3afbcfd

Browse files
committed
Update README.md
1 parent 81047fa commit 3afbcfd

File tree

1 file changed

+46
-85
lines changed

1 file changed

+46
-85
lines changed

README.md

Lines changed: 46 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -6,117 +6,78 @@
66
[![Build Sphinx](https://github.com/IntelPython/dpnp/workflows/Build%20Sphinx/badge.svg)](https://intelpython.github.io/dpnp)
77
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/dpnp/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/dpnp)
88

9+
<img align="left" src="https://spec.oneapi.io/oneapi-logo-white-scaled.jpg" alt="oneAPI logo" width="75"/>
10+
911
# DPNP - Data Parallel Extension for NumPy*
12+
13+
Data Parallel Extension for NumPy* or `dpnp` is a Python library that
14+
implements a subset of NumPy* that can be executed on any data parallel device.
15+
The subset is a drop-in replacement of core NumPy* functions and numerical data types.
16+
1017
[API coverage summary](https://intelpython.github.io/dpnp/reference/comparison.html#summary)
1118

1219
[Full documentation](https://intelpython.github.io/dpnp/)
1320

14-
[DPNP C++ backend documentation](https://intelpython.github.io/dpnp/backend_doc/)
21+
`Dpnp` is the core part of a larger family of [data-parallel Python libraries and tools](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
22+
to program on XPUs.
1523

16-
## Build from source:
17-
Ensure you have the following prerequisite packages installed:
1824

19-
- `cython`
20-
- `cmake >=3.21`
21-
- `dpcpp_linux-64` or `dpcpp_win-64` (depending on your OS)
22-
- `dpctl`
23-
- `mkl-devel-dpcpp`
24-
- `onedpl-devel`
25-
- `ninja`
26-
- `numpy >=1.19,<1.25a0`
27-
- `python`
28-
- `scikit-build`
29-
- `setuptools`
30-
- `sysroot_linux-64 >=2.28` (only on Linux OS)
31-
- `tbb-devel`
25+
# Installing
3226

33-
After these steps, `dpnp` can be built in debug mode as follows:
27+
You can install the library using `conda` or [pip](https://pypi.org/project/dpnp/)
28+
package managers. It is also available as part of the [Intel(R) Distribution for Python](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
29+
(IDP).
3430

35-
```bash
36-
git clone https://github.com/IntelPython/dpnp
37-
cd dpnp
38-
python scripts/build_locally.py
39-
```
31+
## Intel(R) oneAPI
4032

41-
## Install Wheel Package via pip
42-
Install DPNP
43-
```cmd
44-
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpnp
45-
```
33+
You can find the most recent release of `dpnp` every quarter as part of the Intel(R) oneAPI releases.
4634

47-
Set path to Performance Libraries in case of using venv or system Python:
48-
```cmd
49-
export LD_LIBRARY_PATH=<path_to_your_env>/lib
50-
```
35+
To get the library from the latest oneAPI release, follow the
36+
instructions from Intel(R) [oneAPI installation guide](https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html).
5137

52-
It is also required to set following environment variables:
53-
```cmd
54-
export OCL_ICD_FILENAMES_RESET=1
55-
export OCL_ICD_FILENAMES=libintelocl.so
56-
```
38+
> **NOTE:** You need to install the Intel(R) oneAPI AI Analytics Toolkit to get
39+
>IDP and `dpnp`.
5740
58-
## Run test
59-
```bash
60-
pytest
61-
# or
62-
pytest tests/test_matmul.py -s -v
63-
# or
64-
python -m unittest tests/test_mixins.py
65-
```
41+
## Conda
42+
43+
To install `dpnp` from the Intel(R) conda channel, use the following command:
6644

67-
## Run numpy external test
6845
```bash
69-
. ./0.env.sh
70-
python -m tests.third_party.numpy_ext
71-
# or
72-
python -m tests.third_party.numpy_ext core/tests/test_umath.py
73-
# or
74-
python -m tests.third_party.numpy_ext core/tests/test_umath.py::TestHypot::test_simple
46+
conda install dpnp -c https://software.repos.intel.com/python/conda/ -c conda-forge
7547
```
7648

77-
### Building documentation:
49+
## Pip
50+
51+
The `dpnp` can be installed using `pip` obtaining wheel packages either from
52+
PyPi or from Intel(R) channel. To install `dpnp` wheel package from Intel(R)
53+
channel, run the following command:
54+
7855
```bash
79-
Prerequisites:
80-
$ conda install sphinx sphinx_rtd_theme
81-
Building:
82-
1. Install dpnp into your python environment
83-
2. $ cd doc && make html
84-
3. The documentation will be in doc/_build/html
56+
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpnp
8557
```
8658

87-
## Packaging:
59+
## Installing the bleeding edge
60+
61+
To try out the latest features, install `dpnp` using our development channel on
62+
Anaconda cloud:
63+
8864
```bash
89-
. ./0.env.sh
90-
conda-build conda-recipe/
65+
conda install dpnp -c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge
9166
```
9267

93-
## Run benchmark:
94-
```bash
95-
cd benchmarks/
9668

97-
asv run --python=python --bench <filename without .py>
98-
# example:
99-
asv run --python=python --bench bench_elementwise
69+
# Building
10070

101-
# or
71+
Refer to our [Documentation](https://intelpython.github.io/dpnp/quick_start_guide.html)
72+
for more information on setting up a development environment and building `dpnp`
73+
from the source.
10274

103-
asv run --python=python --bench <class>.<bench>
104-
# example:
105-
asv run --python=python --bench Elementwise.time_square
10675

107-
# add --quick option to run every case once but looks like first execution has additional overheads and takes a lot of time (need to be investigated)
108-
```
76+
# Running Tests
10977

78+
Tests are located in folder [dpnp/tests](dpnp/tests).
11079

111-
## Tests matrix:
112-
| # |Name |OS |distributive|interpreter|python used from|SYCL queue manager|build commands set |forced environment |
113-
|---|------------------------------------|-----|------------|-----------|:--------------:|:----------------:|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
114-
|1 |Ubuntu 20.04 Python37 |Linux|Ubuntu 20.04|Python 3.7 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace pytest |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
115-
|2 |Ubuntu 20.04 Python38 |Linux|Ubuntu 20.04|Python 3.8 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace pytest |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
116-
|3 |Ubuntu 20.04 Python39 |Linux|Ubuntu 20.04|Python 3.9 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace pytest |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
117-
|4 |Ubuntu 20.04 External Tests Python37|Linux|Ubuntu 20.04|Python 3.7 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace python -m tests_external.numpy.runtests|cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
118-
|5 |Ubuntu 20.04 External Tests Python38|Linux|Ubuntu 20.04|Python 3.8 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace python -m tests_external.numpy.runtests|cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
119-
|6 |Ubuntu 20.04 External Tests Python39|Linux|Ubuntu 20.04|Python 3.9 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace python -m tests_external.numpy.runtests|cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
120-
|7 |Code style |Linux|Ubuntu 20.04|Python 3.8 | IntelOneAPI | local |python ./setup.py style |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis, conda-verify, pycodestyle, autopep8, black |
121-
|8 |Valgrind |Linux|Ubuntu 20.04| | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis |
122-
|9 |Code coverage |Linux|Ubuntu 20.04|Python 3.8 | IntelOneAPI | local |export DPNP_DEBUG=1 python setup.py clean python setup.py build_clib python setup.py build_ext --inplace |cmake-3.19.2, valgrind, pytest-valgrind, conda-build, pytest, hypothesis, conda-verify, pycodestyle, autopep8, pytest-cov|
80+
To run the tests, use:
81+
```bash
82+
python -m pytest --pyargs dpnp
83+
```

0 commit comments

Comments
 (0)