[mlir] Use hip's config mode to find libraries
Instead of using find_package(HIP) to find FindHIP.cmake, which doesn't seem to be the preferred way to find HIP anymore, use find_package(hip CONFIG) to find the HIP configuration. Give preference to ${ROCM_PATH} over ${ROCM_PATH}/hip in order to handle the fact that newer ROCm versions prefer the include path to use ${ROCM_PATH}/include/hip over ${ROCM_PATH}/hip/innclude/hip (the latter throws up a bunch of deprecation warnings) Then, instead of trying to manually find the host-side headers and runtime library by hand, use the hip::host and hip::amdhip64 libraries that the config module defines. This makes the CMake config much less error-prone and brings it in line with the recommended approach to finding HIP. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D134753
Loading
Please sign in to comment