@@ -2814,16 +2814,16 @@ def parse_cuda_visible_devices(
2814
2814
>>> import os
2815
2815
>>> os.environ['CUDA_DEVICE_ORDER'] = 'PCI_BUS_ID'
2816
2816
>>> os.environ['CUDA_VISIBLE_DEVICES'] = '6,5'
2817
- >>> parse_cuda_visible_devices() # parse the `CUDA_VISIBLE_DEVICES` environment variable to NVML indices
2817
+ >>> parse_cuda_visible_devices() # parse the `CUDA_VISIBLE_DEVICES` environment variable to NVML indices
2818
2818
[6, 5]
2819
2819
2820
- >>> parse_cuda_visible_devices('0,4') # pass the `CUDA_VISIBLE_DEVICES` value explicitly
2820
+ >>> parse_cuda_visible_devices('0,4') # pass the `CUDA_VISIBLE_DEVICES` value explicitly
2821
2821
[0, 4]
2822
2822
2823
2823
>>> parse_cuda_visible_devices('GPU-18ef14e9,GPU-849d5a8d') # accept abbreviated UUIDs
2824
2824
[5, 6]
2825
2825
2826
- >>> parse_cuda_visible_devices(None) # get all devices when the `CUDA_VISIBLE_DEVICES` environment variable unset
2826
+ >>> parse_cuda_visible_devices(None) # get all devices when the `CUDA_VISIBLE_DEVICES` environment variable unset
2827
2827
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2828
2828
2829
2829
>>> parse_cuda_visible_devices('MIG-d184f67c-c95f-5ef2-a935-195bd0094fbd') # MIG device support (MIG UUID)
@@ -2833,11 +2833,11 @@ def parse_cuda_visible_devices(
2833
2833
>>> parse_cuda_visible_devices('MIG-GPU-3eb79704/13/0') # MIG device support (abbreviated GPU UUID)
2834
2834
[(0, 1)]
2835
2835
2836
- >>> parse_cuda_visible_devices('') # empty string
2836
+ >>> parse_cuda_visible_devices('') # empty string
2837
2837
[]
2838
- >>> parse_cuda_visible_devices('0,0') # invalid `CUDA_VISIBLE_DEVICES` (duplicate device ordinal)
2838
+ >>> parse_cuda_visible_devices('0,0') # invalid `CUDA_VISIBLE_DEVICES` (duplicate device ordinal)
2839
2839
[]
2840
- >>> parse_cuda_visible_devices('16') # invalid `CUDA_VISIBLE_DEVICES` (device ordinal out of range)
2840
+ >>> parse_cuda_visible_devices('16') # invalid `CUDA_VISIBLE_DEVICES` (device ordinal out of range)
2841
2841
[]
2842
2842
""" # pylint: disable=line-too-long
2843
2843
if cuda_visible_devices is _VALUE_OMITTED :
0 commit comments