fix: Ensure that CUDA Compat Container path is set by default#1690
Merged
elezar merged 1 commit intoNVIDIA:mainfrom Mar 3, 2026
Merged
fix: Ensure that CUDA Compat Container path is set by default#1690elezar merged 1 commit intoNVIDIA:mainfrom
elezar merged 1 commit intoNVIDIA:mainfrom
Conversation
b5fb49f to
b89047a
Compare
This change ensures that the CompatContainerRoot cannot be set to the empty string. This ensures that the default defined in the nvcdi package is used in this case whithout requiring that the caller (the nvidia-runtime in CDI mode or the nvidia-cdi cdi generate command). Failing to do this, means that the CUDA compat libraries in SBSA containers are used on Orin-based systems. Signed-off-by: Evan Lezar <elezar@nvidia.com>
b89047a to
adaabca
Compare
Pull Request Test Coverage Report for Build 22627696116Details
💛 - Coveralls |
jgehrcke
reviewed
Mar 3, 2026
| nvidiaCDIHookPath: "/usr/bin/nvidia-cdi-hook", | ||
| csv: csvOptions{ | ||
| CompatContainerRoot: defaultOrinCompatContainerRoot, | ||
| }, |
Collaborator
There was a problem hiding this comment.
by removing this, o.csv is now initialized as nil, right?
Collaborator
There was a problem hiding this comment.
or maybe not because of this type definition (not a pointer):
csv csvOptions
Member
Author
There was a problem hiding this comment.
Yes, it's just an embeded struct, it is not a pointer. This means that the default value for the o.csv.CompatContainerRoot field is now "".
jgehrcke
reviewed
Mar 3, 2026
| } | ||
|
|
||
| if o.mode == ModeCSV && o.csv.CompatContainerRoot == "" { | ||
| o.csv.CompatContainerRoot = defaultOrinCompatContainerRoot |
Collaborator
There was a problem hiding this comment.
so o.csv is never a nil pointer dereference, yes?
Member
Author
There was a problem hiding this comment.
Correct. The csv member is NOT a pointer type. It is an embeded struct.
jgehrcke
approved these changes
Mar 3, 2026
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.
This change ensures that the CUDA Compat Container path is set on orin-based systems. Without this, the CUDA Compat libraries for SBSA are (incorrectly) used in a container.