Fix #2683: Fallback to nvidia-smi -L when /proc/driver/nvidia/gpus unavailable#2759
Open
wadeKeith wants to merge 1 commit intoGenesis-Embodied-AI:mainfrom
Open
Fix #2683: Fallback to nvidia-smi -L when /proc/driver/nvidia/gpus unavailable#2759wadeKeith wants to merge 1 commit intoGenesis-Embodied-AI:mainfrom
wadeKeith wants to merge 1 commit intoGenesis-Embodied-AI:mainfrom
Conversation
…iver/nvidia/gpus unavailable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2683 — GPU enumeration fallback for cloud providers where
/proc/driver/nvidia/gpusis unavailable.Problem
On certain cloud providers (e.g., packet.ai RTX 6000 PRO instances), the
/proc/driver/nvidia/gpusinterface is not available, causing benchmark tests and multi-GPU detection to fail.Solution
Added
nvidia-smi -Las a fallback in two functions intests/conftest.py:_get_gpu_indices(): When/proc/driver/nvidia/gpusraisesFileNotFoundError, enumerate GPUs by parsingnvidia-smi -Loutput (counting lines starting with "GPU ")._torch_get_gpu_idx(device): When/proc/driver/nvidia/gpusraisesFileNotFoundError, find the GPU index by matching device UUID againstnvidia-smi -Loutput, extracting the GPU number from the "GPU N:" prefix.The warning message is updated to note when both the proc interface and nvidia-smi fallback fail.
Testing
This change only affects Linux systems and only activates when the
/proc/driver/nvidia/gpuspath is unavailable — existing behavior is fully preserved on systems where it exists.