Fix PCI path for detecting GB200 and GB300 devices
BUG=b/436747498
TEST=presubmit, create an a4x-max instance with the new installer and run `cos-extensions install gpu -- --version=latest --debug` and verify that "NVIDIA_GB300 GPU detected. Enabling IMEX channel creation via NVreg_CreateImexChannel0=1" is in the output
Change-Id: If464f034579a33d286fbaed7302da3b9a8f5c0ab
Reviewed-on: https://cos-review.googlesource.com/c/cos/cos-extensions/+/116021
Tested-by: Kevin Berry <kpberry@google.com>
Reviewed-by: Miri Amarilio <mirilio@google.com>
diff --git a/extensions/gpu/gpu.go b/extensions/gpu/gpu.go
index 0dbc415..d7e5dc7 100644
--- a/extensions/gpu/gpu.go
+++ b/extensions/gpu/gpu.go
@@ -80,7 +80,7 @@
args := []string{"-host-dir=/var/lib/nvidia"}
if !skipKernelModuleLoadingArg {
- gpuType, _ := deviceInfo.GetGPUTypeInfo("/root/sys/bus/pci/devices")
+ gpuType, _ := deviceInfo.GetGPUTypeInfo("/sys/bus/pci/devices")
if gpuType == deviceInfo.GB200 || gpuType == deviceInfo.GB300 {
glog.Infof("%s GPU detected. Enabling IMEX channel creation via NVreg_CreateImexChannel0=1", gpuType)
installerArgs = append(installerArgs, "-module-arg", "nvidia.NVreg_CreateImexChannel0=1")