4
4
Quick Start Guide
5
5
#################
6
6
7
-
8
- .. contents :: Table of contents
9
- :local:
10
- :backlinks: none
11
- :depth: 3
12
-
13
7
Installing from oneAPI
14
- ----------------------
8
+ ======================
15
9
16
10
Dpctl is available as part of the oneAPI Intel Distribution of Python (IDP).
17
11
Please follow `oneAPI installation guide `_ to install oneAPI. In this quick
@@ -50,7 +44,7 @@ On Windows
50
44
`GPU driver installation guide `_.
51
45
52
46
Install Wheel package from Pypi
53
- -------------------------------
47
+ ===============================
54
48
55
49
Dpctl can also be istalled from Pypi.
56
50
@@ -79,20 +73,21 @@ On Windows
79
73
set PATH = < path_to_your_env> \bin;< path_to_your_env> \Library\bin;%PATH%
80
74
81
75
Building from source
82
- --------------------
76
+ ====================
83
77
84
78
To build dpctl from source, we need dpcpp and GPU drivers (and optionally CPU
85
79
OpenCL drivers). It is preferable to use the dpcpp compiler packaged as part of
86
80
oneAPI. However, it is possible to use a custom build of dpcpp to build dpctl,
87
81
especially if you want to enable CUDA support.
88
82
89
83
Building using oneAPI dpcpp
90
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
+ ---------------------------
91
85
92
86
As before, oneAPI and graphics drivers should be installed on the system prior
93
87
to proceeding further.
94
88
95
- **Activate oneAPI as follows **
89
+ Activate oneAPI as follows
90
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
96
91
97
92
On Linux
98
93
@@ -106,7 +101,8 @@ On Windows
106
101
107
102
call " %ONEAPI_ROOT% \setvars.bat"
108
103
109
- **Build and install using conda-build **
104
+ Build and install using conda-build
105
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
106
111
107
The conda-recipe included with the sources can be used to build the dpctl
112
108
package. The advantage of this approach is that all dependencies are pulled in
@@ -136,7 +132,9 @@ After building the conda package you may install it by executing:
136
132
You could face issues with conda-build version 3.20. Use conda-build
137
133
3.18 instead.
138
134
139
- **Build and Install with setuptools **
135
+
136
+ Build and install with setuptools
137
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140
138
141
139
To build using Python ``setuptools ``, the following packages should be
142
140
installed:
@@ -164,13 +162,13 @@ to build and install
164
162
python setup.py develop
165
163
166
164
Building using custom dpcpp
167
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
165
+ ---------------------------
168
166
169
167
It is possible to build dpctl from source using .. _DPC++ toolchain: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md
170
168
instead of the DPC++ compiler that comes with oneAPI. One reason for doing this
171
169
may be to enable support for CUDA devices.
172
170
173
- Following steps in :ref: `Build and Install with setuptools ` use command line
171
+ Following steps in `Build and install with setuptools `_ use command line
174
172
option :code: `--sycl-compiler-prefix `, for example:
175
173
176
174
.. code-block :: bash
@@ -181,7 +179,7 @@ Available options and their descriptions can be retrieved using option
181
179
:code: `--help `.
182
180
183
181
Using dpctl
184
- -----------
182
+ ===========
185
183
186
184
Dpctl requires a DPC++ runtime. When dpctl is installed via conda then it uses
187
185
the DPC++ runtime from ``dpcpp_cpp_rt `` package that is part of IDP. When using
@@ -190,10 +188,10 @@ the system. The easiest way to setup a DPC++ runtime will be by activating
190
188
oneAPI.
191
189
192
190
Running examples and tests
193
- --------------------------
191
+ ==========================
194
192
195
193
Running the examples
196
- ~~~~~~~~~~~~~~~~~~~~
194
+ --------------------
197
195
198
196
After setting up dpctl you can try out the Python examples as follows:
199
197
@@ -213,7 +211,7 @@ located under *examples/cython*. Each example in the folder can be built using
213
211
examples.
214
212
215
213
Running the Python tests
216
- ~~~~~~~~~~~~~~~~~~~~~~~~
214
+ ------------------------
217
215
218
216
The dpctl Python test suite can be executed as follows:
219
217
@@ -222,14 +220,13 @@ The dpctl Python test suite can be executed as follows:
222
220
pytest --pyargs dpctl
223
221
224
222
225
- Building the C API shared library
226
- ---------------------------------
223
+ Building the DPCTLSyclInterface library
224
+ =======================================
227
225
228
- The dpctl C API is a shared library called libDPCTLSyclInterface and is built
229
- together when build the Python package. However, it is possible to only build
230
- the C API as a standalone library. To do so, you will need ``cmake ``,
226
+ The libDPCTLSyclInterface is a shared library used by the Python package.
227
+ To build the library you will need ``DPC++ `` toolchain, ``cmake ``,
231
228
``ninja `` or ``make ``, and optionally ``gtest 1.10 `` if you wish to run the
232
- C API test suite.
229
+ test suite.
233
230
234
231
For example, on Linux the following script can be used to build the C oneAPI
235
232
library.
0 commit comments