From 412d05a1d256cd63dddefa409d3213275fe62fc2 Mon Sep 17 00:00:00 2001 From: cloudhan Date: Fri, 5 May 2023 02:20:56 +0800 Subject: [PATCH] [ROCm] Update cmake (#15807) Followup of #15775 --- cmake/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ab87416ff0..6727f43062 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -274,6 +274,9 @@ if (onnxruntime_USE_ROCM) file(GLOB rocm_cmake_components ${onnxruntime_ROCM_HOME}/lib/cmake/*) list(APPEND CMAKE_PREFIX_PATH ${rocm_cmake_components}) + # Force cmake to accept the configured HIP compiler. Because the configured CMAKE_PREFIX_PATH does not work during + # enable_language(HIP), we might need to move configuring of CMAKE_PREFIX_PATH to build.py (in the future). + set(CMAKE_HIP_COMPILER_FORCED ON) enable_language(HIP) # NOTE: Flags -mllvm -amdgpu-early-inline-all=true are critical for gpu kernel code performance. -mllvm passes the