Skip to content

Commit 9f3417f

Browse files
committed
Merge branch 'master' into maint/add-more-pre-commit-hooks
2 parents 39e7abb + 52ddad9 commit 9f3417f

9 files changed

Lines changed: 53 additions & 52 deletions

File tree

.github/workflows/conda-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
4141
- name: Cache conda packages
42-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
42+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
4343
env:
4444
CACHE_NUMBER: 3 # Increase to reset cache
4545
with:
@@ -105,7 +105,7 @@ jobs:
105105
conda list -n base
106106
107107
- name: Cache conda packages
108-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
108+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
109109
env:
110110
CACHE_NUMBER: 3 # Increase to reset cache
111111
with:
@@ -193,7 +193,7 @@ jobs:
193193
run: |
194194
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
195195
- name: Cache conda packages
196-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
196+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
197197
env:
198198
CACHE_NUMBER: 3 # Increase to reset cache
199199
with:
@@ -325,7 +325,7 @@ jobs:
325325
run: Get-Content -Path .\lockfile
326326

327327
- name: Cache conda packages
328-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
328+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
329329
env:
330330
CACHE_NUMBER: 3 # Increase to reset cache
331331
with:
@@ -549,7 +549,7 @@ jobs:
549549
run: |
550550
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
551551
- name: Cache conda packages
552-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
552+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
553553
env:
554554
CACHE_NUMBER: 3 # Increase to reset cache
555555
with:

.github/workflows/generate-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Cache Gtest
5858
id: cache-gtest
59-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
59+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
6060
with:
6161
path: |
6262
/home/runner/work/googletest-1.15.2/install

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ jobs:
6969

7070
# Upload the results to GitHub's code scanning dashboard.
7171
- name: "Upload to code-scanning"
72-
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
72+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
7373
with:
7474
sarif_file: results.sarif

.github/workflows/os-llvm-sycl-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
3939
- name: Cache sycl bundle
4040
id: cache-sycl-bundle
41-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
41+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
4242
with:
4343
path: |
4444
/home/runner/work/sycl_bundle

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [dev] - XXX. XX, XXXX
8+
9+
### Added
10+
11+
### Change
12+
13+
### Fixed
14+
715
## [0.22.0] - Apr. 14, 2026
816

