Skip to content

Commit 0a90f60

Browse files
committed
Keep the rebased TensorMap validation helper consistent.
Remove the stale Cython-only `_require_view_device` definition left behind while porting the TensorMap fixes onto the PR head branch so the extension builds against the newer managed-memory-aware helper. Made-with: Cursor
1 parent 99565c2 commit 0a90f60

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

cuda_core/cuda/core/_tensor_map.pyx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -427,18 +427,6 @@ cdef inline int _get_current_device_id() except -1:
427427
HANDLE_RETURN(cydriver.cuCtxGetDevice(&dev))
428428
return <int>dev
429429

430-
431-
cdef inline int _require_view_device(
432-
view,
433-
int device_id,
434-
object caller,
435-
) except -1:
436-
if view.device_id != device_id:
437-
raise ValueError(
438-
f"{caller} expects tensor on device {device_id}, got {view.device_id}")
439-
return 0
440-
441-
442430
def _compute_byte_strides(shape, strides, elem_size):
443431
"""Compute byte strides from element strides or C-contiguous fallback.
444432

0 commit comments

Comments
 (0)