Replace nvgpu with nvidia-ml-py#2160
Replace nvgpu with nvidia-ml-py#2160matthewfeickert wants to merge 2 commits intoPlasmaControl:masterfrom
Conversation
3671f39 to
f63fb54
Compare
Memory benchmark result| Test Name | %Δ | Master (MB) | PR (MB) | Δ (MB) | Time PR (s) | Time Master (s) |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
test_objective_jac_w7x | 1.12 % | 4.147e+03 | 4.194e+03 | 46.34 | 42.08 | 39.87 |
test_proximal_jac_w7x_with_eq_update | -0.90 % | 6.617e+03 | 6.557e+03 | -59.54 | 164.59 | 164.78 |
test_proximal_freeb_jac | -0.26 % | 1.343e+04 | 1.340e+04 | -34.41 | 89.57 | 89.58 |
test_proximal_freeb_jac_blocked | -0.10 % | 7.728e+03 | 7.720e+03 | -7.67 | 79.54 | 78.70 |
test_proximal_freeb_jac_batched | 0.15 % | 7.713e+03 | 7.724e+03 | 11.63 | 77.81 | 78.62 |
test_proximal_jac_ripple | -1.13 % | 3.648e+03 | 3.606e+03 | -41.31 | 62.49 | 64.32 |
test_proximal_jac_ripple_bounce1d | -1.72 % | 3.853e+03 | 3.787e+03 | -66.38 | 76.13 | 76.65 |
test_eq_solve | 2.62 % | 2.209e+03 | 2.267e+03 | 57.96 | 99.69 | 99.39 |For the memory plots, go to the summary of |
f63fb54 to
11c073b
Compare
|
This is ready for review, but needs a maintainer to approve the CI runs. Let me know if you have any questions. 👍 |
a2a0a9c to
aba1019
Compare
* As nvgpu is no longer maintained and uses pynvml, which directly tells the user
to use nvidia-ml-py instead at import
"The pynvml package is deprecated. Please install nvidia-ml-py instead. If you
did not install pynvml directly, please report this to the maintainers of the
package that installed pynvml for you."
drop nvgpu and replace its nvgpu.gpu_info() call with a single function using
nvidia-ml-py (which uses the pynvml namespace).
* Place a lower bound on nvidia-ml-py of 12.535.77, which was the first release
to support nvmlMemory_v2 which properly accounts for system-reserved memory.
* Remove all mentions of nvgpu in other areas of the codebase and replace them
with nvidia-ml-py, except for publications/ as this is historical information.
- Do NOT add nvidia-ml-py to dependabot.yml as pinning this tightly is an
anti-pattern in library design that will cause installation issues,
especially with NVIDIA libraries.
* Note that nvgpu has been replaced with nvidia-ml-py.
aba1019 to
37170df
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2160 +/- ##
==========================================
- Coverage 94.45% 94.41% -0.04%
==========================================
Files 101 101
Lines 28593 28606 +13
==========================================
+ Hits 27008 27009 +1
- Misses 1585 1597 +12
🚀 New features to boost your workflow:
|
Given that the changes in this PR should be covered by DESC/tests/benchmarks/memory_funcs.py Line 21 in 2471d55 I assume the lack of coverage reported is that the benchmarks haven't finished running / need additional approval to run. |
Benchmarks don't increase coverage, and our CI cannot run GPU things, so this will just have 0 coverage which is fine with the devs |
Great. Thanks for the very fast follow up! |
Resolves #2159
nvgpuis no longer maintained and usespynvml, which directly tells the user to usenvidia-ml-pyinstead at importdrop
nvgpuand replace itsnvgpu.gpu_info()call with a single function usingnvidia-ml-py(which uses thepynvmlnamespace).nvidia-ml-pyof12.535.77, which was the first release to supportnvmlMemory_v2which properly accounts for system-reserved memory.nvgpuin other areas of the codebase and replace them withnvidia-ml-py, except forpublications/as this is historical information.nvidia-ml-pytodependabot.ymlas pinning this tightly will cause installation issues, especially with NVIDIA libraries.Example:
main(2471d55)As I made it a guarded import I can't directly import it from
desc, but is the same codeso
So the memory consumption is effectively the same (good), and an unmaintained dependency can be replaced with a maintained one.