Skip to content

Commit a5d6826

Browse files
committed
fix uuid handling
1 parent 04d3f5d commit a5d6826

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cuda_core/cuda/core/experimental/_device.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,8 @@ class Device:
10841084
HANDLE_RETURN(cydriver.cuDeviceGetUuid_v2(&uuid, self._id))
10851085
ELSE: # 13.0+
10861086
HANDLE_RETURN(cydriver.cuDeviceGetUuid(&uuid, self._id))
1087-
cdef bytes uuid_b = uuid.bytes
1087+
cdef bytearray uuid_b = bytearray(sizeof(uuid.bytes))
1088+
uuid_b[:] = uuid.bytes
10881089
cdef str uuid_hex = uuid_b.hex()
10891090
# 8-4-4-4-12
10901091
return f"{uuid_hex[:8]}-{uuid_hex[8:12]}-{uuid_hex[12:16]}-{uuid_hex[16:20]}-{uuid_hex[20:]}"

0 commit comments

Comments
 (0)