跳转到主要内容

NumPy的数据并行扩展

项目描述

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

DPNP - NumPy*的数据并行扩展

API覆盖摘要

完整文档

DPNP C++后端文档

从源代码构建

确保已安装以下依赖项

  • cython
  • cmake >=3.21
  • dpcpp_linux-64dpcpp_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

项目详情


下载文件

下载适合您平台的项目文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

本发布版本没有可用的源分发文件。请参阅生成分发存档的教程。

构建分发

dpnp-0.15.0-0-cp311-cp311-win_amd64.whl (8.8 MB 查看哈希值)

上传时间 CPython 3.11 Windows x86-64

dpnp-0.15.0-0-cp311-cp311-manylinux_2_28_x86_64.whl (12.4 MB 查看哈希值)

上传时间 CPython 3.11 manylinux: glibc 2.28+ x86-64

dpnp-0.15.0-0-cp310-cp310-win_amd64.whl (8.8 MB 查看哈希值)

上传时间 CPython 3.10 Windows x86-64

dpnp-0.15.0-0-cp310-cp310-manylinux_2_28_x86_64.whl (12.4 MB 查看哈希值)

上传时间 CPython 3.10 manylinux: glibc 2.28+ x86-64

dpnp-0.15.0-0-cp39-cp39-win_amd64.whl (8.8 MB 查看哈希值)

上传于 CPython 3.9 Windows x86-64

dpnp-0.15.0-0-cp39-cp39-manylinux_2_28_x86_64.whl (12.4 MB 查看哈希值)

上传于 CPython 3.9 manylinux: glibc 2.28+ x86-64

支持者