Skip to content

Commit 1b2a178

Browse files
committed
Added Quick Start Guide
1 parent 6c545ac commit 1b2a178

File tree

5 files changed

+131
-58
lines changed

5 files changed

+131
-58
lines changed

doc/ext_links.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.. _DPC++: https://www.apress.com/gp/book/9781484255735
1111
.. _SYCL*: https://www.khronos.org/sycl/
1212
.. _dpctl: https://intelpython.github.io/dpctl/latest/index.html
13-
.. _Data Parallel Control: https://intelpython.github.io/dpctl/latest/index.html
13+
.. _Data Parallel Control Library: https://intelpython.github.io/dpctl/latest/index.html
1414
.. _Intel oneAPI Base Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html
1515
.. _Intel Distribution for Python*: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html
1616
.. _Intel AI Analytics Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html

doc/getting_started.rst

Lines changed: 0 additions & 50 deletions
This file was deleted.

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _index:
22
.. include:: ./ext_links.txt
33

4-
Data Parallel Extension for Numpy*
4+
Data Parallel Extension for NumPy*
55
==================================
66

77
.. module:: dpnp
@@ -10,7 +10,7 @@ Data Parallel Extension for Numpy*
1010
:maxdepth: 2
1111

1212
overview
13-
getting_started
13+
quick_start_guide
1414
reference/index
1515
dpnp_backend_api
1616
dpctl

doc/overview.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Overview
66

77
.. module:: dpnp
88

9-
The Data Parallel Extensions for Numpy (dpnp package) - a library that
9+
The Data Parallel Extension for NumPy* (dpnp package) - a library that
1010
implements a subset of `NumPy*`_ that can be executed on any
1111
data parallel device. The subset is a drop-in replacement of core `NumPy*`_
1212
functions and numerical data types.
1313

14-
The Data Parallel Extensions for Numpy is being developed as part of
14+
The Data Parallel Extension for NumPy* is being developed as part of
1515
`Intel AI Analytics Toolkit`_ and is distributed with the
1616
`Intel Distribution for Python*`_. The dpnp package is also available
1717
on Anaconda cloud. Please refer the :doc:`getting_started` page to learn more.
@@ -26,15 +26,15 @@ The :class:`dpnp.ndarray` class is a compatible alternative of
2626
>>> x = np.array([1, 2, 3])
2727

2828
``x`` in the above example is an instance of :class:`dpnp.ndarray` that
29-
is created identically to ``NumPy``'s one. The key difference of
29+
is created identically to ``NumPy*``'s one. The key difference of
3030
:class:`dpnp.ndarray` from :class:`numpy.ndarray` is that the memory
3131
is allocated on the default `SYCL*`_ device, which is a ``"gpu"`` on systems
3232
with integrated or discrete GPU (otherwise it is the ``"host"`` device
3333
on systems that do not have GPU).
3434

35-
Most of the array manipulations are also done in the way similar to NumPy such as:
35+
Most of the array manipulations are also done in the way similar to `NumPy*`_ such as:
3636

3737
>>> s = np.sum(x)
3838

39-
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported NumPy APIs
39+
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported `NumPy*`_ APIs
4040
along with their limitations.

doc/quick_start_guide.rst

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
.. _quick_start_guide:
2+
.. include:: ./ext_links.txt
3+
4+
.. |copy| unicode:: U+000A9
5+
6+
.. |trade| unicode:: U+2122
7+
8+
=================
9+
Quick Start Guide
10+
=================
11+
12+
Device Drivers
13+
=================
14+
15+
To start programming data parallel devices beyond CPU, you will need
16+
an appropriate hardware. The Data Parallel Extension for NumPy* works fine
17+
on Intel |copy| laptops with integrated graphics. In majority of cases,
18+
your Windows*-based laptop already has all necessary device drivers installed.
19+
But if you want the most up-to-date driver, you can always
20+
`update it to the latest one <https://www.intel.com/content/www/us/en/download-center/home.html>`_.
21+
Follow device driver installation instructions to complete the step.
22+
23+
24+
Python Interpreter
25+
=================
26+
27+
You will need Python 3.8, 3.9, or 3.10 installed on your system. If you
28+
do not have one yet the easiest way to do that is to install
29+
`Intel Distribution for Python*`_. It installs all essential Python numerical
30+
and machine learning packages optimized for the Intel hardware, including
31+
Data Parallel Extension for NumPy*.
32+
If you have Python installation from another vendor, it is fine too. All you
33+
need is to install Data Parallel Extension for NumPy* manually as shown
34+
in the next installation section.
35+
36+
37+
Installation
38+
============
39+
40+
Install Package from Anaconda
41+
---------------------
42+
43+
It is recommended to use conda packages from the ``anaconda.org/intel``
44+
channel. You will need one of the commands below:
45+
46+
* Conda: ``conda install numba-dpex``
47+
48+
* Pip: ``pip install numba-dpex``
49+
50+
These commands install dpnp package along with its dependencies, including
51+
``dpctl`` package with `Data Parallel Control Library`_ and all required
52+
compiler runtimes and OneMKL.
53+
54+
.. note::
55+
Before installing with conda or pip it is strongly advised to update ``conda`` and ``pip`` to latest versions
56+
57+
58+
Build and Install Conda Package
59+
-------------------------------
60+
61+
Alternatively you can create and activate a local conda build environment:
62+
63+
.. code-block:: bash
64+
65+
conda create -n build-env conda-build
66+
conda activate build-env
67+
68+
And to build dpnp package from the sources:
69+
70+
.. code-block:: bash
71+
72+
conda build conda-recipe -c intel -c conda-forge
73+
74+
Finanly, to install the result package:
75+
76+
.. code-block:: bash
77+
78+
conda install dpnp
79+
80+
81+
Build and Install with scikit-build
82+
-----------------------------------
83+
84+
Another way to build and install dpnp package from the source is to use Python
85+
``setuptools`` and ``scikit-build``. You will need to create a local conda
86+
build environment by command below depending on hosting OS.
87+
88+
On Linux:
89+
90+
.. code-block:: bash
91+
92+
conda create -n build-env dpctl cython dpcpp_linux-64 mkl-devel-dpcpp tbb-devel onedpl-devel cmake scikit-build ninja pytest -c intel -c conda-forge
93+
conda activate build-env
94+
95+
On Windows:
96+
97+
.. code-block:: bash
98+
99+
conda create -n build-env dpctl cython dpcpp_win-64 mkl-devel-dpcpp tbb-devel onedpl-devel cmake scikit-build ninja pytest -c intel -c conda-forge
100+
conda activate build-env
101+
102+
To build and install the package on Linux OS, run:
103+
104+
.. code-block:: bash
105+
106+
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx
107+
108+
To build and install the package on Windows OS, run:
109+
110+
.. code-block:: bash
111+
112+
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
113+
114+
115+
Testing
116+
=======
117+
118+
If you want to execute the scope of Python test suites which are available
119+
by the source, you will need to run a command as below:
120+
121+
.. code-block:: bash
122+
123+
pytest -s tests

0 commit comments

Comments
 (0)