Skip to content

Commit fedc71b

Browse files
Merge pull request #1302 from IntelPython/update-for-cython-3
Update for cython 3
2 parents f0bbafc + 5d95918 commit fedc71b

File tree

16 files changed

+16
-51
lines changed

16 files changed

+16
-51
lines changed

.github/workflows/generate-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install dpctl dependencies
8080
shell: bash -l {0}
8181
run: |
82-
pip install numpy cython"<3" setuptools pytest pytest-cov scikit-build cmake coverage[toml]
82+
pip install numpy cython setuptools pytest pytest-cov scikit-build cmake coverage[toml]
8383
8484
- name: Build dpctl with coverage
8585
shell: bash -l {0}

.github/workflows/generate-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
5050
shell: bash -l {0}
5151
run: |
52-
pip install numpy cython"<3" setuptools scikit-build cmake sphinx sphinx_rtd_theme pydot graphviz sphinxcontrib-programoutput sphinxcontrib-googleanalytics
52+
pip install numpy cython setuptools scikit-build cmake sphinx sphinx_rtd_theme pydot graphviz sphinxcontrib-programoutput sphinxcontrib-googleanalytics
5353
- name: Checkout repo
5454
uses: actions/checkout@v3
5555
with:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
- name: Install dpctl dependencies
109109
shell: bash -l {0}
110110
run: |
111-
pip install numpy cython"<3" setuptools pytest scikit-build cmake
111+
pip install numpy cython setuptools pytest scikit-build cmake
112112
113113
- name: Checkout repo
114114
uses: actions/checkout@v3

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ requirements:
2020
- cmake >=3.21
2121
- ninja
2222
- git
23-
- cython <3
23+
- cython
2424
- python
2525
- scikit-build
2626
- numpy

dpctl/_backend.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ cdef extern from "syclinterface/dpctl_sycl_enum_types.h":
9595
_usm_device_allocations 'usm_device_allocations',
9696
_usm_host_allocations 'usm_host_allocations',
9797
_usm_shared_allocations 'usm_shared_allocations',
98-
_usm_restricted_shared_allocations 'usm_restricted_shared_allocations',
9998
_usm_system_allocations 'usm_system_allocations',
10099
_usm_atomic_host_allocations 'usm_atomic_host_allocations',
101100
_usm_atomic_shared_allocations 'usm_atomic_shared_allocations',

dpctl/_sycl_context.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cdef class SyclContextCreationError(Exception):
6868
pass
6969

7070

71-
cdef void _context_capsule_deleter(object o):
71+
cdef void _context_capsule_deleter(object o) noexcept:
7272
cdef DPCTLSyclContextRef CRef = NULL
7373
if pycapsule.PyCapsule_IsValid(o, "SyclContextRef"):
7474
CRef = <DPCTLSyclContextRef> pycapsule.PyCapsule_GetPointer(

dpctl/_sycl_device.pyx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -597,20 +597,6 @@ cdef class SyclDevice(_SyclDevice):
597597
cdef _aspect_type AT = _aspect_type._usm_shared_allocations
598598
return DPCTLDevice_HasAspect(self._device_ref, AT)
599599

600-
@property
601-
def has_aspect_usm_restricted_shared_allocations(self):
602-
""" Returns True if this device supports USM memory
603-
allocated as restricted USM, False otherwise.
604-
605-
Returns:
606-
bool: Indicates that the device supports USM memory allocated using
607-
``sycl::malloc_shared`` as restricted USM.
608-
609-
.. deprecated:: 0.14
610-
"""
611-
cdef _aspect_type AT = _aspect_type._usm_restricted_shared_allocations
612-
return DPCTLDevice_HasAspect(self._device_ref, AT)
613-
614600
@property
615601
def has_aspect_usm_system_allocations(self):
616602
""" Returns True if system allocator may be used instead of SYCL USM

dpctl/_sycl_event.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cdef api SyclEvent SyclEvent_Make(DPCTLSyclEventRef ERef):
7373
return SyclEvent._create(copied_ERef)
7474

7575

76-
cdef void _event_capsule_deleter(object o):
76+
cdef void _event_capsule_deleter(object o) noexcept:
7777
cdef DPCTLSyclEventRef ERef = NULL
7878
if pycapsule.PyCapsule_IsValid(o, "SyclEventRef"):
7979
ERef = <DPCTLSyclEventRef> pycapsule.PyCapsule_GetPointer(

dpctl/_sycl_queue.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cdef class SyclAsynchronousError(Exception):
121121
"""
122122

123123

124-
cdef void default_async_error_handler(int err) nogil except *:
124+
cdef void default_async_error_handler(int err) except * nogil:
125125
with gil:
126126
raise SyclAsynchronousError(err)
127127

@@ -159,7 +159,7 @@ cdef int _parse_queue_properties(object prop) except *:
159159
return res
160160

161161

162-
cdef void _queue_capsule_deleter(object o):
162+
cdef void _queue_capsule_deleter(object o) noexcept:
163163
cdef DPCTLSyclQueueRef QRef = NULL
164164
if pycapsule.PyCapsule_IsValid(o, "SyclQueueRef"):
165165
QRef = <DPCTLSyclQueueRef> pycapsule.PyCapsule_GetPointer(

dpctl/apis/include/dpctl_capi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
// Ordering of includes is important here. dpctl_sycl_types defines types
2929
// used by dpctl's Python C-API headers.
3030
#include "syclinterface/dpctl_sycl_types.h"
31+
#define CYTHON_EXTERN_C extern "C"
3132
#include "../_sycl_device.h"
3233
#include "../_sycl_device_api.h"
3334
#include "../_sycl_context.h"

0 commit comments

Comments
 (0)