Skip to content

Commit 3af9993

Browse files
Ran pre-commit run --all on changes in PR
1 parent 241b98c commit 3af9993

File tree

13 files changed

+51
-52
lines changed

13 files changed

+51
-52
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ We use the following Python code style tools:
6666
> * `pyproject.toml` and `.flake8` config files for current configurations
6767
> * `.pre-commit-config.yaml` file for the versions of the tools
6868
69-
Run these three tools before each commit.
69+
Run these three tools before each commit.
7070

7171
> **TIP:** Refer your IDE docs to automate these checks or set up `pre-commit` to add git hooks.
7272
7373
### Setting Up a Pre-commit
74-
74+
7575
A `.pre-commit-config.yaml` is included to run various checks before you
76-
commit your code.
76+
commit your code.
7777

7878
To setup `pre-commit` in your workflow, install:
7979

@@ -176,7 +176,7 @@ bandit -r dpctl -lll
176176
Code coverage, for both C and Python sources in dpctl, is generated for each
177177
pull request (PR). A PR cannot be merged if it leads to a drop in the code
178178
coverage by more than five percentage points. Therefore, write
179-
unit tests for your changes.
179+
unit tests for your changes.
180180

181181
To check the code coverage for your code, follow these steps:
182182

@@ -242,7 +242,7 @@ Messages of a given severity are shown not only in the console for that severity
242242

243243
### Optional use of the Google logging library (glog)
244244

