- Add dynamic NVML loading for Linux GPU detection - Add macOS GPU detection via IOKit framework - Add Zig NVML wrapper for cross-platform GPU queries - Update native bridge to support platform-specific GPU libs - Add CMake support for NVML dynamic library
41 lines
951 B
Go
41 lines
951 B
Go
//go:build !darwin
|
|
// +build !darwin
|
|
|
|
package worker
|
|
|
|
import "errors"
|
|
|
|
// MacOSGPUInfo placeholder for non-macOS builds
|
|
type MacOSGPUInfo struct {
|
|
Index uint32
|
|
Name string
|
|
ChipsetModel string
|
|
VRAM_MB uint32
|
|
IsIntegrated bool
|
|
IsAppleSilicon bool
|
|
}
|
|
|
|
// IsMacOS returns false on non-macOS
|
|
func IsMacOS() bool {
|
|
return false
|
|
}
|
|
|
|
// IsAppleSilicon returns false on non-macOS
|
|
func IsAppleSilicon() bool {
|
|
return false
|
|
}
|
|
|
|
// GetMacOSGPUCount returns error on non-macOS
|
|
func GetMacOSGPUCount() (int, error) {
|
|
return 0, errors.New("macOS GPU monitoring only available on macOS")
|
|
}
|
|
|
|
// GetMacOSGPUInfo returns error on non-macOS
|
|
func GetMacOSGPUInfo() ([]MacOSGPUInfo, error) {
|
|
return nil, errors.New("macOS GPU monitoring only available on macOS")
|
|
}
|
|
|
|
// FormatMacOSGPUStatus returns error on non-macOS
|
|
func FormatMacOSGPUStatus() (string, error) {
|
|
return "", errors.New("macOS GPU monitoring only available on macOS")
|
|
}
|