mirror of
https://github.com/luxfi/gpu.git
synced 2026-10-30 16:23:49 +00:00
24 lines
430 B
Go
24 lines
430 B
Go
//go:build ignore
|
|
// +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())
|
|
}
|