Skip to content

Commit c32d291

Browse files
committed
Add missing V3 API for GpuInstanceProfileInfo/ComputeInstanceProfileInfo
Signed-off-by: Kevin Klues <[email protected]>
1 parent 3013b65 commit c32d291

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pkg/nvml/device.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,13 @@ func (handler GpuInstanceProfileInfoHandler) V2() (GpuInstanceProfileInfo_v2, Re
20802080
return info, ret
20812081
}
20822082

2083+
func (handler GpuInstanceProfileInfoHandler) V3() (GpuInstanceProfileInfo_v3, Return) {
2084+
var info GpuInstanceProfileInfo_v3
2085+
info.Version = STRUCT_VERSION(info, 3)
2086+
ret := nvmlDeviceGetGpuInstanceProfileInfoV(handler.device, uint32(handler.profile), (*GpuInstanceProfileInfo_v2)(unsafe.Pointer(&info)))
2087+
return info, ret
2088+
}
2089+
20832090
func (l *library) DeviceGetGpuInstanceProfileInfoV(device Device, profile int) GpuInstanceProfileInfoHandler {
20842091
return device.GetGpuInstanceProfileInfoV(profile)
20852092
}
@@ -2227,6 +2234,13 @@ func (handler ComputeInstanceProfileInfoHandler) V2() (ComputeInstanceProfileInf
22272234
return info, ret
22282235
}
22292236

2237+
func (handler ComputeInstanceProfileInfoHandler) V3() (ComputeInstanceProfileInfo_v3, Return) {
2238+
var info ComputeInstanceProfileInfo_v3
2239+
info.Version = STRUCT_VERSION(info, 3)
2240+
ret := nvmlGpuInstanceGetComputeInstanceProfileInfoV(handler.gpuInstance, uint32(handler.profile), uint32(handler.engProfile), (*ComputeInstanceProfileInfo_v2)(unsafe.Pointer(&info)))
2241+
return info, ret
2242+
}
2243+
22302244
func (l *library) GpuInstanceGetComputeInstanceProfileInfoV(gpuInstance GpuInstance, profile int, engProfile int) ComputeInstanceProfileInfoHandler {
22312245
return gpuInstance.GetComputeInstanceProfileInfoV(profile, engProfile)
22322246
}

0 commit comments

Comments
 (0)