Git Product home page Git Product logo

dpnp's Introduction

Build Status codecov Build Sphinx

DPNP: NumPy-like API accelerated with SYCL

API coverage summary

Full documentation

DPNP C++ backend documentation

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.sh
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

dpnp's People

Contributors

alexander-makaryev avatar densmirn avatar ksanakozlova avatar oleksandr-pavlyk avatar rubtsowa avatar samir-nasibli avatar shssf avatar xaleryb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.