ROCm / pyrsmi

python package of rocm-smi-lib
MIT License
18 stars 6 forks source link

`smi_get_device_compute_process` does not use the device id #4

Closed fxmarty closed 1 year ago

fxmarty commented 1 year ago

Hi, I noticed that the docstring of smi_get_device_compute_process is wrong: https://github.com/RadeonOpenCompute/pyrsmi/blob/48293f4315922ee26db0ac981e117628e6a40dc2/pyrsmi/rocml.py#L340. The device (or index?) dev is never used, thus all compute process ids are returned, no matter the device.

fxmarty commented 1 year ago

cc @younseojava

younseojava commented 1 year ago

@fxmarty Thank you for pointing it out! I've created a PR to fix this.

fxmarty commented 1 year ago

Thank you @younseojava for the fix! Do you know if there is a way with pyrsmi to find the compute pids for specific device ids?

younseojava commented 1 year ago

@fxmarty pyrsmi is based on rocm-smi-lib and this is the limit. AMD recently released a better version of SMI called amdsmi, and it has 'process' command that gives pids for specific devices: link. It has better python interface that allow you to create a python package yourself (via pyproject.toml).

fxmarty commented 1 year ago

Great than you!