-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af1af29
commit 6c545ac
Showing
6 changed files
with
133 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. | ||
********************************************************** | ||
THESE ARE EXTERNAL PROJECT LINKS USED IN THE DOCUMENTATION | ||
********************************************************** | ||
|
||
.. _NumPy*: https://numpy.org/ | ||
.. _Python* Array API Standard: https://data-apis.org/array-api/ | ||
.. _OpenCl*: https://www.khronos.org/opencl/ | ||
.. _oneAPI Level Zero: https://spec.oneapi.io/level-zero/latest/index.html | ||
.. _DPC++: https://www.apress.com/gp/book/9781484255735 | ||
.. _SYCL*: https://www.khronos.org/sycl/ | ||
.. _dpctl: https://intelpython.github.io/dpctl/latest/index.html | ||
.. _Data Parallel Control: https://intelpython.github.io/dpctl/latest/index.html | ||
.. _Intel oneAPI Base Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html | ||
.. _Intel Distribution for Python*: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html | ||
.. _Intel AI Analytics Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,16 @@ | ||
========================================================= | ||
DPNP -- A NumPy-compatible library for SYCL-based devices | ||
========================================================= | ||
.. _index: | ||
.. include:: ./ext_links.txt | ||
|
||
.. module:: dpnp | ||
|
||
`DPNP <https://github.com/IntelPython/dpnp>`_ is a NumPy-like library accelerated with SYCL on Intel devices. | ||
It provides Python interfaces for many NumPy functions, and includes a subset of methods of :class:`dpnp.ndarray`. | ||
Under the hood it is based on native C++ and oneMKL based kernels. | ||
|
||
Being drop-in replacement for Numpy its usage is very similar to Numpy: | ||
|
||
>>> import dpnp as np | ||
|
||
The :class:`dpnp.ndarray` class is a compatible alternative of :class:`numpy.ndarray`. | ||
|
||
>>> x = np.array([1, 2, 3]) | ||
Data Parallel Extension for Numpy* | ||
================================== | ||
|
||
``x`` in the above example is an instance of :class:`dpnp.ndarray` that is created identically to ``NumPy``'s one. | ||
The key difference of :class:`dpnp.ndarray` from :class:`numpy.ndarray` is | ||
that the memory is allocated on Intel GPU when setting up ``DPNP_QUEUE_GPU=1`` in the environment. | ||
|
||
|
||
Most of the array manipulations are also done in the way similar to NumPy such as: | ||
|
||
>>> s = np.sum(x) | ||
|
||
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported NumPy APIs | ||
along with their limitations. | ||
.. module:: dpnp | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
install | ||
overview | ||
getting_started | ||
reference/index | ||
dpnp_backend_api | ||
dpctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _overview | ||
.. include:: ./ext_links.txt | ||
|
||
Overview | ||
======== | ||
|
||
.. module:: dpnp | ||
|
||
The Data Parallel Extensions for Numpy (dpnp package) - a library that | ||
implements a subset of `NumPy*`_ that can be executed on any | ||
data parallel device. The subset is a drop-in replacement of core `NumPy*`_ | ||
functions and numerical data types. | ||
|
||
The Data Parallel Extensions for Numpy is being developed as part of | ||
`Intel AI Analytics Toolkit`_ and is distributed with the | ||
`Intel Distribution for Python*`_. The dpnp package is also available | ||
on Anaconda cloud. Please refer the :doc:`getting_started` page to learn more. | ||
|
||
Being drop-in replacement for `NumPy*`_ means that the usage is very similar: | ||
|
||
>>> import dpnp as np | ||
|
||
The :class:`dpnp.ndarray` class is a compatible alternative of | ||
:class:`numpy.ndarray`. | ||
|
||
>>> x = np.array([1, 2, 3]) | ||
|
||
``x`` in the above example is an instance of :class:`dpnp.ndarray` that | ||
is created identically to ``NumPy``'s one. The key difference of | ||
:class:`dpnp.ndarray` from :class:`numpy.ndarray` is that the memory | ||
is allocated on the default `SYCL*`_ device, which is a ``"gpu"`` on systems | ||
with integrated or discrete GPU (otherwise it is the ``"host"`` device | ||
on systems that do not have GPU). | ||
|
||
Most of the array manipulations are also done in the way similar to NumPy such as: | ||
|
||
>>> s = np.sum(x) | ||
|
||
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported NumPy APIs | ||
along with their limitations. |