Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 147f7f1

Browse files
committed
Update HowTo.rst
Use `numba_dppy` instead of `numba/dppl` and `numba.dppl`. Some palces contains `dppl`. It relates to folders and files named.
1 parent c0708b4 commit 147f7f1

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

HowTo.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
Features
33
========
44

5-
DPPL is currently implemented using OpenCL 2.1. The features currently available
5+
DPPY is currently implemented using OpenCL 2.1. The features currently available
66
are listed below with the help of sample code snippets. In this release we have
77
the implementation of the OAK approach described in MS138 in section 4.3.2. The
88
new decorator is described below.
99

10-
To access the features driver module have to be imported from numba.dppl.dppl_driver
10+
To access the features driver module have to be imported from numba_dppy.dppl_driver
1111

1212
New Decorator
1313
=============
1414

15-
The new decorator included in this release is *dppl.kernel*. Currently this decorator
15+
The new decorator included in this release is *numba_dppy.kernel*. Currently this decorator
1616
takes only one option *access_types* which is explained below with the help of an example.
1717
Users can write OpenCL tpye kernels where they can identify the global id of the work item
1818
being executed. The supported methods inside a decorated function are:
1919

20-
- dppl.get_global_id(dimidx)
21-
- dppl.get_local_id(dimidx)
22-
- dppl.get_group_num(dimidx)
23-
- dppl.get_num_groups(dimidx)
24-
- dppl.get_work_dim()
25-
- dppl.get_global_size(dimidx)
26-
- dppl.get_local_size(dimidx)
20+
- numba_dppy.get_global_id(dimidx)
21+
- numba_dppy.get_local_id(dimidx)
22+
- numba_dppy.get_group_num(dimidx)
23+
- numba_dppy.get_num_groups(dimidx)
24+
- numba_dppy.get_work_dim()
25+
- numba_dppy.get_global_size(dimidx)
26+
- numba_dppy.get_local_size(dimidx)
2727

2828
Currently no support is provided for local memory in the device and everything is in the
2929
global memory. Barrier and other memory fences will be provided once support for local
@@ -61,7 +61,7 @@ Primitive types are passed by value to the kernel, currently supported are int,
6161
Math Kernels
6262
============
6363

64-
This release has support for math kernels. See numba/dppl/tests/dppl/test_math_functions.py
64+
This release has support for math kernels. See numba_dppy/tests/dppl/test_math_functions.py
6565
for more details.
6666

6767

@@ -72,7 +72,7 @@ Examples
7272
Sum of two 1d arrays
7373
====================
7474

75-
Full example can be found at numba/dppl/examples/sum.py.
75+
Full example can be found at numba_dppy/examples/sum.py.
7676

7777
To write a program that sums two 1d arrays we at first need a OpenCL device environment.
7878
We can get the environment by using *ocldrv.runtime.get_gpu_device()* for getting the
@@ -82,7 +82,7 @@ where *device_env.copy_array_to_device(data)* will read the ndarray and copy tha
8282
and *ocldrv.DeviceArray(device_env.get_env_ptr(), data)* will create a buffer in the device
8383
that has the same memory size as the ndarray being passed. The OpenCL Kernel in the
8484
folllowing example is *data_parallel_sum*. To get the id of the work item we are currently
85-
executing we need to use the *dppl.get_global_id(0)*, since this example only 1 dimension
85+
executing we need to use the *numba_dppy.get_global_id(0)*, since this example only 1 dimension
8686
we only need to get the id in dimension 0.
8787

8888
While invoking the kernel we need to pass the device environment and the global work size.
@@ -91,9 +91,9 @@ back to the host and we can use *device_env.copy_array_from_device(ddata)*.
9191

9292
.. code-block:: python
9393
94-
@dppl.kernel
94+
@numba_dppy.kernel
9595
def data_parallel_sum(a, b, c):
96-
i = dppl.get_global_id(0)
96+
i = numba_dppy.get_global_id(0)
9797
c[i] = a[i] + b[i]
9898
9999
global_size = 10
@@ -126,7 +126,7 @@ ndArray Support
126126

127127
Support for passing ndarray directly to kernels is also supported.
128128

129-
Full example can be found at numba/dppl/examples/sum_ndarray.py
129+
Full example can be found at numba_dppy/examples/sum_ndarray.py
130130

131131
For availing this feature instead of creating device buffers explicitly like the previous
132132
example, users can directly pass the ndarray to the kernel. Internally it will result in
@@ -148,7 +148,7 @@ Reduction
148148

149149
This example will demonstrate a sum reduction of 1d array.
150150

151-
Full example can be found at numba/dppl/examples/sum_reduction.py.
151+
Full example can be found at numba_dppy/examples/sum_reduction.py.
152152

153153
In this example to sum the 1d array we invoke the Kernel multiple times.
154154
This can be implemented by invoking the kernel once, but that requires
@@ -161,15 +161,15 @@ ParFor Support
161161

162162
*Parallel For* is supported in this release for upto 3 dimensions.
163163

164-
Full examples can be found in numba/dppl/examples/pa_examples/
164+
Full examples can be found in numba_dppy/examples/pa_examples/
165165

166166

167167
=======
168168
Testing
169169
=======
170170

171-
All examples can be found in numba/dppl/examples/
171+
All examples can be found in numba_dppy/examples/
172172

173-
All tests can be found in numba/dppl/tests/dppl and can be triggered by the following command:
173+
All tests can be found in numba_dppy/tests/dppl and can be triggered by the following command:
174174

175-
``python -m numba.runtests numba.dppl.tests``
175+
``python -m numba.runtests numba_dppy.tests``

0 commit comments

Comments
 (0)