Files
gpu/test_memory.go
zeekay 60623dd037 Initial release: Go bindings for MLX GPU framework
Provides Go bindings for GPU-accelerated array operations:
- Metal backend for Apple Silicon (M1/M2/M3/M4)
- CUDA backend for NVIDIA GPUs
- CPU fallback with SIMD optimizations
- ONNX Runtime fallback for Windows

C++ backend: github.com/luxcpp/gpu (Apple MLX fork)
2025-12-30 16:26:03 -08:00

22 lines
441 B
Go

// +build ignore
package main
import (
"fmt"
"github.com/luxfi/gpu"
)
func main() {
fmt.Println("=== GPU Memory Detection Test ===")
backend := gpu.GetBackend()
device := gpu.GetDevice()
fmt.Printf("Backend: %s\n", backend)
fmt.Printf("Device: %s\n", device.Name)
fmt.Printf("Memory: %.1f GB\n", float64(device.Memory)/(1024*1024*1024))
// Show info
fmt.Printf("\nFull Info: %s\n", gpu.Info())
}