Skip to content

Commit d75c842

Browse files
authored
Remove cython pinning to < 3.1 (#2443)
This PR reverts cython pinning added in #2441 which was added to unblock CI due to compilation error: ```bash $SRC_DIR/_skbuild/linux-x86_64-3.9/cmake-build/dpnp/dpnp_utils/dpnp_algo_utils.cxx:28898:36: error: use of undeclared identifier '__pyx_convert__to_py___pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc'; did you mean '__pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc'? 28898 | __Pyx_TraceReturnCValue(__pyx_r, __pyx_convert__to_py___pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc, 21, 0, __PYX_ERR(0, 466, __pyx_L1_error)); | ^ $SRC_DIR/_skbuild/linux-x86_64-3.9/cmake-build/dpnp/dpnp_utils/dpnp_algo_utils.cxx:2104:89: note: '__pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc' declared here 2104 | typedef struct __pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc __pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc; | ^ $SRC_DIR/_skbuild/linux-x86_64-3.9/cmake-build/dpnp/dpnp_utils/dpnp_algo_utils.cxx:28898:36: error: use of undeclared identifier '__pyx_convert__to_py___pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc'; did you mean '__pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc'? 28898 | __Pyx_TraceReturnCValue(__pyx_r, __pyx_convert__to_py___pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc, 21, 0, __PYX_ERR(0, 466, __pyx_L1_error)); | ^ $SRC_DIR/_skbuild/linux-x86_64-3.9/cmake-build/dpnp/dpnp_utils/dpnp_algo_utils.cxx:2104:89: note: '__pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc' declared here 2104 | typedef struct __pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc __pyx_ctuple_4f2d56__4dpnp_9dpnp_algo_9dpnp_algo_enum__space_DPNPFu__etc; | ^ 2 errors generated. ```
1 parent 9792685 commit d75c842

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ requirements:
1313
- python
1414
- setuptools
1515
- numpy >=1.23
16-
- cython <3.1
16+
- cython
1717
- cmake >=3.21
1818
- ninja
1919
- git

dpnp/dpnp_algo/dpnp_arraycreation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
import numpy
3333

3434
import dpnp
35-
import dpnp.dpnp_utils as utils
3635
from dpnp.dpnp_array import dpnp_array
36+
from dpnp.dpnp_utils import get_usm_allocations, map_dtype_to_device
3737

3838
__all__ = [
3939
"dpnp_geomspace",
@@ -60,7 +60,7 @@ def dpnp_geomspace(
6060
endpoint=True,
6161
axis=0,
6262
):
63-
usm_type_alloc, sycl_queue_alloc = utils.get_usm_allocations([start, stop])
63+
usm_type_alloc, sycl_queue_alloc = get_usm_allocations([start, stop])
6464

6565
if sycl_queue is None and device is None:
6666
sycl_queue = sycl_queue_alloc
@@ -77,7 +77,7 @@ def dpnp_geomspace(
7777
stop = _as_usm_ndarray(stop, _usm_type, sycl_queue_normalized)
7878

7979
dt = numpy.result_type(start, stop, float(num))
80-
dt = utils.map_dtype_to_device(dt, sycl_queue_normalized.sycl_device)
80+
dt = map_dtype_to_device(dt, sycl_queue_normalized.sycl_device)
8181
if dtype is None:
8282
dtype = dt
8383

@@ -144,7 +144,7 @@ def dpnp_linspace(
144144
retstep=False,
145145
axis=0,
146146
):
147-
usm_type_alloc, sycl_queue_alloc = utils.get_usm_allocations([start, stop])
147+
usm_type_alloc, sycl_queue_alloc = get_usm_allocations([start, stop])
148148

149149
if sycl_queue is None and device is None:
150150
sycl_queue = sycl_queue_alloc
@@ -164,7 +164,7 @@ def dpnp_linspace(
164164
stop = _as_usm_ndarray(stop, _usm_type, sycl_queue_normalized)
165165

166166
dt = numpy.result_type(start, stop, float(num))
167-
dt = utils.map_dtype_to_device(dt, sycl_queue_normalized.sycl_device)
167+
dt = map_dtype_to_device(dt, sycl_queue_normalized.sycl_device)
168168
if dtype is None:
169169
dtype = dt
170170

@@ -251,7 +251,7 @@ def dpnp_logspace(
251251
axis=0,
252252
):
253253
if not dpnp.isscalar(base):
254-
usm_type_alloc, sycl_queue_alloc = utils.get_usm_allocations(
254+
usm_type_alloc, sycl_queue_alloc = get_usm_allocations(
255255
[start, stop, base]
256256
)
257257

dpnp/dpnp_utils/dpnp_algo_utils.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ cdef tuple get_common_usm_allocation(dpnp_descriptor x1, dpnp_descriptor x2):
449449
return (common_sycl_queue.sycl_device, common_usm_type, common_sycl_queue)
450450

451451

452+
@cython.linetrace(False)
452453
cdef (DPNPFuncType, void *) get_ret_type_and_func(DPNPFuncData kernel_data,
453454
cpp_bool has_aspect_fp64):
454455
"""

environments/build_with_oneapi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- cmake
6-
- cython <3.1
6+
- cython
77
- ninja
88
- numpy
99
- pytest

0 commit comments

Comments
 (0)