Skip to content

Commit fdb3f60

Browse files
committed
Treat zero cluster UUID or clique ID as non-fabric-attached
Signed-off-by: Evan Lezar <[email protected]>
1 parent 24e4052 commit fdb3f60

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/nvlib/device/device.go

+6
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ func (d *device) IsFabricAttached() (bool, error) {
219219
if ret != nvml.SUCCESS {
220220
return false, fmt.Errorf("error getting GPU Fabric Info: %v", ret)
221221
}
222+
if info.ClusterUuid == [16]uint8{} || info.CliqueId == 0 {
223+
return false, nil
224+
}
222225
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
223226
return false, nil
224227
}
@@ -237,6 +240,9 @@ func (d *device) IsFabricAttached() (bool, error) {
237240
if ret != nvml.SUCCESS {
238241
return false, fmt.Errorf("error getting GPU Fabric Info: %v", ret)
239242
}
243+
if info.ClusterUuid == [16]uint8{} || info.CliqueId == 0 {
244+
return false, nil
245+
}
240246
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
241247
return false, nil
242248
}

0 commit comments

Comments
 (0)