1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 08:20:24 +08:00
Files
gozel/examples/quick_start/main.go
源文雨 9f94f92b50 fix: ci
2026-03-26 00:39:39 +08:00

26 lines
483 B
Go

// Package main demonstrates quick start usage of the gozel Level Zero bindings.
package main
import (
"fmt"
"github.com/fumiama/gozel/ze"
)
func main() {
gpus, err := ze.InitGPUDrivers()
if err != nil {
panic(err)
}
fmt.Printf("Found %d GPU driver(s)\n", len(gpus))
devs, _ := gpus[0].DeviceGet()
for _, d := range devs {
prop, _ := d.DeviceGetProperties()
fmt.Printf(" Device: %s\n", string(prop.Name[:]))
}
// Found 1 GPU driver(s)
// Device: Graphics
}