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

Update to incorporate go-nvml updates to expose interface types #55

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

klueska
Copy link
Contributor

@klueska klueska commented Apr 12, 2024

Closes #57

@klueska klueska marked this pull request as draft April 12, 2024 21:30
@klueska klueska requested a review from elezar April 12, 2024 21:37
@klueska klueska force-pushed the update-go-nvml branch 6 times, most recently from aa5891f to bea8b3e Compare April 14, 2024 10:59
@klueska klueska changed the title Draft: Update to incorporate go-nvml updates to expose interface types Update to incorporate go-nvml updates to expose interface types Apr 14, 2024
@klueska klueska marked this pull request as ready for review April 14, 2024 11:01
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.

LGTM

versions.mk Outdated Show resolved Hide resolved
Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

I think the initial integration looks good. There are some cases where it may make sense to use go-nvlib functionality, but I think this can be done as a follow-up.

The tests also call out some places where specific mock device implementations that could be consumed by other tests may be useful.

pkg/mig/config/config_test.go Show resolved Hide resolved
@@ -47,21 +47,21 @@ func NewMockNvmlMigModeManager(nvml nvml.Interface) Manager {

func (m *nvmlMigModeManager) IsMigCapable(gpu int) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Will there be a follow up to use the equivalent functionality from go-nvlib?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's probably a good idea to audit this code to see what can be used from go-nvlib (or added to go-nvlib as necessary). This code predates go-nvlib so I'm sure there's lots of things that could be simpified now.

@@ -52,38 +52,38 @@ func NewMockNvmlLunaServer() *nvmlMigModeManager {

func (d *mockNvmlA100Device) SetMigMode(mode int) (Return, Return) {
Copy link
Member

Choose a reason for hiding this comment

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

At which point do we replace the usages of mockNvmlA100Device with those from the mock package? (or implement them there)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean by "at which point"? At which point in the current code? They are not replacements for the ones in the mock package, but rather extend from them to provide logic necessary for testing the abstractions in mig-parted specifically.

Copy link
Member

Choose a reason for hiding this comment

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

This was unclear from my side. The question should have been whether it makes sense to move these abstractions to a common location. And if it makes sense, does it have to be done as part of this PR. I think your answer makes it clear that these are not as common as I thought on the first read-through.

@cdesiniotis
Copy link
Contributor

Do we want to include this in the upcoming 0.7.0 release?

@elezar
Copy link
Member

elezar commented Apr 19, 2024

Do we want to include this in the upcoming 0.7.0 release?

I'll leave this to @klueska to decide. I think we said that it was not a hard requirement for the 0.7.0 release.

@klueska
Copy link
Contributor Author

klueska commented Apr 19, 2024

I think we should explicitly leave it out of the imminent release (in case there are any unexpected issues it introduces).

@klueska klueska force-pushed the update-go-nvml branch 3 times, most recently from 46c1ca1 to d42258c Compare April 23, 2024 18:51
@klueska
Copy link
Contributor Author

klueska commented Apr 23, 2024

This is now ready from my perspective. Please review again.

Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

lgtm.

@klueska klueska merged commit 2f087e9 into NVIDIA:main Apr 24, 2024
9 checks passed
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.

3 participants