mirror of
https://github.com/clearml/go-nvlib
synced 2025-02-25 05:23:52 +00:00
Merge pull request #54 from elezar/fix-is-fabric-attached
Treat zero cluster UUID as non-fabric-attached
This commit is contained in:
commit
e9b89036f0
@ -222,6 +222,9 @@ func (d *device) IsFabricAttached() (bool, error) {
|
|||||||
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
|
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
if info.ClusterUuid == [16]uint8{} {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
if nvml.Return(info.Status) != nvml.SUCCESS {
|
if nvml.Return(info.Status) != nvml.SUCCESS {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
@ -240,6 +243,9 @@ func (d *device) IsFabricAttached() (bool, error) {
|
|||||||
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
|
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
if info.ClusterUuid == [16]uint8{} {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
if nvml.Return(info.Status) != nvml.SUCCESS {
|
if nvml.Return(info.Status) != nvml.SUCCESS {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user