Skip to content

Conversation

@ArangoGutierrez
Copy link
Collaborator

inspired by elezar 47f8fd5 elezar@47f8fd5

inspired by elezar 47f8fd5
elezar@47f8fd5

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-authored-by: Evan Lezar <elezar@nvidia.com>
@ArangoGutierrez ArangoGutierrez requested a review from elezar July 12, 2023 14:24
@ArangoGutierrez ArangoGutierrez self-assigned this Jul 12, 2023
@ArangoGutierrez ArangoGutierrez requested a review from klueska July 12, 2023 14:36
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.

Let's name the internal package nvml to reduce the change set as a first step.

"runtime"

"github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml"
"github.com/NVIDIA/go-gpuallocator/internal/gpulib"
Copy link
Member

Choose a reason for hiding this comment

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

Note: if we use:

Suggested change
"github.com/NVIDIA/go-gpuallocator/internal/gpulib"
nvml "github.com/NVIDIA/go-gpuallocator/internal/gpulib"

or even rename the internal package to nvml here it should highlight changes not related to this renaming below.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would argue we just add them to go-nvlib's nvml wrapper directly and open a separate PR there

Copy link
Member

@elezar elezar Jul 13, 2023

Choose a reason for hiding this comment

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

Sure. That's fine too. My point is that I don't want to have changes due to the rename in the same commit as this makes things difficult to review.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@klueska Your point is to not commit the internal/gpulib here, but to merge the functionality in there into go-nvlib/pkg/nvml ? and remove from this PR

"fmt"

"github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml"
"github.com/NVIDIA/go-gpuallocator/internal/gpulib"
Copy link
Member

Choose a reason for hiding this comment

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

Same comment on renaming. That would mean that only the import statement changes in this file.

runtime.SetFinalizer(allocator, func(allocator *Allocator) {
// Explicitly ignore any errors from nvml.Shutdown().
_ = nvml.Shutdown()
// Explicitly ignore any errors from gpulib.Shutdown().
Copy link
Member

Choose a reason for hiding this comment

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

Renaming to nvml would mean that we don't have any changes here.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
@ArangoGutierrez
Copy link
Collaborator Author

Closing in favour of #13

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