NumPy的数据并行扩展
项目描述
DPNP - NumPy*的数据并行扩展
从源代码构建
确保已安装以下依赖项
cython
cmake >=3.21
dpcpp_linux-64
或dpcpp_win-64
(取决于您的操作系统)dpctl
mkl-devel-dpcpp
onedpl-devel
ninja
numpy >=1.19,<1.25a0
python
scikit-build
setuptools
sysroot_linux-64 >=2.28
(仅在Linux操作系统上)tbb-devel
完成这些步骤后,可以使用以下方式在调试模式下构建dpnp
git clone https://github.com/IntelPython/dpnp
cd dpnp
python scripts/build_locally.py
通过pip安装Wheel包
安装DPNP
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpnp
如果使用venv或系统Python,请设置性能库路径
export LD_LIBRARY_PATH=<path_to_your_env>/lib
还需要设置以下环境变量
export OCL_ICD_FILENAMES_RESET=1
export OCL_ICD_FILENAMES=libintelocl.so
运行测试
pytest
# or
pytest tests/test_matmul.py -s -v
# or
python -m unittest tests/test_mixins.py
运行NumPy外部测试
. ./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
构建文档
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
打包
. ./0.env.sh
conda-build conda-recipe/
运行基准测试
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)
测试矩阵
# | 名称 | 操作系统 | 发行版 | 解释器 | 使用的Python | SYCL队列管理器 | 构建命令集 | 强制环境 |
---|---|---|---|---|---|---|---|---|
1 | Ubuntu 20.04 Python37 | Linux | Ubuntu 20.04 | Python 3.7 | IntelOneAPI | 本地 | 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 | 本地 | 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 | 本地 | 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 外部测试 Python37 | Linux | Ubuntu 20.04 | Python 3.7 | IntelOneAPI | 本地 | 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 外部测试 Python38 | Linux | Ubuntu 20.04 | Python 3.8 | IntelOneAPI | 本地 | 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 外部测试 Python39 | Linux | Ubuntu 20.04 | Python 3.9 | IntelOneAPI | 本地 | 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 | 代码风格 | Linux | Ubuntu 20.04 | Python 3.8 | IntelOneAPI | 本地 | 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 | 本地 | 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 | 代码覆盖率 | Linux | Ubuntu 20.04 | Python 3.8 | IntelOneAPI | 本地 | 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 |
项目详情
关闭
哈希值 for dpnp-0.15.0-0-cp311-cp311-manylinux_2_28_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f4c6e010de5f0a94956662b2f97d9043f0207c863039344043646cbf42d6d0a2 |
|
MD5 | 472e9c8d2a1c30400eaf4bb8db63c67b |
|
BLAKE2b-256 | 994c0cc9ffb63192235177ce3db0cf98188897b4756063e7b0d55fc285294006 |
关闭
哈希值 for dpnp-0.15.0-0-cp310-cp310-manylinux_2_28_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 69108ffc15078c54e054132b82735653f24dce41fa4949b29935e709884055cf |
|
MD5 | 0d75b4717e027706824735fc1d70f9ea |
|
BLAKE2b-256 | 6e507dcced7073f66f6584775736cbbad89b39672f15b6e96f13f685c77fc4bd |
关闭
哈希值 for dpnp-0.15.0-0-cp39-cp39-manylinux_2_28_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ebd5da199561765c2f1b70f7752b0c86aa3d377804a105ccc332f81be99389da |
|
MD5 | 76f6708a794f04af8d121816aa803f93 |
|
BLAKE2b-256 | 19dd1b24b966b471ed0b36bc7c511908544c0056a639979253fe78edddc18426 |