Skip to content

Commit 8373330

Browse files
committed
Merge branch 'master' into rename-sycl-program-sycl-kernel-bundle
2 parents 0079436 + 2216d6b commit 8373330

20 files changed

Lines changed: 76 additions & 65 deletions

.github/workflows/conda-package.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919

2020
jobs:
2121
build_linux:
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-latest
2323
timeout-minutes: 90
2424

2525
strategy:
@@ -99,7 +99,7 @@ jobs:
9999
with:
100100
fetch-depth: 0
101101

102-
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
102+
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
103103
with:
104104
miniforge-version: latest
105105
activate-environment: build
@@ -133,8 +133,7 @@ jobs:
133133
env:
134134
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
135135
run: |
136-
# TODO: roll back use of Intel channel when 2025.1 is available on conda-forge
137-
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
136+
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c conda-forge --override-channels conda-recipe
138137
139138
- name: Upload artifact
140139
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -157,7 +156,7 @@ jobs:
157156
matrix:
158157
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
159158
experimental: [false]
160-
runner: [ubuntu-22.04]
159+
runner: [ubuntu-latest]
161160
continue-on-error: ${{ matrix.experimental }}
162161

163162
steps:
@@ -244,7 +243,7 @@ jobs:
244243
245244
test_windows:
246245
needs: build_windows
247-
runs-on: ${{ matrix.runner }}
246+
runs-on: ${{ matrix.runner }}
248247
timeout-minutes: 60
249248
defaults:
250249
run:
@@ -273,7 +272,7 @@ jobs:
273272
with:
274273
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
275274

276-
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
275+
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
277276
with:
278277
miniforge-version: latest
279278
channels: conda-forge
@@ -417,7 +416,7 @@ jobs:
417416
if: |
418417
(github.repository == 'IntelPython/dpctl') &&
419418
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
420-
runs-on: ubuntu-22.04
419+
runs-on: ubuntu-latest
421420
timeout-minutes: 20
422421
strategy:
423422
matrix:
@@ -480,7 +479,7 @@ jobs:
480479
with:
481480
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
482481

483-
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
482+
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
484483
with:
485484
miniforge-version: latest
486485
channels: conda-forge
@@ -506,12 +505,12 @@ jobs:
506505

507506
test_examples_linux:
508507
needs: build_linux
509-
runs-on: ${{ matrix.runner }}
508+
runs-on: ${{ matrix.runner }}
510509
strategy:
511510
matrix:
512511
python: ['3.11']
513512
experimental: [false]
514-
runner: [ubuntu-22.04]
513+
runner: [ubuntu-latest]
515514
continue-on-error: ${{ matrix.experimental }}
516515
timeout-minutes: 60
517516
env:
@@ -572,7 +571,8 @@ jobs:
572571
- name: Install example requirements
573572
shell: bash -ex -l {0}
574573
env:
575-
DPCPP_CMPLR: "dpcpp_linux-64>=2025.0"
574+
# TODO: unpin when 2026.0 is available on conda-forge
575+
DPCPP_CMPLR: "dpcpp_linux-64>=2025.0,<2026.0"
576576
run: |
577577
CHANNELS="${{ env.CHANNELS }}"
578578
. $CONDA/etc/profile.d/conda.sh
@@ -589,7 +589,7 @@ jobs:
589589
$CHANNELS || exit 1
590590
echo "IPL installed"
591591
conda create -y -n ${{ env.BUILD_ENV_NAME }} $CHANNELS gcc_linux-64 gxx_linux-64 \
592-
${{ env.DPCPP_CMPLR }} "${DPCTL_DEPENDS}" \
592+
"${{ env.DPCPP_CMPLR }}" "${DPCTL_DEPENDS}" \
593593
"sysroot_linux-64>=2.28"
594594
echo "Compiler installed"
595595
conda list -n ${{ env.BUILD_ENV_NAME }}
@@ -599,7 +599,7 @@ jobs:
599599
source $CONDA/etc/profile.d/conda.sh
600600
CHANNELS="-c $GITHUB_WORKSPACE/channel -c dppy/label/dev -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels"
601601
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
602-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ${CHANNELS} dpctl=${PACKAGE_VERSION} dpnp || exit 1
602+
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ${CHANNELS} dpctl=${PACKAGE_VERSION} || exit 1
603603
- name: Build and run examples of pybind11 extensions
604604
shell: bash -l {0}
605605
run: |
@@ -674,7 +674,7 @@ jobs:
674674
run:
675675
shell: bash -el {0}
676676
steps:
677-
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
677+
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
678678
with:
679679
run-post: false
680680
channel-priority: "disabled"

