Merge pull request #619 from NVIDIA/fix-mig-get-minor-number

[bugfix] Process error type instead of nvml.Return
This commit is contained in:
Christopher Desiniotis 2024-07-22 15:21:49 -07:00 committed by GitHub
commit 87a63a6159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,9 +145,9 @@ type toRequiredMigInfo struct {
}
func (d *toRequiredMigInfo) getPlacementInfo() (int, int, int, error) {
gpu, ret := d.parent.GetMinorNumber()
if ret != nvml.SUCCESS {
return 0, 0, 0, fmt.Errorf("error getting GPU minor: %v", ret)
gpu, err := d.parent.GetMinorNumber()
if err != nil {
return 0, 0, 0, fmt.Errorf("error getting GPU minor: %w", err)
}
gi, ret := d.GetGpuInstanceId()