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

Investigate usage of pynvml -> rocml delegation object #2

Draft
wants to merge 5 commits into
base: rocm-dev
Choose a base branch
from

Conversation

domcharrier
Copy link

@domcharrier domcharrier commented Apr 18, 2024

  • Investigate usage of pynvml -> rocml delegation object that is put as/instead of the pynvml module into the sys.modules module registry.
  • This allows to use import pynvml in the rest of the code.

Discussion

  • Should the pynvml -> rocml functionality move into the pyrsmi project?
    • I would prefer this because different pynnml-using packages might use different APIs and thus might want to register differing pynvml -> rocml delegation modules. One registration could break another package.
  • How can a nvml handle be represented, is the device number a good replacement for it?

@domcharrier domcharrier requested a review from younseojava April 18, 2024 15:32
@domcharrier domcharrier marked this pull request as draft April 18, 2024 16:15
Implements `nvmlInit` etc. as `def nvmlInit(self): ...` etc.
Since we register an object `Pynvml()` for pynvml in order
to make the pyrsmi routines available via `__getattr__`,
`pynvml.nvmlInit()` etc. gets resolved to `pynvml.nvmlInit(self)` etc.
@domcharrier domcharrier force-pushed the rocm-dev-patch-domcharrier-1 branch from e1d8e3f to 20bba27 Compare April 25, 2024 08:40
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