fetch_ml/internal/worker/gpu_nvml_stub.go
Jeremie Fraeys 3fb6902fa1
feat(worker): integrate scheduler endpoints and security hardening
Update worker system for scheduler integration:
- Worker server with scheduler registration
- Configuration with scheduler endpoint support
- Artifact handling with integrity verification
- Container executor with supply chain validation
- Local executor enhancements
- GPU detection improvements (cross-platform)
- Error handling with execution context
- Factory pattern for executor instantiation
- Hash integrity with native library support
2026-02-26 12:06:16 -05:00

57 lines
1.3 KiB
Go

//go:build !cgo || !native_libs || !linux
// +build !cgo !native_libs !linux
package worker
import "errors"
// GPUInfo provides comprehensive GPU information
type GPUInfo struct {
UUID string
Name string
VBIOSVersion string
MemoryUsed uint64
MemoryTotal uint64
PowerDraw uint32
Index uint32
ClockSM uint32
ClockMemory uint32
PCIeGen uint32
PCIeWidth uint32
Temperature uint32
Utilization uint32
}
func InitNVML() error {
return errors.New("NVML requires native_libs build tag")
}
func ShutdownNVML() {}
func IsNVMLAvailable() bool {
return false
}
func GetGPUCount() (int, error) {
return 0, nil
}
func GetGPUInfo(index uint32) (*GPUInfo, error) { // <-- was missing
return nil, errors.New("NVML requires native_libs build tag")
}
func GetAllGPUInfo() ([]*GPUInfo, error) {
return nil, errors.New("NVML requires native_libs build tag")
}
func GetGPUUtilization(index uint32) (uint32, error) {
return 0, errors.New("NVML requires native_libs build tag")
}
func GetGPUMemory(index uint32) (used uint64, total uint64, err error) {
return 0, 0, errors.New("NVML requires native_libs build tag")
}
func GetGPUTemperature(index uint32) (uint32, error) {
return 0, errors.New("NVML requires native_libs build tag")
}