-
Notifications
You must be signed in to change notification settings - Fork 31
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
Comparison with other Python NVML bindings #2
Comments
Copying the authors of these other implementations in case they have thoughts on what was missing in the original package and what could be improved, @lukeyeager @nicolargo @fbcotter @jonsafari. |
Not a lot was wrong or missing with the original, for me it was mainly:
Most of the work I've done on py3nvml has been addressing these issues and adding in some extra utility functions that I've found useful, but could easily be moved to another library. Keeping up to date with nvml is hard, for example there was another release 5 days ago - 418.56 which already makes py3nvml slightly behind. |
Hi Fergal,
Agreed the nvml bindings are out of data. This was an outstanding action (and a large task) to upgrade the code.
I did review the py3nvml, the added docstrings to the nvml functions are nice. Where these descriptions of parameters, enumeration, return codes and functions sourced from the online documentation?
Ken Hester | NVIDIA Solutions Architect
c: 832-216-8736
khester@nvidia.com<mailto:khester@nvidia.com>
From: Fergal Cotter <notifications@github.com>
Sent: Monday, March 25, 2019 12:20 PM
To: gpuopenanalytics/pynvml <pynvml@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [gpuopenanalytics/pynvml] Comparison with other Python NVML bindings (#2)
Not a lot was wrong or missing with the original<https://pypi.org/project/nvidia-ml-py/>, for me it was mainly:
* It was wildly out of date with the current c version of nvml<https://github.com/NVIDIA/nvidia-settings/blob/master/src/nvml.h>
* It didn't support python3
* It looks like it was automatically generated so there was no docstrings or help for any of the underlying functions.
Most of the work I've done on py3nvml has been addressing these issues and adding in some extra utility functions that I've found useful, but could easily be moved to another library.
Keeping up to date with nvml is hard, for example there was another release 5 days ago - 418.56<https://github.com/NVIDIA/nvidia-settings/releases/tag/418.56> which already makes py3nvml slightly behind.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#2 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ASakVX_A4jimercNmxcG-m7y5ZzruRmxks5vaQU2gaJpZM4cEqeQ>.
…-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
|
Hi Ken, The descriptions and dosctrings were taken from the latest nvml header file https://github.com/NVIDIA/nvidia-settings/blob/master/src/nvml.h. I've just copied them over for each function as a guide. They are sadly not only in a non-pythonic shape, but incorrect. The python functions return the result and raise exceptions, whereas the docstring implies you need to pass the destination for the result as a parameter and interrogate the return value for errors. They look like they've been formatted to automatically generate nice documentation on NVIDIA developer zone, I'd hoped to change them a little so that they would work with sphinx and we could get readthedocs style documentation for the functions, but I couldn't see an easy way to do this without painstakingly reformatting them by hand. |
Looks to me like all the other repos listed start with the old "official" python2-compliant bindings from NVIDIA and update them. In my repo (https://github.com/lukeyeager/pynvml), I started from scratch. I mostly just wanted to show off how cool pybind11 is. The amount of code is super tiny (see here), but the number of supported functions is super low. |
That's pretty cool. I think it'd be great for a more modern Python binding around nvml to exist. @lukeyeager do you have any intentions on continuing your work? Personally as more of an end-user, I'm more excited about seeing functionality built on top of pynvml (like dashboards) than in the underlying wrapping technology. I'm personally inclined to build off of what's here (as archaic as it may be) until something nicer exists. If something nicer did exist (*nudges @lukeyeager) that'd be swell :) |
@mrocklin not right now, no. But you basically only need to go through the nvml header and add the rest of the APIs (IIRC). Have at it, if you like! |
It looks like NVIDIA has also updated their bindings on PyPi I am guessing that this is the best choice to use now? |
We’ve been updating and using Mostly this conversation was spurred out of an interest in figuring out what role this library plays in this space. As well as trying to figure out how best to support the community with it. |
Have noticed there are a few other implementations of Python NVML bindings. It seems worthwhile to compare these to see what they offer and how they differ (particularly from what is here).
The text was updated successfully, but these errors were encountered: