Fix bug in heuristic for which MIG profiles to skip

Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
Kevin Klues 2023-03-25 18:48:56 +00:00
parent 500a464b22
commit 8c50f9f18f

View File

@ -212,7 +212,10 @@ func (d *device) VisitMigProfiles(visit func(MigProfile) error) error {
// physically constructed. In the future we should do this via
// NVML once a proper API for this exists.
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
}