unilab.training.cuda_process_sharing.canonicalize_gpu_uuid

unilab.training.cuda_process_sharing.canonicalize_gpu_uuid(value)[source]

Return the case- and dash-insensitive NVIDIA GPU UUID comparison token.

Torch, nvidia-smi, and CUDA_VISIBLE_DEVICES expose the same UUID with different cases, dashes, and an optional GPU- prefix; equality checks must compare this token rather than the raw strings. The persisted/display form stays GPU-<id> (see cuda_mps_cli).

Parameters:

value (str)

Return type:

str