Skip to content

Commit

Permalink
Updated developement guides
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Jul 18, 2023
1 parent 1b2a178 commit 2420ede
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
26 changes: 18 additions & 8 deletions doc/dpctl.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
DPCtl Usage
===========
.. _dptcl:
.. include:: ./ext_links.txt

`DPCtl <https://github.com/IntelPython/dpctl>`_ provides API to manage
specific SYCL resources for SYCL-based Python packages. DPNP uses DPCtl as
a global SYCL queue manager. Below code illustrates simple usage of DPNP
in combination with dpCtl.
Interplay with the Data Parallel Control Library
===============================================

`Data Parallel Control Library`_ provides API to manage specific
`SYCL*`_ resources for SYCL-based Python packages.

An example below demonstrates how the Data Parallel Extension for NumPy* can be
easily combined with the device management interface provided by dpctl package.

Literally, the SYCL* queue manager interface from the dpctl package allows
to set an input queue as the currently usable queue inside the context
manager's scope. This way an array creation function from the dpnp package
which is defined inside the context will allocate the data using that queue.

.. code-block:: python
:linenos:
Expand All @@ -16,10 +25,11 @@ in combination with dpCtl.
x = np.array([1, 2, 3])
s = np.sum(x)
For more information please refer to `DPCtl's documentation <https://intelpython.github.io/dpctl>`_.
For more information please refer to `Data Parallel Control Library`_
documentation.

Example
~~~~~~~
-------
.. literalinclude:: ../examples/example10.py
:linenos:
:language: python
Expand Down
5 changes: 5 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ Data Parallel Extension for NumPy*
overview
quick_start_guide
reference/index

.. toctree::
:maxdepth: 1
:caption: Development information

dpnp_backend_api
dpctl
2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _overview
.. _overview:
.. include:: ./ext_links.txt

Overview
Expand Down
10 changes: 8 additions & 2 deletions doc/quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Install Package from Anaconda
It is recommended to use conda packages from the ``anaconda.org/intel``
channel. You will need one of the commands below:

* Conda: ``conda install numba-dpex``
* Conda: ``conda install dpnp``

* Pip: ``pip install numba-dpex``
* Pip: ``pip install dpnp``

These commands install dpnp package along with its dependencies, including
``dpctl`` package with `Data Parallel Control Library`_ and all required
Expand Down Expand Up @@ -111,6 +111,12 @@ To build and install the package on Windows OS, run:
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
Alternatively, to develop on Linux OS, you can use the driver script:

.. code-block:: bash
python scripts/build_locally.py
Testing
=======
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
API Reference
*************

This is the official DPNP API reference.
API reference of the Data Parallel Extension for NumPy*

----

Expand Down

0 comments on commit 2420ede

Please sign in to comment.