From 2bfdabfb278ca6adca7cef9fca75d6bdb39c2394 Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Wed, 10 Apr 2024 22:19:31 +0000 Subject: [PATCH] Fix API call for GetVgpuCompatibility Signed-off-by: Kevin Klues --- pkg/nvml/api.go | 2 +- pkg/nvml/vgpu.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/nvml/api.go b/pkg/nvml/api.go index ce2b7c7..6c327e7 100644 --- a/pkg/nvml/api.go +++ b/pkg/nvml/api.go @@ -343,7 +343,7 @@ type Interface interface { VgpuInstanceGetAccountingMode(vgpuInstance VgpuInstance) (EnableState, Return) VgpuInstanceGetAccountingPids(vgpuInstance VgpuInstance) ([]int, Return) VgpuInstanceGetAccountingStats(vgpuInstance VgpuInstance, pid int) (AccountingStats, Return) - GetVgpuCompatibility(nvmlVgpuMetadata *nvmlVgpuMetadata, pgpuMetadata *nvmlVgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) + GetVgpuCompatibility(vgpuMetadata *VgpuMetadata, pgpuMetadata *VgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) GetVgpuVersion() (VgpuVersion, VgpuVersion, Return) SetVgpuVersion(vgpuVersion *VgpuVersion) Return VgpuInstanceClearAccountingPids(vgpuInstance VgpuInstance) Return diff --git a/pkg/nvml/vgpu.go b/pkg/nvml/vgpu.go index b75a5e4..bd80077 100644 --- a/pkg/nvml/vgpu.go +++ b/pkg/nvml/vgpu.go @@ -423,9 +423,9 @@ func (vgpuInstance nvmlVgpuInstance) GetAccountingStats(pid int) (AccountingStat } // nvml.GetVgpuCompatibility() -func (l *library) GetVgpuCompatibility(nvmlVgpuMetadata *nvmlVgpuMetadata, pgpuMetadata *nvmlVgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) { +func (l *library) GetVgpuCompatibility(vgpuMetadata *VgpuMetadata, pgpuMetadata *VgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) { var compatibilityInfo VgpuPgpuCompatibility - ret := nvmlGetVgpuCompatibility(nvmlVgpuMetadata, pgpuMetadata, &compatibilityInfo) + ret := nvmlGetVgpuCompatibility(&vgpuMetadata.nvmlVgpuMetadata, &pgpuMetadata.nvmlVgpuPgpuMetadata, &compatibilityInfo) return compatibilityInfo, ret }