LocalAI/pkg/xsysinfo/gpu.go
Ettore Di Giacinto b69ff46c7e
feat(startup): show CPU/GPU information with --debug (#2241)
Signed-off-by: mudler <mudler@localai.io>
2024-05-05 09:10:23 +02:00

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
}