Skip to content

Commit 95f5c1b

Browse files
committed
Elaborate in the docstring
1 parent 4d6e3a2 commit 95f5c1b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cuda_core/cuda/core/system/_device.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ cdef class Device:
144144
Retrieves the globally unique immutable UUID associated with this
145145
device, as a 5 part hexadecimal string, that augments the immutable,
146146
board serial identifier.
147+
148+
In the upstream NVML C++ API, the UUID includes a ``gpu-`` or ``mig-``
149+
prefix. This property returns it without the prefix, to match the UUIDs
150+
used in CUDA. If you need the prefix, use the `uuid` property.
147151
"""
148152
# NVML UUIDs have a `GPU-` or `MIG-` prefix. We remove that here.
149153
return nvml.device_get_uuid(self._handle)[4:]

0 commit comments

Comments
 (0)