We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28b5b10 commit bd9fe78Copy full SHA for bd9fe78
runner/internal/common/gpu.go
@@ -16,6 +16,8 @@ const (
16
)
17
18
func GetGpuVendor() GpuVendor {
19
+ // FIXME: There might be errors other than os.ErrNotExist that are ignored silently.
20
+ // Propagate and log.
21
if _, err := os.Stat("/dev/kfd"); !errors.Is(err, os.ErrNotExist) {
22
return GpuVendorAmd
23
}
@@ -28,5 +30,11 @@ func GetGpuVendor() GpuVendor {
28
30
if _, err := os.Stat("/dev/tenstorrent"); !errors.Is(err, os.ErrNotExist) {
29
31
return GpuVendorTenstorrent
32
33
+ if _, err := os.Stat("/dev/dxg"); !errors.Is(err, os.ErrNotExist) {
34
+ // WSL2
35
+ if _, err := os.Stat("/usr/lib/wsl/lib/nvidia-smi"); !errors.Is(err, os.ErrNotExist) {
36
+ return GpuVendorNvidia
37
+ }
38
39
return GpuVendorNone
40
0 commit comments