cuda correct pointer type (#7153)

This commit is contained in:
nimlgen
2024-10-18 22:39:59 +03:00
committed by GitHub
parent 37e83ca6fc
commit 99fb115791

View File

@@ -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] = []