Skip to content

Commit 3013b65

Browse files
committed
Fix missing library object on a few system methods
Signed-off-by: Kevin Klues <[email protected]>
1 parent 2b86455 commit 3013b65

3 files changed

Lines changed: 214 additions & 5 deletions

File tree

pkg/nvml/mock/interface.go

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

pkg/nvml/system.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,31 @@ func (l *library) SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, Ret
8888
}
8989

9090
// nvml.SystemGetConfComputeState()
91-
func SystemGetConfComputeState() (ConfComputeSystemState, Return) {
91+
func (l *library) SystemGetConfComputeState() (ConfComputeSystemState, Return) {
9292
var state ConfComputeSystemState
9393
ret := nvmlSystemGetConfComputeState(&state)
9494
return state, ret
9595
}
9696

9797
// nvml.SystemGetConfComputeGpusReadyState()
98-
func SystemGetConfComputeGpusReadyState() (uint32, Return) {
98+
func (l *library) SystemGetConfComputeGpusReadyState() (uint32, Return) {
9999
var isAcceptingWork uint32
100100
ret := nvmlSystemGetConfComputeGpusReadyState(&isAcceptingWork)
101101
return isAcceptingWork, ret
102102
}
103103

104104
// nvml.SystemSetConfComputeGpusReadyState()
105-
func SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) Return {
105+
func (l *library) SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) Return {
106106
return nvmlSystemSetConfComputeGpusReadyState(isAcceptingWork)
107107
}
108108

109109
// nvml.SystemSetNvlinkBwMode()
110-
func SystemSetNvlinkBwMode(nvlinkBwMode uint32) Return {
110+
func (l *library) SystemSetNvlinkBwMode(nvlinkBwMode uint32) Return {
111111
return nvmlSystemSetNvlinkBwMode(nvlinkBwMode)
112112
}
113113

114114
// nvml.SystemGetNvlinkBwMode()
115-
func SystemGetNvlinkBwMode() (uint32, Return) {
115+
func (l *library) SystemGetNvlinkBwMode() (uint32, Return) {
116116
var nvlinkBwMode uint32
117117
ret := nvmlSystemGetNvlinkBwMode(&nvlinkBwMode)
118118
return nvlinkBwMode, ret

0 commit comments

Comments
 (0)