Skip to content

Commit 11cc2b6

Browse files
committed
Update with proposed suggestions
1 parent d114eac commit 11cc2b6

File tree

7 files changed

+26
-29
lines changed

7 files changed

+26
-29
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ of `dpctl`
3232

3333
### C/C++ Code Style
3434

35-
We use a [clang-format](https://clang.llvm.org/docs/ClangFormat.html) code formatter.
35+
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) for C++ code formatting.
3636

3737
To install, run:
3838
```bash
3939
conda install clang-tools
4040
```
41-
Revision: `10.0.1`
4241

4342
See the default configuration used by dpctl in `.clang-format`.
4443

@@ -54,19 +53,18 @@ clang-format -style=file -i \
5453
libsyclinterface/helper/source/*.cpp
5554
```
5655

57-
> **NOTE:** It is easier to use `pre-commit` and the `clang-format` hook.
56+
> **:** It is easier to use `pre-commit` and the `clang-format` hook.
5857
5958
### Python Code Style
6059

6160
We use the following Python code style tools:
6261
- [black](https://black.readthedocs.io/en/stable/) code formatter.
63-
- Revision: `22.3.0`.
6462
- [flake8](https://flake8.pycqa.org/en/latest/) linter.
65-
- Revision `4.0.1`.
6663
- [isort](https://pycqa.github.io/isort/) import sorter.
67-
- Revision `5.10.1`.
6864

69-
> **NOTE:** Refer `pyproject.toml` and `.flake8` config files for current configurations.
65+
> **NOTE:** Refer:
66+
> * `pyproject.toml` and `.flake8` config files for current configurations
67+
> * `.pre-commit-config.yaml` file for the versions of the tools
7068
7169
Run these three tools before each commit.
7270

@@ -116,13 +114,13 @@ The standard header looks like this:
116114
```
117115
---
118116
> **NOTE:**
119-
- The `-*- C++ -*-` string on the first line tells Emacs* that
117+
>- The `-*- C++ -*-` string on the first line tells Emacs* that
120118
it is a C++ file. The string is only needed for `*.h` headers and
121119
should be omitted for `*.cpp` files. Without the string, Emacs* assumes the
122120
file is a C header.
123-
- The copyright year must be updated every calendar year.
124-
- Each comment line should be a max of 80 chars.
125-
- A Doxygen `\file` tag describing the contents of the file must be provided.
121+
>- The copyright year must be updated every calendar year.
122+
>- Each comment line should be a max of 80 chars.
123+
>- A Doxygen `\file` tag describing the contents of the file must be provided.
126124
Note that the `\file` tag is inside a Doxygen comment block. It is
127125
defined by the `///` comment marker instead of the `//` comment marker used in the
128126
rest of the header.
@@ -166,7 +164,7 @@ To install, run:
166164
pip install bandit
167165
```
168166

169-
Revision: `1.7.0`
167+
Bandit revision used: `1.7.0`
170168

171169
Before each commit, run:
172170
```bash
@@ -211,8 +209,8 @@ To check the code coverage for your code, follow these steps:
211209
`setup.py`.
212210

213211
The coverage results for the C and Python* sources are printed to the
214-
terminal during the build (C API) and pytest execution (Python*).
215-
The detailed coverage reports for the C API are saved to the
212+
terminal during the build (`libsyclinterface`) and pytest execution (Python*).
213+
The detailed coverage reports for the `libsyclinterface` library are saved to the
216214
`dpctl-c-api-coverage` directory. The Python* coverage reports are saved to
217215
the `htmlcov` directory.
218216

@@ -234,7 +232,7 @@ To check the code coverage for your code, follow these steps:
234232

235233
## Error Reporting and Logging
236234

237-
The SyclInterface library responds to the `DPCTL_VERBOSITY` environment variable that controls the severity level of errors printed to the console.
235+
The `libsyclinterface` library responds to the `DPCTL_VERBOSITY` environment variable that controls the severity level of errors printed to the console.
238236
Specify one of the following severity levels (in increasing order of severity): `warning` and `error` by running:
239237

240238
```bash
@@ -260,7 +258,7 @@ conda install glog
260258
python scripts/build_locally.py --oneapi --glog
261259
```
262260

263-
3. Use `dpctl._diagnostics.syclinterface_diagnostics(verbosity="warning", log_dir=None)` context manager to switch library diagnostics on for a block of a Python* code.
261+
3. Use the `dpctl._diagnostics.syclinterface_diagnostics(verbosity="warning", log_dir=None)` context manager to switch library diagnostics on for a block of a Python* code.
264262
Use `DPCTLService_InitLogger` and `DPCTLService_ShutdownLogger` library C functions during library development to initialize Google's logging library and de-initialize accordingly:
265263
266264
```python

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ The compute kernel can be a code:
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
24-
classes](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes).
25-
Such classes allow users to:
24+
classes](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes) that allow users to:
2625
* query platforms
2726
* discover and represent devices and sub-devices
2827
* construct contexts and queues
@@ -98,7 +97,7 @@ setting up a development environment and building `dpctl` from the source.
9897

9998
Find our examples [here](examples).
10099

101-
To build these examples, run:
100+
To run these examples, use:
102101

103102
```bash
104103
for script in `ls examples/python/`;

docs/docfiles/user_guides/QuickStart.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ On Windows* OS
4848
Install the Wheel Package from PyPi*
4949
====================================
5050

51-
To install Dpctl from PyPi*, run:
51+
To install dpctl from PyPi*, run:
5252

5353
.. code-block:: bash
5454
@@ -77,7 +77,7 @@ On Windows* OS
7777
Building from the Source
7878
========================
7979

80-
To build dpctl from the source, you need dpcpp and GPU drivers, optionally CPU
80+
To build dpctl from the source, you need dpcpp and GPU drivers, and optionally CPU
8181
OpenCL drivers. It is preferable to use the dpcpp compiler packaged as part of
8282
oneAPI. However, it is possible to use a custom build of dpcpp to build dpctl,
8383
especially if you want to enable CUDA* support.
@@ -86,7 +86,7 @@ Building using oneAPI dpcpp
8686
---------------------------
8787

8888
Install oneAPI and graphics drivers to the system prior
89-
to proceed further.
89+
to proceeding further.
9090

9191
Activate oneAPI
9292
~~~~~~~~~~~~~~~
@@ -242,10 +242,10 @@ You can execute the dpctl Python* test suite as follow:
242242
pytest --pyargs dpctl
243243
244244
245-
Building the DPCTLSyclInterface Library
245+
Building the libsyclinterface Library
246246
=======================================
247247

248-
The libDPCTLSyclInterface is a shared library used by the Python* package.
248+
The libsyclinterface is a shared library used by the Python* package.
249249
To build the library, you need:
250250

251251
* ``DPC++`` toolchain

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ This section introduces the basic concepts for XPU management used by `dpctl`.
3737
* **Queue**
3838
A queue is needed to schedule the execution of any computation or data
3939
copying on the device. Queue construction requires specifying a device
40-
and contextual targeting that device as well as additional properties,
40+
and a context targeting that device as well as additional properties,
4141
such as whether profiling information should be collected or submitted
4242
tasks are executed in the order in which they were submitted.
4343

4444
* **Event**
4545
Holds information related to computation or data movement operation
46-
scheduled for the execution on a queue. That can be its execution status or
46+
scheduled for the execution on a queue. An event can store the execution status or
4747
profiling information if the queue, to which the task is submitted, is allowed
4848
for the collection of such information. Events can be used to specify task
4949
dependencies or to synchronize host and devices.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ of hardware properties that may be used for device selection.
144144
.. Note::
145145
A **root** device implies an unpartitioned device. A root device can be
146146
partitioned into two or more :ref:`sub-devices <sec-devices-sub-devices>`
147-
based on various criteria. For example, a CPU device with multiple NUMA*
147+
based on various criteria. For example, a CPU device with multiple NUMA
148148
domains may be partitioned into multiple sub-devices, each representing a
149149
sub-device.
150150

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Several types of partitioning schemes are available:
137137
architectural hierarchy.
138138

139139
The following example shows an affinity-based partitioning of a CPU device
140-
into sub-devices based on the available NUMA* domains:
140+
into sub-devices based on the available NUMA domains:
141141

142142
.. _fig-partition-cpu:
143143

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ used is created with the ``enable_profiling`` property and only becomes availabl
9898
after the task execution is complete.
9999

100100
The :class:`dpctl.SyclTimer` class implements a Python context manager.
101-
You can use this manager to collect cumulative profiling information for all the tasks submitted
101+
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

104104
.. code-block:: python

0 commit comments

Comments
 (0)