Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/PyCQA/bandit
rev: '1.8.3'
rev: '1.8.6'
hooks:
- id: bandit
pass_filenames: false
args: ["-r", "dpctl", "-lll"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 25.9.0
hooks:
- id: black
exclude: "versioneer.py|dpctl/_version.py"
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
name: isort (python)
Expand All @@ -29,7 +29,7 @@ repos:
name: isort (pyi)
types: [pyi]
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/pocc/pre-commit-hooks
Expand All @@ -38,12 +38,12 @@ repos:
- id: clang-format
args: ["-i"]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
rev: v2.15.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.6
rev: v0.18.0
hooks:
- id: cython-lint
- id: double-quote-cython-strings
4 changes: 2 additions & 2 deletions docs/_legacy/generate_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" The module provides helper functions to generate API documentation for
dpctl and its members.
"""The module provides helper functions to generate API documentation for
dpctl and its members.
"""

import argparse
Expand Down
8 changes: 4 additions & 4 deletions dpctl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# limitations under the License.

"""
**Data Parallel Control (dpctl)** is a Python abstraction layer over SYCL.
**Data Parallel Control (dpctl)** is a Python abstraction layer over SYCL.

Dpctl implements a subset of SYCL's API providing wrappers for the
SYCL runtime classes described in :sycl_runtime_classes:`Section 4.6 <>` of
the :sycl_spec_2020:`SYCL 2020 spec <>`.
Dpctl implements a subset of SYCL's API providing wrappers for the
SYCL runtime classes described in :sycl_runtime_classes:`Section 4.6 <>` of
the :sycl_spec_2020:`SYCL 2020 spec <>`.
"""
__author__ = "Intel Corp."

Expand Down
18 changes: 9 additions & 9 deletions dpctl/memory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
# limitations under the License.

"""
**Data Parallel Control Memory** provides Python objects for untyped USM
memory container of bytes for each kind of USM pointers: shared pointers,
device pointers and host pointers.
**Data Parallel Control Memory** provides Python objects for untyped USM
memory container of bytes for each kind of USM pointers: shared pointers,
device pointers and host pointers.

Shared and host pointers are accessible from both host and a device,
while device pointers are only accessible from device.
Shared and host pointers are accessible from both host and a device,
while device pointers are only accessible from device.

Python objects corresponding to shared and host pointers implement
Python simple buffer protocol. It is therefore possible to use these
objects to maniputalate USM memory using NumPy or `bytearray`,
`memoryview`, or `array.array` classes.
Python objects corresponding to shared and host pointers implement
Python simple buffer protocol. It is therefore possible to use these
objects to maniputalate USM memory using NumPy or `bytearray`,
`memoryview`, or `array.array` classes.

"""
from ._memory import (
Expand Down
6 changes: 3 additions & 3 deletions dpctl/program/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# limitations under the License.

"""
**Data Parallel Control Program** provides a way to create a SYCL kernel
from either an OpenCL program represented as a string or a SPIR-V binary
file.
**Data Parallel Control Program** provides a way to create a SYCL kernel
from either an OpenCL program represented as a string or a SPIR-V binary
file.

"""
from ._program import (
Expand Down
10 changes: 5 additions & 5 deletions dpctl/tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# limitations under the License.

"""
**Data Parallel Tensor** provides an N-dimensional array container
backed by typed USM allocations and implements operations to
create and manipulate such arrays, as well as perform operations
on arrays in conformance with Python Array API standard.
**Data Parallel Tensor** provides an N-dimensional array container
backed by typed USM allocations and implements operations to
create and manipulate such arrays, as well as perform operations
on arrays in conformance with Python Array API standard.

[ArrayAPI] https://data-apis.org/array-api
[ArrayAPI] https://data-apis.org/array-api
"""

from dpctl.tensor._copy_utils import asnumpy, astype, copy, from_numpy, to_numpy
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Configures pytest to discover helper/ module
"""
"""Configures pytest to discover helper/ module"""

import os
import sys
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Helper module for dpctl/tests
"""
"""Helper module for dpctl/tests"""

from ._helper import (
create_invalid_capsule,
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for miscellaneous functions.
"""
"""Defines unit test cases for miscellaneous functions."""

import ctypes
import ctypes.util
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for the :class:`dpctl.SyclContext` class.
"""
"""Defines unit test cases for the :class:`dpctl.SyclContext` class."""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for the SyclDevice class.
"""
"""Defines unit test cases for the SyclDevice class."""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_device_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for the _sycl_device_factory module
"""
"""Defines unit test cases for the _sycl_device_factory module"""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for the SyclEvent class.
"""
"""Defines unit test cases for the SyclEvent class."""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_kernel_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for kernel submission to a sycl::queue.
"""
"""Defines unit test cases for kernel submission to a sycl::queue."""

import ctypes
import os
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for the SyclPlatform class.
"""
"""Defines unit test cases for the SyclPlatform class."""

import sys

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for the SyclProgram and SyclKernel classes
"""
"""Defines unit test cases for the SyclProgram and SyclKernel classes"""

import os

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for the SyclQueue class.
"""
"""Defines unit test cases for the SyclQueue class."""

import ctypes
import sys
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_queue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for the dpctl._sycl_queue_manager module.
"""
"""Defines unit test cases for the dpctl._sycl_queue_manager module."""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_queue_memcpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for the SyclQueue.memcpy.
"""
"""Defines unit test cases for the SyclQueue.memcpy."""

import numpy as np
import pytest
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_sycl_usm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines unit test cases for the Memory classes in _memory.pyx.
"""
"""Defines unit test cases for the Memory classes in _memory.pyx."""

import numpy as np
import pytest
Expand Down
3 changes: 1 addition & 2 deletions dpctl/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" Defines unit test cases for utility functions.
"""
"""Defines unit test cases for utility functions."""

import pytest

Expand Down
3 changes: 1 addition & 2 deletions examples/python/device_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Examples illustrating SYCL device selection features provided by dpctl.
"""
"""Examples illustrating SYCL device selection features provided by dpctl."""

import dpctl

Expand Down
3 changes: 1 addition & 2 deletions examples/python/filter_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Examples illustrating SYCL device selection using filter strings.
"""
"""Examples illustrating SYCL device selection using filter strings."""

import dpctl

Expand Down
3 changes: 1 addition & 2 deletions examples/python/lsplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Demonstrates SYCL queue selection operations provided by dpctl.
"""
"""Demonstrates SYCL queue selection operations provided by dpctl."""

import dpctl

Expand Down
Loading