.github/workflows/generate-coverage.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
3535
- name: Install latest Intel OneAPI
3636
run: |
37-
sudo apt install intel-oneapi-compiler-dpcpp-cpp
37+
# TODO: drop 2025.3 requirement when coverage build segfault is resolved
38+
sudo apt install intel-oneapi-compiler-dpcpp-cpp-2025.3
3839
sudo apt install intel-oneapi-tbb
3940
sudo apt install intel-oneapi-umf
4041
sudo apt install hwloc
@@ -51,7 +52,7 @@ jobs:
5152
- name: Setup Python
5253
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5354
with:
54-
python-version: '3.12'
55+
python-version: '3.14'
5556
architecture: x64
5657

5758
- name: Cache Gtest

.github/workflows/generate-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' }}
144144
env:
145145
PR_NUM: ${{ github.event.number }}
146-
uses: mshick/add-pr-comment@64b8e914979889d746c99dea15a76e77ef64580a # v3.10.0.8.3.10.0
146+
uses: mshick/add-pr-comment@8e4927817251f1ff60c001f04568532b38e0b4a0 # v3.11.0.8.3.11.0
147147
with:
148148
message: |
149149
View rendered docs @ https://intelpython.github.io/dpctl/pulls/${{ env.PR_NUM }}/index.html
@@ -152,7 +152,7 @@ jobs:
152152
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' }}
153153
env:
154154
PR_NUM: ${{ github.event.number }}
155-
uses: mshick/add-pr-comment@64b8e914979889d746c99dea15a76e77ef64580a # v3.10.0.8.3.10.0
155+
uses: mshick/add-pr-comment@8e4927817251f1ff60c001f04568532b38e0b4a0 # v3.11.0.8.3.11.0
156156
with:
157157
message: |
158158
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. :crossed_fingers:

.github/workflows/run-tests-from-dppy-bits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
run: |
9797
echo ${{ env.CHANNELS }}
9898
99-
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
99+
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
100100
with:
101101
miniforge-version: latest
102102
channels: conda-forge

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: black
1919
exclude: "versioneer.py|dpctl/_version.py"
2020
- repo: https://github.com/pycqa/isort
21-
rev: 8.0.1
21+
rev: 9.0.0a3
2222
hooks:
2323
- id: isort
2424
name: isort (python)

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_device.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ cdef class SyclDevice(_SyclDevice):
12101210
sg_sizes = DPCTLDevice_GetSubGroupSizes(
12111211
self._device_ref, &sg_sizes_len)
12121212
if (sg_sizes is not NULL and sg_sizes_len > 0):
1213-
res = list()
1213+
res = []
12141214
for i in range(sg_sizes_len):
12151215
res.append(sg_sizes[i])
12161216
DPCTLSize_t_Array_Delete(sg_sizes)

dpctl/_sycl_device_factory.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ cdef class _DefaultDeviceCache:
416416
cdef dict __device_map__
417417

418418
def __cinit__(self):
419-
self.__device_map__ = dict()
419+
self.__device_map__ = {}
420420

421421
cdef get_or_create(self):
422422
"""Return instance of SyclDevice and indicator if cache

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/_sycl_queue_manager.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ cdef class _DeviceDefaultQueueCache:
3535
cdef dict __device_queue_map__
3636

3737
def __cinit__(self):
38-
self.__device_queue_map__ = dict()
38+
self.__device_queue_map__ = {}
3939

4040
def get_or_create(self, key):
4141
"""Return instance of SyclQueue and indicator if cache

0 commit comments

Comments
 (0)