Skip to content

Commit 86e947e

Browse files
committed
minor updates
1 parent 139d75b commit 86e947e

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

nvml_clock_offset.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build linux
2+
// +build linux
3+
14
// Native NVML clock offset implementation for Linux with NVIDIA drivers 555+
25

36
package main

nvml_clock_offset_stub.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//go:build !linux
2+
// +build !linux
3+
4+
package main
5+
6+
import (
7+
"fmt"
8+
9+
"github.com/NVIDIA/go-nvml/pkg/nvml"
10+
)
11+
12+
// GetClockOffsetsNative retrieves clock offsets using native NVML calls (Linux only)
13+
func GetClockOffsetsNative(device nvml.Device, deviceIndex int) (*ClockOffsets, error) {
14+
return nil, fmt.Errorf("native clock offset functionality is only available on Linux")
15+
}
16+
17+
// SetClockOffsetsNative sets clock offsets using native NVML calls (Linux only)
18+
func SetClockOffsetsNative(device nvml.Device, deviceIndex int, config ClockOffsetConfig) error {
19+
return fmt.Errorf("native clock offset functionality is only available on Linux")
20+
}
21+
22+
// ResetClockOffsetsNative resets clock offsets to 0 using native NVML calls (Linux only)
23+
func ResetClockOffsetsNative(device nvml.Device, deviceIndex int) error {
24+
return fmt.Errorf("native clock offset functionality is only available on Linux")
25+
}
26+
27+
// IsNativeClockOffsetSupported checks if native clock offset functionality is available (Linux only)
28+
func IsNativeClockOffsetSupported() bool {
29+
return false
30+
}

0 commit comments

Comments
 (0)