245-
The dpctl error handler for libsyclinterface can be optionally configured to use [glog](https://github.com/google/glog).
245+
The dpctl error handler for libsyclinterface can be optionally configured to use [glog](https://github.com/google/glog).
246246

247247
To use glog, complete the following steps:
248248

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ kernel](https://en.wikipedia.org/wiki/Compute_kernel) on an
1616

1717
The compute kernel can be a code:
1818
* written by the user, e.g., using [`numba-dpex`](https://github.com/IntelPython/numba-dpex)
19-
* that is part of a library, such as oneMKL
19+
* that is part of a library, such as oneMKL
2020

2121
The `dpctl` library is built upon the [SYCL
2222
standard](https://www.khronos.org/sycl/). It also implements Python
2323
bindings for a subset of the standard [runtime
2424
classes](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes) that allow users to:
2525
* query platforms
2626
* discover and represent devices and sub-devices
27-
* construct contexts and queues
27+
* construct contexts and queues
2828

2929
`dpctl` features classes for [SYCL Unified Shared Memory
3030
(USM)](https://link.springer.com/chapter/10.1007/978-1-4842-5574-2_6)
@@ -37,7 +37,7 @@ devices, queues, memory, and tensors.
3737

3838
`Dpctl` is the core part of a larger family of [data-parallel Python
3939
libraries and tools](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
40-
to program on XPUs.
40+
to program on XPUs.
4141

4242

4343

@@ -51,7 +51,7 @@ Python](https://software.intel.com/content/www/us/en/develop/tools/oneapi/compon
5151

5252
## Inte(R) oneAPI
5353

54-
You can find the most recent release of `dpctl` every quarter as part of the Intel(R) oneAPI releases.
54+
You can find the most recent release of `dpctl` every quarter as part of the Intel(R) oneAPI releases.
5555

5656
To get the library from the latest oneAPI release, follow the
5757
instructions from Intel(R) [oneAPI installation
@@ -95,14 +95,14 @@ setting up a development environment and building `dpctl` from the source.
9595

9696
# Running Examples
9797

98-
Find our examples [here](examples).
98+
Find our examples [here](examples).
9999

100100
To run these examples, use:
101101

102102
```bash
103-
for script in `ls examples/python/`;
104-
do echo "executing ${script}";
105-
python examples/python/${script};
103+
for script in `ls examples/python/`;
104+
do echo "executing ${script}";
105+
python examples/python/${script};
106106
done
107107
```
108108

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ instructions to install `liblua`. For example, on Ubuntu 20.04:
2929
sudo apt-get install liblua5.2-dev
3030
```
3131

32-
Generating The Documentation
32+
Generating The Documentation
3333
============================
3434

3535
The helper script ``scripts/gen_docs.py`` is the preferred way to generate the

docs/docfiles/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The data-parallel control (dpctl) library provides C and Python bindings for
55
:sycl_spec_2020:`SYCL 2020 <>`. The SYCL 2020 features supported by dpctl are
66
limited to those included by Intel(R) DPCPP compiler and specifically cover the
77
SYCL runtime classes described in :sycl_runtime_classes:`Section 4.6 <>`
8-
of the SYCL 2020 specification.
8+
of the SYCL 2020 specification.
99

1010
Apart from the bindings for these runtime
1111
classes, dpctl includes bindings for SYCL USM memory allocators and

docs/docfiles/user_guides/QuickStart.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Installation from oneAPI
88
========================
99

1010
Dpctl is available as part of the oneAPI Intel(R) Distribution for Python (IDP).
11-
Refer to `Intel(R) oneAPI Toolkits Installation Guide <https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html>`_
12-
to install it.
11+
Refer to `Intel(R) oneAPI Toolkits Installation Guide <https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html>`_
12+
to install it.
1313

1414
In this topic, it is assumed that oneAPI is installed in the standard location and the
1515
environment variable ``ONEAPI_ROOT`` points to the following installation root
@@ -88,7 +88,7 @@ Building using oneAPI dpcpp
8888
Install oneAPI and graphics drivers to the system prior
8989
to proceeding further.
9090

91-
Activate oneAPI
91+
Activate oneAPI
9292
~~~~~~~~~~~~~~~
9393

9494
On Linux OS
@@ -177,7 +177,7 @@ Building Using Custom dpcpp
177177
---------------------------
178178

179179
You can build dpctl from the source using the `DPC++ toolchain <https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md>`_
180-
instead of the DPC++ compiler that comes with oneAPI.
180+
instead of the DPC++ compiler that comes with oneAPI.
181181

182182
Do this, to enable support for CUDA devices.
183183

@@ -224,11 +224,11 @@ After setting up dpctl, you can test the Python examples as follows:
224224
python examples/python/${script}
225225
done
226226
227-
The dpctl repository also provides a set of `examples <https://github.com/IntelPython/dpctl/tree/master/examples/cython>`_
227+
The dpctl repository also provides a set of `examples <https://github.com/IntelPython/dpctl/tree/master/examples/cython>`_
228228
of building the Cython extensions with the DPC++ compiler, that interoperates with dpctl.
229229

230230
To build each example, use
231-
``CC=icx CXX=dpcpp python setup.py build_ext --inplace``.
231+
``CC=icx CXX=dpcpp python setup.py build_ext --inplace``.
232232
Refer to the ``run.py`` script in respective folders to execute the Cython extension
233233
examples.
234234

@@ -246,7 +246,7 @@ Building the libsyclinterface Library
246246
=======================================
247247

248248
The libsyclinterface is a shared library used by the Python package.
249-
To build the library, you need:
249+
To build the library, you need:
250250

251251
* ``DPC++`` toolchain
252252
* ``cmake``
@@ -280,4 +280,3 @@ library.
280280
..
281281
282282
make V=1 -n -j 4 && make check && make install
283-

docs/docfiles/user_guides/manual/dpctl/basic_concepts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This section introduces the basic concepts for XPU management used by `dpctl`.
6868
"Host allocation", "Yes", "Accessible by both the host and device."
6969

7070

71-
Runtime manages synchronization of the host's and device's view into shared allocations.
71+
Runtime manages synchronization of the host's and device's view into shared allocations.
7272
The initial placement of the shared allocations is not defined.
7373

7474
* **Backend**

docs/docfiles/user_guides/manual/dpctl/device_selection.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ device selection involves the usage of *filter strings*. Refer to
5555

5656
The :ref:`fig-gpu-device-selection` example also demonstrates the usage of a filter string
5757
to create a GPU device directly. Using a filter string allows much more
58-
fine-grained control for selecting a device.
58+
fine-grained control for selecting a device.
5959

6060
The following :ref:`fig-filter-selection`
6161
example demonstrates the usage of the device selection using filter
@@ -93,7 +93,7 @@ A possible output for the :ref:`fig-adv-device-selection` example:
9393

9494

9595
A **filter string** is a three-tuple that may specify the *backend*,
96-
*device type*, and *device number* as a colon (:) separated string.
96+
*device type*, and *device number* as a colon (:) separated string.
9797

9898
.. csv-table::
9999
:header: "String", "Usage", "Values"
@@ -103,19 +103,19 @@ A **filter string** is a three-tuple that may specify the *backend*,
103103
"*device type*", "Specifies the type of device.", "``host``, ``gpu``, ``cpu``, ``accelerator``"
104104
"*device number*", "Specifies the ordinality of the device in the listing of devices as determined by the SYCL* runtime.", "Numeric value"
105105

106-
The backend, device type, and device number value are optional but provide at least one of them.
106+
The backend, device type, and device number value are optional but provide at least one of them.
107107
That is, ``opencl:gpu:0``, ``gpu:0``, ``gpu``, ``0``, and ``opencl:0`` are all valid filter strings.
108108

109109
The device listing including the ``device number value`` remains stable for
110110
a given system unless the driver configuration is changed or the SYCL
111-
runtime setting is changed using the ``SYCL_DEVICE_FILTER`` environment variable.
111+
runtime setting is changed using the ``SYCL_DEVICE_FILTER`` environment variable.
112112
Refer to :oneapi_filter_selection:`oneAPI filter selection extension <>` for more
113113
information.
114114

115115
Advanced Device Selection
116116
-------------------------
117117

118-
Real-world applications may require more precise control over device selection.
118+
Real-world applications may require more precise control over device selection.
119119
Dpctl helps you to accomplish more advanced device selection.
120120

121121
.. _fig-custom-device-selection:
@@ -129,12 +129,12 @@ Dpctl helps you to accomplish more advanced device selection.
129129
The :ref:`fig-custom-device-selection` example shows a way of selecting a device
130130
based on a specific hardware property. The process is the following:
131131

132-
1. The :func:`dpctl.get_devices()` returns a list of all *root* devices on the system.
132+
1. The :func:`dpctl.get_devices()` returns a list of all *root* devices on the system.
133133
2. Out of that list the devices that
134-
support half-precision floating-point arithmetic are selected.
134+
support half-precision floating-point arithmetic are selected.
135135
3. A "score" computed using the SYCL8 runtime's default device scoring logic that is
136136
stored in :attr:`dpctl.SyclDevice.default_selector_score` is used to select a
137-
single device.
137+
single device.
138138

139139
Refer to the :class:`dpctl.SyclDevice` documentation for a list
140140
of hardware properties that may be used for device selection.

docs/docfiles/user_guides/manual/dpctl/devices.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The :class:`dpctl.SyclDevice` class includes the default constructor to create a
1616
explicit :ref:`filter selector strings <sec-filter-selection>` to create a
1717
device.
1818

19-
.. note:: Refer to :ref:`device_selection` for more information.
19+
.. note:: Refer to :ref:`device_selection` for more information.
2020

2121
Listing Devices
2222
---------------
@@ -40,10 +40,10 @@ A possible output for the :ref:`fig-listing-devices` example:
4040
.. program-output:: python ../examples/python/device_selection.py -r list_devices
4141

4242
The :ref:`fig-listing-devices` example demonstrates the usage of
43-
:func:`dpctl.get_devices`.
43+
:func:`dpctl.get_devices`.
4444

4545
You can filter the list based on the
46-
:class:`dpctl.backend` and :class:`dpctl.device_type`.
46+
:class:`dpctl.backend` and :class:`dpctl.device_type`.
4747

4848
The 0-based ordinal position of a device in the output of :func:`dpctl.get_devices` corresponds to
4949
the ``device id`` value in the filter selector string corresponding to the
@@ -69,7 +69,7 @@ its hardware characteristics:
6969
* :sycl_device_info:`information descriptors <>` are non-boolean characteristics
7070
that provide more verbose information about the device
7171
* :class:`dpctl.SyclDevice` exposes various Python properties that describe a
72-
device's aspects and information descriptors.
72+
device's aspects and information descriptors.
7373

7474
For example, the property ``has_aspect_fp16`` returns a boolean expression indicating if:
7575

@@ -105,18 +105,18 @@ list all the aspects and information descriptor properties in
105105
Sub-devices
106106
-----------
107107

108-
You can partition a device into sub-devices.
108+
You can partition a device into sub-devices.
109109

110-
A sub-device represents a subset of the computational units within a device
111-
that are grouped based on some hardware criteria. For example, you can partition a two-socket
110+
A sub-device represents a subset of the computational units within a device
111+
that are grouped based on some hardware criteria. For example, you can partition a two-socket
112112
CPU into two sub-devices, where each sub-device represents a separate
113113
:numa_domain:`NUMA domain <>`. Depending on the hardware characteristics and
114114
the capabilities of the SYCL runtime, a sub-device may be partitioned further.
115115

116116
For devices that support partitioning, you can use
117117
:func:`dpctl.SyclDevice.create_sub_devices` to create a list of
118118
sub-devices. The requested partitioning scheme is indicated with the usage of the
119-
required ``partition`` keyword.
119+
required ``partition`` keyword.
120120

121121
Several types of partitioning schemes are available:
122122

docs/docfiles/user_guides/manual/dpctl/platforms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Listing Available Platforms
1212
---------------------------
1313

1414
To require the platforms available on a system, use
15-
:func:`dpctl.lsplatform` function.
15+
:func:`dpctl.lsplatform` function.
1616

1717
It is possible to print out metadata about a platform:
1818

docs/docfiles/user_guides/manual/dpctl/queues.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Queue
55
#####
66

77
You need a queue to schedule the execution of any computation or data copying on a
8-
device.
8+
device.
99

1010
The queue construction requires specifying:
1111

@@ -23,12 +23,12 @@ Types of Queues
2323

2424
SYCL has a task-based execution model. The order, in which a SYCL runtime
2525
executes a task on a target device, is specified by a sequence of events that
26-
must be completed before the execution of the task is allowed.
26+
must be completed before the execution of the task is allowed.
2727

2828
Submission of a task returns an event that you can use to further grow the graph of computational
2929
tasks. A SYCL queue stores the needed data to manage the scheduling operations.
3030

31-
There are two types of queues:
31+
There are two types of queues:
3232

3333
* **Out-of-order.** Unless specified otherwise during the constriction of a queue, a SYCL runtime
3434
executes tasks, which dependencies are met in an unspecified order, with the
@@ -42,7 +42,7 @@ Creating a New Queue
4242
--------------------
4343

4444
:class:`dpctl.SyclQueue(ctx, dev, property=None)` creates a new queue instance
45-
for the given compatible context and device.
45+
for the given compatible context and device.
4646

4747
To create the **in-order** queue, set a keyword ``parametr`` to ``in_order``
4848

@@ -86,7 +86,7 @@ Profiling a Task Submitted to a Queue
8686
-------------------------------------
8787

8888
The result of scheduling the execution of a task on a queue is an event. You can use
89-
an event for several purposes:
89+
an event for several purposes:
9090

9191
* Query for the status of the task execution
9292
* Order execution of future tasks after it is completed
@@ -97,7 +97,7 @@ The profiling information is only populated if the queue
9797
used is created with the ``enable_profiling`` property and only becomes available
9898
after the task execution is complete.
9999

100-
The :class:`dpctl.SyclTimer` class implements a Python context manager.
100+
The :class:`dpctl.SyclTimer` class implements a Python context manager.
101101
You can use this context manager to collect cumulative profiling information for all the tasks submitted
102102
to the queue of interest by functions executed within the context:
103103

examples/cython/sycl_direct_linkage/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Example of sycl_direct_linkage Usage
22

3-
This Cython extension does not directly use dpctl and links to SYCL.
3+
This Cython extension does not directly use dpctl and links to SYCL.
44
It exposes the `columnwise_total` function that uses oneMKL to compute
5-
totals for each column of its argument matrix in double precision
5+
totals for each column of its argument matrix in double precision
66
expected as an ordinary NumPy array in a C-contiguous layout.
77

88
This function performs the following steps:

examples/pybind11/onemkl_gemv/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
# SYCL Build Pybind11 Extension
33

4-
## Building
4+
## Building
55

66
> **NOTE:** Install scikit-build and dpcpp before next steps.
77
8-
To build, run:
8+
To build, run:
99
```sh
1010
python setup.py develop -- -G "Ninja" \
1111
-DCMAKE_C_COMPILER:PATH=icx \

examples/pybind11/use_dpctl_syclqueue/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ such as ``dpctl.SyclQueue``, in Pybind11
77
extensions.
88

99

10-
## Building
10+
## Building
1111

1212
To build the extension, run:
1313
```

0 commit comments

Comments
 (0)