Skip to content

Commit e58f557

Browse files
author
Felix Igelbrink
committed
fixed NEP50 casting errors
1 parent 0a6b33c commit e58f557

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cupy_knn/lbvh_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def build(self, points: cp.ndarray):
251251
# allocate space for the nodes as a raw cuda array
252252
self.nodes = cp.cuda.alloc(self.tree_dtype.itemsize * self.num_nodes)
253253

254-
root_node = cp.full((1,), cp.iinfo(np.uint32).max, dtype=cp.uint32)
254+
root_node = cp.full((1,), cp.uint32(cp.iinfo(np.uint32).max), dtype=cp.uint32)
255255

256256
self._initialize_tree_kernel_float(grid_dim, block_dim, (self.nodes,
257257
aabbs,
@@ -261,7 +261,7 @@ def build(self, points: cp.ndarray):
261261
morton_codes,
262262
self.num_objects))
263263
if self.leaf_size > 1:
264-
valid = cp.full(self.num_nodes, 1, dtype=cp.uint32)
264+
valid = cp.full(self.num_nodes, cp.uint32(1), dtype=cp.uint32)
265265
self._optimize_tree_kernel_float(grid_dim, block_dim, (self.nodes,
266266
root_node,
267267
valid,

0 commit comments

Comments
 (0)