Skip to content

Commit 8db38c0

Browse files
authored
Fix leftover PyDPPL use and add/update copyright notices. (#57)
* Fix leftover PyDPPL use, and add/update copyright notices. * Fix names in docstrings.
1 parent a7e498b commit 8db38c0

File tree

7 files changed

+76
-42
lines changed

7 files changed

+76
-42
lines changed

dpctl/__init__.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1+
##===----------------- _memory.pyx - dpctl module -------*- Cython -*------===##
2+
##
3+
## Data Parallel Control (dpCtl)
4+
##
5+
## Copyright 2020 Intel Corporation
6+
##
7+
## Licensed under the Apache License, Version 2.0 (the "License");
8+
## you may not use this file except in compliance with the License.
9+
## You may obtain a copy of the License at
10+
##
11+
## http://www.apache.org/licenses/LICENSE-2.0
12+
##
13+
## Unless required by applicable law or agreed to in writing, software
14+
## distributed under the License is distributed on an "AS IS" BASIS,
15+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
## See the License for the specific language governing permissions and
17+
## limitations under the License.
18+
##
19+
##===----------------------------------------------------------------------===##
20+
##
21+
## \file
22+
## This top-level dpctl module.
23+
##
24+
##===----------------------------------------------------------------------===##
125
'''
2-
Python Data Parallel Processing Library (PyDPPL)
26+
Data Parallel Control (dpCtl)
327
4-
PyDPPL provides a lightweight Python abstraction over DPC++/SYCL and
28+
dpCtl provides a lightweight Python abstraction over DPC++/SYCL and
529
OpenCL runtime objects. The DPC++ runtime wrapper objects can be
630
accessed by importing dpctl. The OpenCL runtime wrapper objects can be
731
accessed by importing dpctl.ocldrv. The library is in an early-beta
832
stage of development and not yet ready for production usage.
933
10-
PyDPPL's intended usage is as a common SYCL interoperability layer for
34+
dpCtl's intended usage is as a common SYCL interoperability layer for
1135
different Python libraries and applications. The OpenCL support inside
1236
PyDPPL is slated to be deprecated and then removed in future releases
1337
of the library.
1438
1539
Currently, only a small subset of DPC++ runtime objects are exposed
16-
through the dpctl module. The main API classes inside the dpctl module are:
17-
18-
Runtime: The class stores a global SYCL queue and a stack of
19-
currently activated queues. Runtime provides a special getter
20-
method to retrieve the currently activated SYCL queue
21-
as a Py_capsule.
22-
23-
A single global thread local instance of the Runtime class
24-
is created on loading the dpctl module for the first time.
25-
26-
DeviceArray: A DeviceArray object encapsulates a one-dimensional
27-
cl::sycl::buffer object. A DeviceArray object can be
28-
created using a NumPy ndarray. The initial implementation
29-
of DeviceArray follows NumPy's recommended design to create
30-
a custom array container. DeviceArray does not implement
31-
the __array_function__ and the __array_ufunc__ interfaces.
32-
Therefore, DeviceArray does not support NumPy Universal
33-
functions (ufuncs). The design decision to not support
34-
ufuncs can be revisited later if we have a need for such
35-
functionality. For the time being, the class is only meant
36-
as a data exchange format between Python libraries that
37-
use SYCL.
38-
39-
Global data members:
40-
runtime - An instance of the Runtime class.
40+
through the dpctl module. The main API classes are defined in the _sycl_core.pyx file.
4141
4242
Please use `pydoc dpctl._sycl_core` to look at the current API for dpctl.
4343

dpctl/_memory.pyx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
##===--------------- _memory.pyx - dpctl module --------*- Cython -*-------===##
2+
##
3+
## Data Parallel Control (dpCtl)
4+
##
5+
## Copyright 2020 Intel Corporation
6+
##
7+
## Licensed under the Apache License, Version 2.0 (the "License");
8+
## you may not use this file except in compliance with the License.
9+
## You may obtain a copy of the License at
10+
##
11+
## http://www.apache.org/licenses/LICENSE-2.0
12+
##
13+
## Unless required by applicable law or agreed to in writing, software
14+
## distributed under the License is distributed on an "AS IS" BASIS,
15+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
## See the License for the specific language governing permissions and
17+
## limitations under the License.
18+
##
19+
##===----------------------------------------------------------------------===##
20+
##
21+
## \file
22+
## This file implements Python buffer protocol using Sycl USM shared and host
23+
## allocators. The USM device allocator is also exposed through this module for
24+
## use in other Python modules.
25+
##
26+
##===----------------------------------------------------------------------===##
27+
28+
# distutils: language = c++
29+
# cython: language_level=3
30+
131
import dpctl
232
from dpctl.backend cimport *
333
from ._sycl_core cimport SyclContext, SyclQueue

dpctl/_sycl_core.pxd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##===------------- sycl_core.pxd - DPPL interface ------*- Cython -*-------===##
1+
##===------------- sycl_core.pxd - dpctl module --------*- Cython -*-------===##
22
##
3-
## Python Data Parallel Processing Library (PyDPPL)
3+
## Data Parallel Control (dpCtl)
44
##
55
## Copyright 2020 Intel Corporation
66
##
@@ -19,9 +19,11 @@
1919
##===----------------------------------------------------------------------===##
2020
##
2121
## \file
22-
## This file defines the Cython interface for the Sycl API of PyDPPL.
22+
## This file declares the extension types and functions for the Cython API
23+
## implemented in sycl_core.pyx.
2324
##
2425
##===----------------------------------------------------------------------===##
26+
2527
# distutils: language = c++
2628
# cython: language_level=3
2729

dpctl/backend.pxd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##===------------- backend.pyx - DPPL interface ------*- Cython -*-------===##
1+
##===------------- backend.pyx - dpctl module -------*- Cython -*----------===##
22
##
3-
## Python Data Parallel Processing Library (PyDPPL)
3+
## Data Parallel Control (dpCtl)
44
##
55
## Copyright 2020 Intel Corporation
66
##
@@ -19,9 +19,11 @@
1919
##===----------------------------------------------------------------------===##
2020
##
2121
## \file
22-
## This file defines the Cython interface for the backend API of PyDPPL.
22+
## This file defines the Cython extern types for the functions and opaque data
23+
## types defined by dpctl's C API.
2324
##
2425
##===----------------------------------------------------------------------===##
26+
2527
# distutils: language = c++
2628
# cython: language_level=3
2729

dpctl/ocldrv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##===---------- ocldrv.py - dpctl.ocldrv interface -----*- Python -*-----===##
1+
##===------------- ocldrv.py - dpctl.ocldrv module ------*- Python -*------===##
22
##
3-
## Python Data Parallel Processing Library (PyDPPL)
3+
## Data Parallel Control (dpCtl)
44
##
55
## Copyright 2020 Intel Corporation
66
##
@@ -20,7 +20,7 @@
2020
###
2121
### \file
2222
### This file exposes Python classes for different OpenCL classes that are
23-
### exposed by the _dppl_binding CFFI extension module.
23+
### exposed by the _opencl_core CFFI extension module.
2424
##===----------------------------------------------------------------------===##
2525
''' The dpctl.ocldrv module contains a set of Python wrapper classes for
2626
OpenCL objects. The module has wrappers for cl_context, cl_device,

dpctl/opencl_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##===--------- opencl_core.py - dpctl.ocldrv interface -----*- Python -*----===##
1+
##===--------- opencl_core.py - dpctl.ocldrv interface -----*- Python -*---===##
22
##
3-
## Python Data Parallel Processing Library (PyDPPL)
3+
## Data paraller Control (dpctl)
44
##
55
## Copyright 2020 Intel Corporation
66
##

dpctl/sycl_core.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##===------------- sycl_core.pyx - DPPL interface ------*- Cython -*-------===##
1+
##===------------- sycl_core.pyx - dpctl module -------*- Cython -*--------===##
22
##
3-
## Python Data Parallel Processing Library (PyDPPL)
3+
## Data Parallel Control (dpCtl)
44
##
55
## Copyright 2020 Intel Corporation
66
##
@@ -19,7 +19,7 @@
1919
##===----------------------------------------------------------------------===##
2020
##
2121
## \file
22-
## This file implements the Cython interface for the Sycl API of PyDPPL.
22+
## This file implements a sub-set of Sycl's interface using dpctl's CAPI.
2323
##
2424
##===----------------------------------------------------------------------===##
2525

0 commit comments

Comments
 (0)