ROCm / ROC-smi

ROC System Management Interface
https://github.com/RadeonOpenCompute/ROC-smi/blob/master/README.md
179 stars 55 forks source link

Modified to support importing as module #14

Closed wcpannell closed 6 years ago

wcpannell commented 6 years ago

Added "if name == 'main':" and moved all function calls below it. I also renamed "rocm-smi" to "rocm_smi.py" and created a symbolic link named "rocm-smi" for backwards compatibilty.

These changes allow one to import rocm_smi into any other python script.

All tests pass except the load from file test: "Testing /home/prospector/build/roc-smi/rocm-smi --load... FAILURE: Failed to change GPU OverDrive when loading values from save file /tmp/tmp.e5UI60DD5V/clocks.tmp Test complete: /home/prospector/build/roc-smi/rocm-smi --load" This test also fails on my computer when using the upstream version. If I recreate the test manually it works.

Will diagnose test failure as time allows.

kentrussell commented 6 years ago

I've merged this locally, and it should be included in our 1.8 release. Thus I'll close it since it required some manual work to update it on the master branch so the PR won't be the same.