From b39574dd63232746ca2dabb2c5ef8637d417a73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Julia=CC=81n?= Date: Wed, 30 Oct 2024 16:10:34 +0100 Subject: [PATCH] Fix argument order --- pkg/gpu/cuda/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gpu/cuda/env.go b/pkg/gpu/cuda/env.go index fa5265ccd75f4..50606bf09baec 100644 --- a/pkg/gpu/cuda/env.go +++ b/pkg/gpu/cuda/env.go @@ -37,7 +37,7 @@ const cudaVisibleDevicesEnvVar = "CUDA_VISIBLE_DEVICES" // applications." If an invalid index is found, an error is returned together // with the list of valid devices found up until that point. func GetVisibleDevicesForProcess(systemDevices []nvml.Device, pid int, procfs string) ([]nvml.Device, error) { - cudaVisibleDevices, err := kernel.GetProcessEnvVariable(pid, cudaVisibleDevicesEnvVar, procfs) + cudaVisibleDevices, err := kernel.GetProcessEnvVariable(pid, procfs, cudaVisibleDevicesEnvVar) if err != nil { return nil, fmt.Errorf("cannot get env var %s for process %d: %w", cudaVisibleDevicesEnvVar, pid, err) }