Full documentation: https://intelpython.github.io/dpnp/
The project contains:
- Python interface with NumPy-like API
- C++ library with SYCL based kernels
By default main CPU SYCL queue is used. To use Intel GPU please use:
DPNP_QUEUE_GPU=1 python examples/example1.py
git clone https://github.com/IntelPython/dpnp
cd dpnp
./0.build.sh
. ./0.env
pytest
# or
pytest tests/test_matmul.py -s -v
# or
python -m unittest tests/test_mixins.py
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
conda-build conda-recipe/
run tests from config:
python tests/run_pytest.py tests/config/example.yaml tests/config/deselect_failed.yaml -v --tb=no
tests/run_pytest.py - runner
tests/config/example.yaml tests/config/deselect_failed.yaml - one or several configs *.yaml
-v --tb=no - any usual pytest args
$ 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)