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

Add top-level function to lookup symbols #84

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

elezar
Copy link
Member

@elezar elezar commented Oct 13, 2023

This change adds a top-level LookupSymbol function. This replaces the need to explicitly open a library locally and check the symbols there in clients of these bindings.

Note that this API is considered experimental.

@elezar elezar force-pushed the add-symbol-lookup branch from 0bc2a5e to 5341002 Compare October 13, 2023 13:19
This change adds a top-level LookupSymbol function. This replaces the need
to explicitly open a library locally and check the symbols there in clients
of these bindings.

Note that this API is considered experimental.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the add-symbol-lookup branch from 5341002 to 1ef2d1f Compare October 13, 2023 13:21
@elezar elezar merged commit cda5413 into NVIDIA:main Oct 13, 2023
1 check passed
@elezar elezar deleted the add-symbol-lookup branch October 13, 2023 13:40
Comment on lines +25 to +30
func LookupSymbol(name string) error {
if nvml == nil {
return fmt.Errorf("error looking up %s: library %s not initialized", name, nvmlLibraryName)
}
return nvml.Lookup(name)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make more sense to provide a function that just returns the nvml library itsself and then allow them to call Lookup() on that (or whatever other operation we may have on the DynamicLibrary type in the future)?

elezar added a commit that referenced this pull request Oct 17, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar mentioned this pull request Oct 17, 2023
elezar added a commit that referenced this pull request Oct 17, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 17, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 18, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 19, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 19, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 19, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 19, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 19, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 20, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar added a commit that referenced this pull request Oct 20, 2023
This change reworks the Lookup function added in #84.

It adds an Interface type at a top level with functionality
in an interface.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
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.

2 participants