1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
diff --git a/conda/recipes/pylibraft/recipe.yaml b/conda/recipes/pylibraft/recipe.yaml
index 92d0590f4c..640ebc5678 100644
--- a/conda/recipes/pylibraft/recipe.yaml
+++ b/conda/recipes/pylibraft/recipe.yaml
@@ -52,7 +52,7 @@ requirements:
- ${{ stdlib("c") }}
host:
- cuda-version =${{ cuda_version }}
- - cython >=3.0.0,<3.1.0a0
+ - cython >=3.0.0
- libraft =${{ version }}
- libraft-headers =${{ version }}
- pip
diff --git a/conda/recipes/raft-dask/recipe.yaml b/conda/recipes/raft-dask/recipe.yaml
index 92626092d0..0d10ece8b1 100644
--- a/conda/recipes/raft-dask/recipe.yaml
+++ b/conda/recipes/raft-dask/recipe.yaml
@@ -52,7 +52,7 @@ requirements:
- ${{ stdlib("c") }}
host:
- cuda-version =${{ cuda_version }}
- - cython >=3.0.0,<3.1.0a0
+ - cython >=3.0.0
- nccl ${{ nccl_version }}
- pip
- pylibraft =${{ version }}
diff --git a/dependencies.yaml b/dependencies.yaml
index 588a3373dd..9f20c5192d 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -248,7 +248,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- - cython>=3.0.0,<3.1.0a0
+ - cython>=3.0.0
checks:
common:
- output_types: [conda, requirements]
diff --git a/python/pylibraft/pylibraft/common/mdspan.pxd b/python/pylibraft/pylibraft/common/mdspan.pxd
index 9da3957f03..4b2bf12aaa 100644
--- a/python/pylibraft/pylibraft/common/mdspan.pxd
+++ b/python/pylibraft/pylibraft/common/mdspan.pxd
@@ -33,7 +33,7 @@ from pylibraft.common.optional cimport make_optional, optional
# Cython doesn't like `const float` inside template parameters
# hack around this with using typedefs
-ctypedef const float const_float
+ctypedef const float const_float_t
ctypedef const int8_t const_int8_t
ctypedef const uint8_t const_uint8_t
@@ -59,7 +59,7 @@ cdef optional[device_matrix_view[int64_t, int64_t, row_major]] make_optional_vie
cdef device_matrix_view[uint32_t, int64_t, row_major] get_dmv_uint32(
array, check_shape) except *
-cdef device_matrix_view[const_float, int64_t, row_major] get_const_dmv_float(
+cdef device_matrix_view[const_float_t, int64_t, row_major] get_const_dmv_float(
array, check_shape) except *
cdef device_matrix_view[const_uint8_t, int64_t, row_major] get_const_dmv_uint8(
@@ -86,7 +86,7 @@ cdef host_matrix_view[uint32_t, int64_t, row_major] get_hmv_uint32(
cdef host_matrix_view[uint64_t, int64_t, row_major] get_hmv_uint64(
array, check_shape) except *
-cdef host_matrix_view[const_float, int64_t, row_major] get_const_hmv_float(
+cdef host_matrix_view[const_float_t, int64_t, row_major] get_const_hmv_float(
array, check_shape) except *
cdef host_matrix_view[const_uint8_t, int64_t, row_major] get_const_hmv_uint8(
diff --git a/python/pylibraft/pylibraft/common/mdspan.pyx b/python/pylibraft/pylibraft/common/mdspan.pyx
index 434eb59752..4e8bda343c 100644
--- a/python/pylibraft/pylibraft/common/mdspan.pyx
+++ b/python/pylibraft/pylibraft/common/mdspan.pyx
@@ -200,14 +200,14 @@ cdef device_matrix_view[int64_t, int64_t, row_major] \
<int64_t*><uintptr_t>cai.data, shape[0], shape[1])
-cdef device_matrix_view[const_float, int64_t, row_major] \
+cdef device_matrix_view[const_float_t, int64_t, row_major] \
get_const_dmv_float(cai, check_shape) except *:
if cai.dtype != np.float32:
raise TypeError("dtype %s not supported" % cai.dtype)
if check_shape and len(cai.shape) != 2:
raise ValueError("Expected a 2D array, got %d D" % len(cai.shape))
shape = (cai.shape[0], cai.shape[1] if len(cai.shape) == 2 else 1)
- return make_device_matrix_view[const_float, int64_t, row_major](
+ return make_device_matrix_view[const_float_t, int64_t, row_major](
<const float*><uintptr_t>cai.data, shape[0], shape[1])
@@ -317,14 +317,14 @@ cdef host_matrix_view[uint64_t, int64_t, row_major] \
<uint64_t*><uintptr_t>cai.data, shape[0], shape[1])
-cdef host_matrix_view[const_float, int64_t, row_major] \
+cdef host_matrix_view[const_float_t, int64_t, row_major] \
get_const_hmv_float(cai, check_shape) except *:
if cai.dtype != np.float32:
raise TypeError("dtype %s not supported" % cai.dtype)
if check_shape and len(cai.shape) != 2:
raise ValueError("Expected a 2D array, got %d D" % len(cai.shape))
shape = (cai.shape[0], cai.shape[1] if len(cai.shape) == 2 else 1)
- return make_host_matrix_view[const_float, int64_t, row_major](
+ return make_host_matrix_view[const_float_t, int64_t, row_major](
<const float*><uintptr_t>cai.data, shape[0], shape[1])
|