Skip to main content

Data Parallel Extension for NumPy

Project description

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

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://pypi.anaconda.org/intel/simple 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

If you're not sure about the file name format, learn more about wheel file names.

dpnp-0.13.0-172-cp310-cp310-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.10Windows x86-64

dpnp-0.13.0-172-cp310-cp310-manylinux2014_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.10

dpnp-0.13.0-172-cp39-cp39-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.9Windows x86-64

dpnp-0.13.0-172-cp39-cp39-manylinux2014_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.9

File details

Details for the file dpnp-0.13.0-172-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.13.0-172-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for dpnp-0.13.0-172-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c706139a8e1f4b37ccd59b0b21deca79fa9ad538651ab88807ccbb8e4bfb9430
MD5 7237aa49b6a9d55eba5979fce86566e9
BLAKE2b-256 5148af648cc4364866038b0a6ccc9c4d1122bdb2956dbb272b0e47f2cc7f8681

See more details on using hashes here.

File details

Details for the file dpnp-0.13.0-172-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.13.0-172-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 17b99c215aec3208d76de90c89184f05500edbad966d945c5574f1fce0d77c92
MD5 015943d691d27344424740fd5bbe9f85
BLAKE2b-256 6575231a790e77daa2faaacbba3f6227797e8e7e1e55ef6d9c482759bce7ff5f

See more details on using hashes here.

File details

Details for the file dpnp-0.13.0-172-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dpnp-0.13.0-172-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for dpnp-0.13.0-172-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c1106eeca5299598765249503b07f2c43a31929db3fce1947b3fe81d45501cc9
MD5 ef610b9de23b24f35ac5151612f011f4
BLAKE2b-256 8eee63afe1f9d270e6ca03b50abbf218634fd461d51b5043ec4dee56e664a02f

See more details on using hashes here.

File details

Details for the file dpnp-0.13.0-172-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dpnp-0.13.0-172-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87bbb2a0b57c36fd6c42774e2ac3e84cf82b05ae174399d286adf934635ee24f
MD5 4d7f54234e5d259c5a6be723dacb7804
BLAKE2b-256 e1a8c68055df1d0b32d7000f1c6dd5ab7459a67fe35603d45244bff628f762d0

See more details on using hashes here.

Supported by

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