fix: use default pgpu alias when an override is not available#44
fix: use default pgpu alias when an override is not available#44rajatchopra merged 2 commits intoNVIDIA:mainfrom
Conversation
Pull Request Test Coverage Report for Build 21923530054Details
💛 - Coveralls |
b473fd1 to
bb0fcb6
Compare
|
@rajatchopra can we add the defaults at source (https://github.com/NVIDIA/sandbox-device-plugin/blob/main/cmd/main.go#L37-L38) |
There was a problem hiding this comment.
Pull request overview
Updates the NVIDIA sandbox device plugin to pick a usable GPU resource name for the GFD pod when P_GPU_ALIAS isn’t set, and refines CDI spec generation and logging around IOMMUFD/VFIO behavior.
Changes:
- Use a discovered GPU device name as the default resource name for the GFD pod when
P_GPU_ALIASis not provided. - Rework CDI spec generation to support alias vs per-device-type output for both GPUs and NVSwitches.
- Adjust IOMMUFD-related logging and allocation paths (and make
cdiRootconfigurable for tests).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/device_plugin/gfd.go | Builds GFD pod resource name from a derived GPU device name; adds helper to select that name. |
| pkg/device_plugin/generic_device_plugin.go | Refactors allocation branching/logging between IOMMUFD and legacy VFIO modes. |
| pkg/device_plugin/device_plugin.go | Updates logs and changes how IOMMU keys are derived in IOMMUFD mode. |
| pkg/device_plugin/constants.go | Makes cdiRoot mutable for test redirection. |
| pkg/device_plugin/cdi.go | Reworks CDI generation for alias vs heterogeneous modes and changes device naming in CDI specs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No I guess. For two reasons:
|
…not set Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
bb0fcb6 to
5535ea9
Compare
|
Yes, that is a good way to get around. Fixed. |
… set Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
bf8ddcb to
a1a1a97
Compare
The GFD pod needs a GPU and it needs to know which 'device name' is used for publishing the devices. When P_GPU_ALIAS is present, it is that one, but otherwise pick one GPU device's native name.