[Mlir-commits] [mlir] bd77e1c - [mlir] Correctly handle HIP_PATH when ROCM_PATH is set

Krzysztof Drewniak llvmlistbot at llvm.org
Tue Sep 27 07:33:41 PDT 2022


Author: Krzysztof Drewniak
Date: 2022-09-27T14:33:33Z
New Revision: bd77e1c827242bde00cbf2ec59e13ce21ef13755

URL: https://github.com/llvm/llvm-project/commit/bd77e1c827242bde00cbf2ec59e13ce21ef13755
DIFF: https://github.com/llvm/llvm-project/commit/bd77e1c827242bde00cbf2ec59e13ce21ef13755.diff

LOG: [mlir] Correctly handle HIP_PATH when ROCM_PATH is set

With the CMake file as written, if code elsewhere had set ROCM_PATH,
then HIP_PATH would not be set, breaking the rest of the ROCm
execution utility handling.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D134674

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index f5bc43021dc8c..85fc811b525a1 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -189,8 +189,8 @@ if(MLIR_ENABLE_ROCM_RUNNER)
     else()
       set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to which ROCm has been installed")
     endif()
-    set(HIP_PATH "${ROCM_PATH}/hip" CACHE PATH "Path to which HIP has been installed")
   endif()
+  set(HIP_PATH "${ROCM_PATH}/hip" CACHE PATH "Path to which HIP has been installed")
   set(CMAKE_MODULE_PATH "${HIP_PATH}/cmake" ${CMAKE_MODULE_PATH})
   find_package(HIP)
   if (NOT HIP_FOUND)


        


More information about the Mlir-commits mailing list