[all-commits] [llvm/llvm-project] ae1f70: [mlir] Use hip's config mode to find libraries

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Wed Sep 28 07:36:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae1f707366f74e5271afb01b502ae690656fa9f9
      https://github.com/llvm/llvm-project/commit/ae1f707366f74e5271afb01b502ae690656fa9f9
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M mlir/lib/ExecutionEngine/CMakeLists.txt

  Log Message:
  -----------
  [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




More information about the All-commits mailing list