Skip to content

Commit bb86a80

Browse files
committed
Bump to NVML version 12.5
Signed-off-by: Kevin Klues <[email protected]>
1 parent 079ea54 commit bb86a80

File tree

12 files changed

+940
-210
lines changed

12 files changed

+940
-210
lines changed

gen/nvml/nvml.h

Lines changed: 215 additions & 89 deletions
Large diffs are not rendered by default.

gen/nvml/nvml.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ TRANSLATOR:
9696
- {action: replace, from: "^nvmlDeviceGetMPSComputeRunningProcesses$", to: "nvmlDeviceGetMPSComputeRunningProcesses_v1"}
9797
- {action: replace, from: "^nvmlDeviceGetGpuInstancePossiblePlacements$", to: "nvmlDeviceGetGpuInstancePossiblePlacements_v1"}
9898
- {action: replace, from: "^nvmlVgpuInstanceGetLicenseInfo$", to: "nvmlVgpuInstanceGetLicenseInfo_v1"}
99+
- {action: replace, from: "^nvmlDeviceGetDriverModel$", to: "nvmlDeviceGetDriverModel_v1"}
99100
- {transform: unexport}

pkg/nvml/const.go

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/nvml/device.go

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,3 +3041,47 @@ func (device nvmlDevice) GetSramEccErrorStatus() (EccSramErrorStatus, Return) {
30413041
ret := nvmlDeviceGetSramEccErrorStatus(device, &status)
30423042
return status, ret
30433043
}
3044+
3045+
// nvml.DeviceGetClockOffsets()
3046+
func (l *library) DeviceGetClockOffsets(device Device) (ClockOffset, Return) {
3047+
return device.GetClockOffsets()
3048+
}
3049+
3050+
func (device nvmlDevice) GetClockOffsets() (ClockOffset, Return) {
3051+
var info ClockOffset
3052+
info.Version = STRUCT_VERSION(info, 1)
3053+
ret := nvmlDeviceGetClockOffsets(device, &info)
3054+
return info, ret
3055+
}
3056+
3057+
// nvml.DeviceSetClockOffsets()
3058+
func (l *library) DeviceSetClockOffsets(device Device, info ClockOffset) Return {
3059+
return device.SetClockOffsets(info)
3060+
}
3061+
3062+
func (device nvmlDevice) SetClockOffsets(info ClockOffset) Return {
3063+
return nvmlDeviceSetClockOffsets(device, &info)
3064+
}
3065+
3066+
// nvml.DeviceGetDriverModel_v2()
3067+
func (l *library) DeviceGetDriverModel_v2(device Device) (DriverModel, DriverModel, Return) {
3068+
return device.GetDriverModel_v2()
3069+
}
3070+
3071+
func (device nvmlDevice) GetDriverModel_v2() (DriverModel, DriverModel, Return) {
3072+
var current, pending DriverModel
3073+
ret := nvmlDeviceGetDriverModel_v2(device, &current, &pending)
3074+
return current, pending, ret
3075+
}
3076+
3077+
// nvml.DeviceGetCapabilities()
3078+
func (l *library) DeviceGetCapabilities(device Device) (DeviceCapabilities, Return) {
3079+
return device.GetCapabilities()
3080+
}
3081+
3082+
func (device nvmlDevice) GetCapabilities() (DeviceCapabilities, Return) {
3083+
var caps DeviceCapabilities
3084+
caps.Version = STRUCT_VERSION(caps, 1)
3085+
ret := nvmlDeviceGetCapabilities(device, &caps)
3086+
return caps, ret
3087+
}

pkg/nvml/lib.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ var GetBlacklistDeviceCount = GetExcludedDeviceCount
163163
var GetBlacklistDeviceInfoByIndex = GetExcludedDeviceInfoByIndex
164164
var nvmlDeviceGetGpuInstancePossiblePlacements = nvmlDeviceGetGpuInstancePossiblePlacements_v1
165165
var nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v1
166+
var nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v1
166167

167168
// BlacklistDeviceInfo was replaced by ExcludedDeviceInfo
168169
type BlacklistDeviceInfo = ExcludedDeviceInfo
@@ -288,4 +289,8 @@ func (l *library) updateVersionedSymbols() {
288289
if err == nil {
289290
nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v2
290291
}
292+
err = l.dl.Lookup("nvmlDeviceGetDriverModel_v2")
293+
if err == nil {
294+
nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v2
295+
}
291296
}

0 commit comments

Comments
 (0)