Skip to content

Commit 9de4aaf

Browse files
committed
Added stub for HasNvidiaGPU for non-linux/amd64 architectures.
1 parent 0954187 commit 9de4aaf

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

pkg/installer/not_cuda.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//go:build !((linux && amd64) || pjrt_all)
2+
3+
package installer
4+
5+
// HasNvidiaGPU tries to guess if there is an actual Nvidia GPU installed (as opposed to only the drivers/PJRT
6+
// file installed, but no actual hardware).
7+
// It does that by checking for the presence of the device files in /dev/nvidia*.
8+
//
9+
// This is helpful to try to sort out the mess of path for nvidia libraries.
10+
// Sadly, NVidia drivers are badly organized at multiple levels -- search to see how many questions there are related
11+
// to where/how to install to CUDA libraries.
12+
//
13+
// To disable this check set GOPJRT_CUDA_CHECKS=no or GOPJRT_CUDA_CHECKS=0.
14+
//
15+
// On non-amd64 architectures, we assume there is no Nvidia GPU, and thi simply returns false.
16+
func HasNvidiaGPU() bool { return false }

0 commit comments

Comments
 (0)