Skip to content
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

Find libnvidia-ml in driver root #440

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

elezar
Copy link
Member

@elezar elezar commented Apr 4, 2024

No description provided.

@elezar elezar marked this pull request as draft April 5, 2024 15:18
Copy link
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the context / motivation for this change?

pkg/nvcdi/lib.go Outdated
var nvmlOpts []nvml.Option
candidates, err := l.driver.Libraries().Locate("libnvidia-ml.so.1")
if err != nil {
l.logger.Warningf("Ignoring error in locating libnvidia-ml.so.1: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ignore the error? If we can't find libnvidia-ml.so.1 here then wouldn't we be failing at a later point anyways when we try to initialize NVML?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary reason is that I didn't want to change existing behaviour unintentionally.

@elezar
Copy link
Member Author

elezar commented Apr 6, 2024

What is the context / motivation for this change?

Without this change CDI spec generation fails when running with a driver container.

@elezar elezar force-pushed the cdi-generation-with-driver-root branch from 544e5e4 to 33b332f Compare May 21, 2024 10:06
@elezar elezar marked this pull request as ready for review May 22, 2024 15:02
@elezar elezar force-pushed the cdi-generation-with-driver-root branch 2 times, most recently from fef07f1 to ca00c3b Compare May 28, 2024 10:38
This change ensures that the driver root is used to locate libnvidia-ml.so.1
if required.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the cdi-generation-with-driver-root branch from ca00c3b to c5eda7a Compare June 3, 2024 10:21
@elezar elezar merged commit 9b83d09 into NVIDIA:main Jun 3, 2024
8 checks passed
@elezar elezar deleted the cdi-generation-with-driver-root branch June 3, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants