Update NVIDIA --gpu requests using CDI to match AMD logic#52145
Open
elezar wants to merge 3 commits intomoby:masterfrom
Open
Update NVIDIA --gpu requests using CDI to match AMD logic#52145elezar wants to merge 3 commits intomoby:masterfrom
elezar wants to merge 3 commits intomoby:masterfrom
Conversation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change adds a cdiCacheInjector type for handling --gpus requests as vendor-specific CDI requests. The handling of --gpus requests for AMD devices is updated to use this type. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change aligns the handling of --gpus requests using CDI for NVIDIA device with those for AMD devices. Instead of checking for the existence of the nvidia-cdi-hook executable, available CDI vendors are checked. This makes the implementation more robust w.r.t changing implementation details in NVIDIA CDI specs. Signed-off-by: Evan Lezar <elezar@nvidia.com>
shiv-tyagi
reviewed
Mar 5, 2026
Comment on lines
10
to
12
| // RegisterGPUDeviceDrivers registers GPU device drivers. | ||
| // If the cdiCache is provided, it is used to detect presence of CDI specs for AMD GPUs. | ||
| // For NVIDIA GPUs, presence of CDI specs is detected by checking for the nvidia-cdi-hook binary. |
Contributor
There was a problem hiding this comment.
Suggested change
| // RegisterGPUDeviceDrivers registers GPU device drivers. | |
| // If the cdiCache is provided, it is used to detect presence of CDI specs for AMD GPUs. | |
| // For NVIDIA GPUs, presence of CDI specs is detected by checking for the nvidia-cdi-hook binary. | |
| // RegisterGPUDeviceDrivers registers GPU device drivers. | |
| // If the cdiCache is provided, it is used to discover the vendor via available CDI specs | |
| // and translate the GPU requests to CDI device requests. |
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.
- What I did
Refactored the handling of
--gpusrequests for NVIDIA devices to align with AMD device requests. See #52048.- How I did it
Introduced a
cdiCacheInjectorand update the AMD-specific code to make use of this type. I then migrated the NVIDIA implementation to this.- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)