Skip to content

Commit ff8fe55

Browse files
1e-toetotmeniDiptorup Deb
authored
Rename dppl to dppy (#42)
Co-authored-by: etotmeni <elena.totmenina@intel.com> Co-authored-by: Diptorup Deb <diptorup.deb@intel.com>
1 parent 3bbc215 commit ff8fe55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+634
-604
lines changed

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*.pyc
2+
*.o
3+
*.so
4+
*.dylib
5+
*.pyd
6+
*.pdb
7+
*.egg-info
8+
*.sw[po]
9+
*.out
10+
*.ll
11+
.coverage
12+
.nfs*
13+
tags
14+
MANIFEST
15+
16+
build/
17+
docs/_build/
18+
docs/gh-pages/
19+
dist/
20+
htmlcov/
21+
.idea/
22+
.vscode/
23+
.mypy_cache/
24+
.ipynb_checkpoints/
25+
__pycache__/
26+
27+
docs/source/developer/autogen*

HowTo.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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_dppy.dppl_driver
10+
To access the features driver module have to be imported from numba_dppy.dppy_driver
1111

1212
New Decorator
1313
=============
@@ -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_dppy/tests/dppl/test_math_functions.py
64+
This release has support for math kernels. See numba_dppy/tests/dppy/test_math_functions.py
6565
for more details.
6666

6767

@@ -170,6 +170,6 @@ Testing
170170

171171
All examples can be found in numba_dppy/examples/
172172

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

175175
``python -m numba.runtests numba_dppy.tests``

numba_dppy/CHANGE_LOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
NUMBA Version 0.48.0 + DPPL Version 0.3.0 (June 29, 2020)
1+
NUMBA Version 0.48.0 + DPPY Version 0.3.0 (June 29, 2020)
22
--------------------------------------------------------
33

44
This release includes:
55

6-
* Caching of dppl.kernels which will improve performance.
6+
* Caching of dppy.kernels which will improve performance.
77
* Addition of support for Intel Advisor which will help in profiling applications.

numba_dppy/__init__.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
55
66
Extensions to Numba for Intel GPUs introduce two new features into Numba:
7-
a. A new backend that has a new decorator called @dppl.kernel that
7+
a. A new backend that has a new decorator called @dppy.kernel that
88
exposes an explicit kernel programming interface similar to the
9-
existing Numba GPU code-generation backends. The @dppl.kernel
9+
existing Numba GPU code-generation backends. The @dppy.kernel
1010
decorator currently implements a subset of OpenCL’s API through
1111
Numba’s intrinsic functions.
1212
@@ -20,48 +20,48 @@
2020
Explicit Kernel Prgoramming with new Docorators:
2121
2222
23-
@dppl.kernel
23+
@dppy.kernel
2424
25-
The @dppl.kernel decorator can be used with or without extra arguments.
25+
The @dppy.kernel decorator can be used with or without extra arguments.
2626
Optionally, users can pass the signature of the arguments to the
2727
decorator. When a signature is provided to the DK decorator the version
2828
of the OpenCL kernel generated gets specialized for that type signature.
2929
3030
---------------------------------------------------------------------------
31-
@dppl.kernel
31+
@dppy.kernel
3232
def data_parallel_sum(a, b, c):
33-
i = dppl.get_global_id(0)
33+
i = dppy.get_global_id(0)
3434
c[i] = a[i] + b[i]
3535
---------------------------------------------------------------------------
3636
3737
To invoke the above function users will need to provide a
3838
global size (OpenCL) which is the size of a (same as b and c) and a
39-
local size (dppl.DEFAULT_LOCAL_SIZE if user don't want to specify).
39+
local size (dppy.DEFAULT_LOCAL_SIZE if user don't want to specify).
4040
Example shown below:
4141
4242
---------------------------------------------------------------------------
43-
data_parallel_sum[len(a), dppl.DEFAULT_LOCAL_SIZE](dA, dB, dC)
43+
data_parallel_sum[len(a), dppy.DEFAULT_LOCAL_SIZE](dA, dB, dC)
4444
---------------------------------------------------------------------------
4545
4646
47-
@dppl.func
47+
@dppy.func
4848
49-
The @dppl.func decorator is the other decorator provided in the explicit
49+
The @dppy.func decorator is the other decorator provided in the explicit
5050
kernel programming model. This decorator allows users to write “device”
5151
functions that can be invoked from inside DK functions but cannot be invoked
5252
from the host. The decorator also supports type specialization as with the
53-
DK decorator. Functions decorated with @dppl.func will also be JIT compiled
54-
and inlined into the OpenCL Program containing the @dppl.kernel function
55-
calling it. A @dppl.func will not be launched as an OpenCL kernel.
53+
DK decorator. Functions decorated with @dppy.func will also be JIT compiled
54+
and inlined into the OpenCL Program containing the @dppy.kernel function
55+
calling it. A @dppy.func will not be launched as an OpenCL kernel.
5656
5757
---------------------------------------------------------------------------
58-
@dppl.func
58+
@dppy.func
5959
def bar(a):
6060
return a*a
6161
62-
@dppl.kernel
62+
@dppy.kernel
6363
def foo(in, out):
64-
i = dppl.get_global_id(0)
64+
i = dppy.get_global_id(0)
6565
out[i] = bar(in[i])
6666
---------------------------------------------------------------------------
6767
@@ -71,13 +71,13 @@ def foo(in, out):
7171
The following table has the list of intrinsic functions that can be directly
7272
used inside a DK function. All the functions are equivalent to the similarly
7373
named OpenCL function. Wherever there is an implementation difference
74-
between the Numba-PyDPPL version and the OpenCL version, the difference is
74+
between the Numba-DPPY version and the OpenCL version, the difference is
7575
explained in table. Note that these functions cannot be used anywhere else
7676
outside of a DK function in a Numba application. Readers are referred to the
7777
OpenCL API specs to review the functionality of each function.
7878
7979
+----------------------+----------------------------+----------------------+
80-
| Numba-DPPL intrinsic | Equivalent OpenCL function | Notes |
80+
| Numba-DPPY intrinsic | Equivalent OpenCL function | Notes |
8181
+----------------------+----------------------------+----------------------+
8282
| get_global_id | get_global_id | |
8383
+----------------------+----------------------------+----------------------+
@@ -121,7 +121,7 @@ def foo(in, out):
121121
|print |print(varargs) |The print function is a |
122122
| | |subset of the OpenCL |
123123
| | |printf function. The |
124-
| | |Numba-DPPL version of |
124+
| | |Numba-DPPY version of |
125125
| | |print supports only int, |
126126
| | |string, and float |
127127
| | |arguments. |
@@ -160,16 +160,16 @@ def foo(in, out):
160160
161161
162162
163-
Complete Example using @dppl.kernel:
163+
Complete Example using @dppy.kernel:
164164
165165
---------------------------------------------------------------------------
166166
import numpy as np
167-
import numba_dppy, numba_dppy as dppl
167+
import numba_dppy, numba_dppy as dppy
168168
import dpctl
169169
170-
@dppl.kernel
170+
@dppy.kernel
171171
def data_parallel_sum(a, b, c):
172-
i = dppl.get_global_id(0)
172+
i = dppy.get_global_id(0)
173173
c[i] = a[i] + b[i]
174174
175175
def driver(device_env, a, b, c, global_size):
@@ -181,7 +181,7 @@ def driver(device_env, a, b, c, global_size):
181181
print("before : ", dA._ndarray)
182182
print("before : ", dB._ndarray)
183183
print("before : ", dC._ndarray)
184-
data_parallel_sum[global_size, dppl.DEFAULT_LOCAL_SIZE](dA, dB, dC)
184+
data_parallel_sum[global_size, dppy.DEFAULT_LOCAL_SIZE](dA, dB, dC)
185185
device_env.copy_array_from_device(dC)
186186
print("after : ", dC._ndarray)
187187
@@ -509,11 +509,11 @@ def main():
509509
if dppy_present:
510510
from .device_init import *
511511
else:
512-
raise ImportError("Importing dppl failed")
512+
raise ImportError("Importing numba-dppy failed")
513513

514514
def test(*args, **kwargs):
515515
if not dppy_present and not is_available():
516-
dppl_error()
516+
dppy_error()
517517

518518
return numba.testing.test("numba_dppy.tests", *args, **kwargs)
519519

0 commit comments

Comments
 (0)