917
The highlight of this release is the full migration of `dpctl.tensor` submodule to sister project [`dpnp`](https://github.com/IntelPython/dpnp), shrinking the size of the package tremendously, by between 93% and 96%. The `__sycl_usm_array_interface__` is still supported, with `dpctl` serving as curator of the protocol.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)
22

33
project(dpctl
4-
VERSION 0.22
4+
VERSION 0.23
55
LANGUAGES CXX
66
DESCRIPTION "Python interface for XPU programming"
77
)

docs/doc_sources/conf.py.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ if generate_multiversion == "ON":
134134
try:
135135
html_context
136136
except NameError:
137-
html_context = dict()
137+
html_context = {}
138138
html_context["display_lower_left"] = True
139139
templates_path = ["_templates"]
140140
html_context["current_version"] = release
141141
html_context["version"] = version
142142

143143
# POPULATE LINKS TO OTHER VERSIONS
144-
html_context["versions"] = list()
144+
html_context["versions"] = []
145145

146146
# Populate the list of documented versions from the doc_versions.txt
147147
versions = []

dpctl/_sycl_queue.pyx

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,8 @@ cdef DPCTLSyclEventRef _memcpy_impl(
488488
src_is_buf = True
489489
else:
490490
raise TypeError(
491-
"Parameter `src` should have either type "
492-
"`dpctl.memory._Memory` or a type that "
493-
"supports Python buffer protocol"
491+
"Parameter `src` should have either type `dpctl.memory._Memory` "
492+
"or a type that supports Python buffer protocol"
494493
)
495494

496495
if isinstance(dst, _Memory):
@@ -508,9 +507,8 @@ cdef DPCTLSyclEventRef _memcpy_impl(
508507
dst_is_buf = True
509508
else:
510509
raise TypeError(
511-
"Parameter `dst` should have either type "
512-
"`dpctl.memory._Memory` or a type that "
513-
"supports Python buffer protocol"
510+
"Parameter `dst` should have either type `dpctl.memory._Memory` "
511+
"or a type that supports Python buffer protocol"
514512
)
515513

516514
if dep_events_count == 0 or dep_events is NULL:
@@ -1592,7 +1590,8 @@ cdef class SyclQueue(_SyclQueue):
15921590
else:
15931591
raise TypeError(
15941592
"dependent_events must either None, or a sequence of "
1595-
":class:`dpctl.SyclEvent` objects")
1593+
"`dpctl.SyclEvent` objects"
1594+
)
15961595
if nDE > 0:
15971596
depEvents = (
15981597
<DPCTLSyclEventRef*>malloc(nDE*sizeof(DPCTLSyclEventRef))
@@ -1703,25 +1702,28 @@ cdef class WorkGroupMemory:
17031702
raise RuntimeError("Workgroup memory extension not available")
17041703

17051704
if not (0 < len(args) < 3):
1706-
raise TypeError("WorkGroupMemory constructor takes 1 or 2 "
1707-
f"arguments, but {len(args)} were given")
1705+
raise TypeError(
1706+
"WorkGroupMemory constructor takes 1 or 2 arguments, but "
1707+
f"{len(args)} were given"
1708+
)
17081709

17091710
if len(args) == 1:
17101711
if not isinstance(args[0], numbers.Integral):
1711-
raise TypeError("WorkGroupMemory single argument constructor"
1712-
"expects first argument to be `int`",
1713-
f"but got {type(args[0])}")
1712+
raise TypeError(
1713+
"WorkGroupMemory single argument constructor expects "
1714+
f"first argument to be `int` but got {type(args[0])}"
1715+
)
17141716
nbytes = <size_t>(args[0])
17151717
else:
17161718
if not isinstance(args[0], str):
17171719
raise TypeError(
1718-
"WorkGroupMemory constructor expects first"
1719-
f"argument to be `str`, but got {type(args[0])}"
1720+
"WorkGroupMemory constructor expects first argument to be "
1721+
f"`str`, but got {type(args[0])}"
17201722
)
17211723
if not isinstance(args[1], numbers.Integral):
17221724
raise TypeError(
1723-
"WorkGroupMemory constructor expects second"
1724-
f"argument to be `int`, but got {type(args[1])}"
1725+
"WorkGroupMemory constructor expects second argument to "
1726+
f"be `int`, but got {type(args[1])}"
17251727
)
17261728
dtype = <str>(args[0])
17271729
count = <size_t>(args[1])
@@ -1751,7 +1753,7 @@ cdef class WorkGroupMemory:
17511753

17521754

17531755
cdef class _RawKernelArg:
1754-
def __dealloc(self):
1756+
def __dealloc__(self):
17551757
if(self._arg_ref):
17561758
DPCTLRawKernelArg_Delete(self._arg_ref)
17571759

@@ -1800,14 +1802,16 @@ cdef class RawKernelArg:
18001802
raise RuntimeError("Raw kernel arg extension not available")
18011803

18021804
if not (0 < len(args) < 3):
1803-
raise TypeError("RawKernelArg constructor takes 1 or 2 "
1804-
f"arguments, but {len(args)} were given")
1805+
raise TypeError(
1806+
"RawKernelArg constructor takes 1 or 2 arguments, but "
1807+
f"{len(args)} were given"
1808+
)
18051809

18061810
if len(args) == 1:
18071811
if not _is_buffer(args[0]):
1808-
raise TypeError("RawKernelArg single argument constructor"
1809-
"expects argument to be buffer",
1810-
f"but got {type(args[0])}")
1812+
raise TypeError(
1813+
"RawKernelArg single argument constructor expects "
1814+
f"argument to be buffer but got {type(args[0])}")
18111815

18121816
ret_code = PyObject_GetBuffer(args[0], &(_buffer),
18131817
PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS)
@@ -1819,11 +1823,15 @@ cdef class RawKernelArg:
18191823
_is_buf = True
18201824
else:
18211825
if not isinstance(args[0], numbers.Integral):
1822-
raise TypeError("RawKernelArg constructor expects first"
1823-
"argument to be `int`, but got {type(args[0])}")
1826+
raise TypeError(
1827+
"RawKernelArg constructor expects first argument to be "
1828+
f"`int`, but got {type(args[0])}"
1829+
)
18241830
if not isinstance(args[1], numbers.Integral):
1825-
raise TypeError("RawKernelArg constructor expects second"
1826-
"argument to be `int`, but got {type(args[1])}")
1831+
raise TypeError(
1832+
"RawKernelArg constructor expects second argument to be "
1833+
f"`int`, but got {type(args[1])}"
1834+
)
18271835

18281836
_is_buf = False
18291837
count = args[0]

dpctl/apis/include/dpctl4pybind11.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,6 @@ namespace dpctl
4343
namespace detail
4444
{
4545

46-
// Lookup a type according to its size, and return a value corresponding to the
47-
// NumPy typenum.
48-
template <typename Concrete> constexpr int platform_typeid_lookup()
49-
{
50-
return -1;
51-
}
52-
53-
template <typename Concrete, typename T, typename... Ts, typename... Ints>
54-
constexpr int platform_typeid_lookup(int I, Ints... Is)
55-
{
56-
return sizeof(Concrete) == sizeof(T)
57-
? I
58-
: platform_typeid_lookup<Concrete, Ts...>(Is...);
59-
}
60-
6146
class dpctl_capi
6247
{
6348
public:

0 commit comments

Comments
 (0)