Skip to content

KsanaKozlova/dpnp

 
 

Build Status codecov Build Sphinx

DPNP: NumPy-like API accelerated with SYCL

Full documentation: https://intelpython.github.io/dpnp/

DPNP C++ backend documentation: https://intelpython.github.io/dpnp/backend_doc/

The project contains:

  • Python interface with NumPy-like API
  • C++ library with SYCL based kernels

How to run

By default main CPU SYCL queue is used. To use Intel GPU please use:

DPNP_QUEUE_GPU=1 python examples/example1.py

Build from source:

git clone https://github.com/IntelPython/dpnp
cd dpnp
./0.build.sh

Run test

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

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

About

NumPy-like API accelerated with SYCL

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.2%
  • C++ 29.9%
  • Other 0.9%