mirror of
https://github.com/clearml/go-nvlib
synced 2025-02-07 05:17:43 +00:00
Fix bug in heuristic for which MIG profiles to skip
Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
parent
500a464b22
commit
8c50f9f18f
@ -212,7 +212,10 @@ func (d *device) VisitMigProfiles(visit func(MigProfile) error) error {
|
|||||||
// physically constructed. In the future we should do this via
|
// physically constructed. In the future we should do this via
|
||||||
// NVML once a proper API for this exists.
|
// NVML once a proper API for this exists.
|
||||||
pi := p.GetInfo()
|
pi := p.GetInfo()
|
||||||
if (pi.C * 2) > (pi.G + 1) {
|
if pi.C > pi.G {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (pi.C < pi.G) && ((pi.C * 2) > (pi.G + 1)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user