Skip to main content

Data Parallel Extension for NumPy

Project description

Code style: black Imports: isort Pre-commit Conda package Coverage Status Build Sphinx OpenSSF Scorecard

DPNP - Data Parallel Extension for NumPy*

API coverage summary

Full documentation

DPNP C++ backend documentation

Build from source:

Ensure you have the following prerequisite packages installed:

  • cython
  • cmake >=3.21
  • dpcpp_linux-64 or dpcpp_win-64 (depending on your OS)
  • dpctl
  • mkl-devel-dpcpp
  • onedpl-devel
  • ninja
  • numpy >=1.19,<1.25a0
  • python
  • scikit-build
  • setuptools
  • sysroot_linux-64 >=2.28 (only on Linux OS)
  • tbb-devel

After these steps, dpnp can be built in debug mode as follows:

git clone https://github.com/IntelPython/dpnp
cd dpnp
python scripts/build_locally.py

Install Wheel Package via pip

Install DPNP

python -m pip install --index-url https://software.repos.intel.com/python/pypi dpnp

Set path to Performance Libraries in case of using venv or system Python:

export LD_LIBRARY_PATH=<path_to_your_env>/lib

It is also required to set following environment variables:

export OCL_ICD_FILENAMES_RESET=1
export OCL_ICD_FILENAMES=libintelocl.so

Run test

pytest
# or
pytest tests/test_matmul.py -s -v
# or
python -m unittest tests/test_mixins.py

Run numpy external test

. ./0.env.sh
python -m tests.third_party.numpy_ext
# or
python -m tests.third_party.numpy_ext core/tests/test_umath.py
# or
python -m tests.third_party.numpy_ext core/tests/test_umath.py::TestHypot::test_simple

Building documentation:

Prerequisites:
$ conda install sphinx sphinx_rtd_theme
Building:
1. Install dpnp into your python environment
2. $ cd doc && make html
3. The documentation will be in doc/_build/html

Packaging:

. ./0.env.sh
conda-build conda-recipe/

Run benchmark:

cd benchmarks/

asv run --python=python --bench <filename without .py>
# example:
asv run --python=python --bench bench_elementwise

# or

asv run --python=python --bench <class>.<bench>
# example:
asv run --python=python --bench Elementwise.time_square

# 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)

Tests matrix:

# Name OS distributive interpreter python used from SYCL queue manager build commands set forced environment
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
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
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
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
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
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
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
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
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

dpnp-0.16.0-0-cp312-cp312-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.12 Windows x86-64

dpnp-0.16.0-0-cp312-cp312-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

dpnp-0.16.0-0-cp311-cp311-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

dpnp-0.16.0-0-cp311-cp311-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

dpnp-0.16.0-0-cp310-cp310-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.10 Windows x86-64

dpnp-0.16.0-0-cp310-cp310-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

dpnp-0.16.0-0-cp39-cp39-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.9 Windows x86-64

dpnp-0.16.0-0-cp39-cp39-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

File details

Details for the file dpnp-0.16.0-0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.16.0-0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for dpnp-0.16.0-0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 130c826a6be0c903096a2e9c848c99efed5d0fc84eff7b41ff74f899ddad9493
MD5 5803a58c01c7a1e60009a2a905f462b6
BLAKE2b-256 51b59519a3b5f0d62db2c80d5823e261b366a11b3806d2509bcce2aa1a254c4c

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.16.0-0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 059ba167353f5bedd0ebf2dc1bc14245f9b264b1b39c1b94fc0dd139af4af873
MD5 def5c117967c23f9b33d52b557990d38
BLAKE2b-256 7a3b9fef31960e5c1a0b4aa0044cb013c2cedb5860faff18c39933f9348e7599

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.16.0-0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for dpnp-0.16.0-0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a2edca1b452983985b03dc5e42384195ffda4656e6156e08ca343ae168f5444c
MD5 9f896efdf0dd3b39948126662a37c8bc
BLAKE2b-256 3b0f23f72d0c15f5b1106659a3d2f2d85c264a3fda7d90478c3ba495361fe0f9

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.16.0-0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 032b30e6ba0f2305d27fcf45b9d091ad8491f57cdcd10e3bdb561c2547b2dd2c
MD5 dee9d4932b2d8f27e2f1c513ae91df92
BLAKE2b-256 6888ed89f45d2dd8509ec72627ec7d41251053a269579f0425f0b36c9c4dc68f

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.16.0-0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for dpnp-0.16.0-0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 94b1bb87aa378b2e3dd7d0363b106a82a4cfa360b3780339c9d61a9974f72138
MD5 956fc0b92b07ec3cdcf3db13458f933d
BLAKE2b-256 cd75676b0581dc499e38a76657710ee1e8922bb7173ec2db614e9d57e4d5ea84

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.16.0-0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2ca70f51a35385c645843ad6b460afc7eff144c6412f6fc2433b89d06eb091f0
MD5 ddce3e2ece8c6bdbe21d28e1cd5f5df4
BLAKE2b-256 705dfcb94518fbbe45b08bfa2f901d1d227132076b6044bc5e3dfcc2254c6811

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.16.0-0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for dpnp-0.16.0-0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b5ec51219b7d918f7d579ac1f1bafceb428e5f389bc49141d3a4a811b9468ccc
MD5 54ce51fa209ab4533455d65b0fe792a2
BLAKE2b-256 6a1faa88189a7df0a4b4882e0301509b6bc7bd6a8b0f53df6c055ecd5784399c

See more details on using hashes here.

File details

Details for the file dpnp-0.16.0-0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.16.0-0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d4bd9cfa7866b72997d7840e39e70a3efacab78ecf7a68ed63ca23c29cf5e440
MD5 5f7108dd30c9942d89f8362dbfdeb94c
BLAKE2b-256 9f45ff8613f589f7e1ad931c91aa7bda89bf6a0c8b95888a3700b302bc3ae627

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page