Merge pull request #54 from elezar/fix-is-fabric-attached
Some checks failed
Golang / check (push) Has been cancelled
Golang / Unit test (push) Has been cancelled
Golang / build (push) Has been cancelled

Treat zero cluster UUID as non-fabric-attached
This commit is contained in:
Evan Lezar 2025-02-12 19:23:13 +01:00 committed by GitHub
commit e9b89036f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -222,6 +222,9 @@ func (d *device) IsFabricAttached() (bool, error) {
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
return false, nil
}
if info.ClusterUuid == [16]uint8{} {
return false, nil
}
if nvml.Return(info.Status) != nvml.SUCCESS {
return false, nil
}
@ -240,6 +243,9 @@ func (d *device) IsFabricAttached() (bool, error) {
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
return false, nil
}
if info.ClusterUuid == [16]uint8{} {
return false, nil
}
if nvml.Return(info.Status) != nvml.SUCCESS {
return false, nil
}