-
Couldn't load subscription status.
- Fork 427
Add changes for usage of nvsandboxutils #629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
fa059e6 to
4a6f079
Compare
4cc7018 to
0953627
Compare
elezar
reviewed
Aug 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sananya12.
I have some minor comments. I don't think any of them are blockers for getting this merged though.
0953627 to
8dc67b7
Compare
8dc67b7 to
4e1d772
Compare
This change adds a script and related files to generate the internal bindings for Sandboxutils library with the help of c-for-go. This can be used to update the bindings when the header file is modified with reference to how they are generated with the Makefile in go-nvml. Run: ./update-bindings.sh Signed-off-by: Evan Lezar <[email protected]> Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Sananya Majumder <[email protected]>
This change adds the internal bindings for Sandboxutils, some of which have been automatically generated with the help of c-for-go. The format followed is similar to what is used in go-nvml. These would need to be regenerated when the header file is modified and new APIs are added. Signed-off-by: Evan Lezar <[email protected]> Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Sananya Majumder <[email protected]>
This change adds manual wrappers around the generated bindings to make them into more user-friendly APIs for the caller. Some helper functions are also added. The APIs that are currently present in the library and implemented here are: nvSandboxUtilsInit nvSandboxUtilsShutdown nvSandboxUtilsGetDriverVersion nvSandboxUtilsGetGpuResource nvSandboxUtilsGetFileContent Signed-off-by: Evan Lezar <[email protected]> Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Sananya Majumder <[email protected]>
This change includes the usage of Sandboxutils GetDriverVersion API to retrieve the CUDA driver version. If the library is not available on the system or the API call fails for some other reason, it will fallback to the NVML API to return the driver version. Signed-off-by: Evan Lezar <[email protected]> Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Sananya Majumder <[email protected]>
This change adds a new discoverer for Sandboxutils to report the file system paths and associated symbolic links using GetGpuResource and GetFileContent APIs. Both GPU and MIG devices are supported. If the Sandboxutils discoverer fails, the NVML discoverer is used to report the file system information. Signed-off-by: Evan Lezar <[email protected]> Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Sananya Majumder <[email protected]>
c4d12b7 to
563db0e
Compare
elezar
approved these changes
Sep 24, 2024
This was referenced Aug 28, 2025
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 request adds all the changes related to the usage of the new library libnvidia-sandboxutils (Sandboxutils) to obtain the file system information in CDI spec generation.