mirror of
https://github.com/mudler/LocalAI
synced 2026-04-23 14:27:19 +00:00
16 lines
230 B
Go
16 lines
230 B
Go
|
|
package xsysinfo
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/jaypipes/ghw"
|
||
|
|
"github.com/jaypipes/ghw/pkg/gpu"
|
||
|
|
)
|
||
|
|
|
||
|
|
func GPUs() ([]*gpu.GraphicsCard, error) {
|
||
|
|
gpu, err := ghw.GPU()
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
|
||
|
|
return gpu.GraphicsCards, nil
|
||
|
|
}
|