diff --git a/tinygrad/runtime/ops_cuda.py b/tinygrad/runtime/ops_cuda.py index ef01369133..4e83f869bd 100644 --- a/tinygrad/runtime/ops_cuda.py +++ b/tinygrad/runtime/ops_cuda.py @@ -87,7 +87,7 @@ class CUDAAllocator(LRUAllocator): check(cuda.cuEventRecord(sync_event, None)) check(cuda.cuCtxSetCurrent(dest_dev.context)) check(cuda.cuStreamWaitEvent(None, sync_event, 0)) # sync the default stream on the dest dev - def offset(self, buf, size:int, offset:int): return ctypes.c_ulong(buf.value + offset) + def offset(self, buf, size:int, offset:int): return cuda.CUdeviceptr_v2(buf.value + offset) class CUDADevice(Compiled): devices: List[CUDADevice] = []