Add amdsmi backend
AMD seems to move away from ROCM SMI to AMD SMI. This library is used for the new AMDSMI
PMT backend. The new backend is tested with ROCm 6.2.0 on a AMD W7700 and on AMD MI210.
A few notes:
- The
amdsmi_processor_handle
struct has (amongst others) fieldscurrent_socket_power
andaverage_socket_power
. Only theaverage_socket_power
seems to be set by theamdsmi_get_power_info
call. We may want to revisit this later, maybe this will change in later ROCm releases or on different GPUs. - The code has the same structure as the
NVML
backend, with separateAMDSMI
andAMDSMIImpl
class, theROCM
class should be refactored similarly (outside the scope of this MR) - Also, we may want to rename the
ROCM
backend toRSMI
(outside the scope of this MR) - No CMake helper file is used (e.g.
Findamd_smi.cmake
), simply settingCMAKE_PREFIX_PATH=/opt/rocm
also works fine and is arguably nicer + more future-proof.
Edited by Bram Veenboer