rocm_smi_lib icon indicating copy to clipboard operation
rocm_smi_lib copied to clipboard

Add support for package configuration files

Open atamazov opened this issue 4 years ago • 1 comments

This is required for https://github.com/ROCmSoftwarePlatform/MIOpen.

Why we need rocm_smi_lib:

  • Beginning from ROCm 4.1 RC, MIOpen needs to inform offline compilers about target features (XNACK and SRAMECC).
  • Otherwise HIP/OCL runtime will fail to load code objects OR performance may suffer
  • Target features can be obtained from OpenCL and HIP runtime, but the values are valid ONLY if DKMS driver is up-to-date.
  • Therefore MIOpen needs to know the DKMS driver version.

We are going to use the library for the above purpose.

To find external packages (like compilers, libraries, etc.), MIOpen relies on CMake. However, CMake's find_package() fails to find rocm_smi_lib because it does not provide package configuration files.

We can implement our own Findrocm_smi_lib.cmake but this is not future-proof solution.

I recommend using the https://github.com/RadeonOpenCompute/rocm-cmake to implement package config files. Please refer to CMake documentation for more information.

atamazov avatar Jan 29 '21 21:01 atamazov

/cc @dagamayank @daniellowell @t-tye

atamazov avatar Jan 29 '21 21:01 atamazov