File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,22 @@ set(version 1.2.0)
3838project (composable_kernel VERSION ${version} LANGUAGES CXX HIP )
3939include (CTest )
4040
41+ # Set the default value of LLVM_MAIN_REVISION to the equivalent of ROCm7.1.1 release
42+ set (LLVM_MAIN_REVISION 524190)
43+ if (CMAKE_CXX_COMPILER MATCHES "/opt/rocm" )
44+ message ("compiler in default /opt/rocm/ path" )
45+ file (READ "/opt/rocm/llvm/include/llvm/Config/llvm-config.h" HEADER_CONTENT )
46+ string (REGEX MATCH "#define LLVM_MAIN_REVISION[ \t ]+([0-9]+)" MATCH_RESULT "${HEADER_CONTENT} " )
47+ set (LLVM_MAIN_REVISION ${CMAKE_MATCH_1} )
48+ elseif (CMAKE_CXX_COMPILER MATCHES "/llvm-project/build" )
49+ message ("compiler in custom /llvm-project/build/ path" )
50+ file (READ "/llvm-project/build/include/llvm/Config/llvm-config.h" HEADER_CONTENT )
51+ string (REGEX MATCH "#define LLVM_MAIN_REVISION[ \t ]+([0-9]+)" MATCH_RESULT "${HEADER_CONTENT} " )
52+ set (LLVM_MAIN_REVISION ${CMAKE_MATCH_1} )
53+ endif ()
54+ message ("From CMake: LLVM_MAIN_REVISION=${LLVM_MAIN_REVISION} " )
55+ add_definitions (-DLLVM_MAIN_REVISION=${LLVM_MAIN_REVISION} )
56+
4157option (ENABLE_CLANG_CPP_CHECKS "Enables clang tidy, cppcheck" ON )
4258option (MIOPEN_REQ_LIBS_ONLY "Build only the MIOpen required libraries" OFF )
4359option (CK_EXPERIMENTAL_BUILDER "Enable experimental builder" OFF )
Original file line number Diff line number Diff line change 3939#define CK_TILE_DEVICE inline __device__
4040#define CK_TILE_HOST_DEVICE inline __host__ __device__
4141#define CK_TILE_DEVICE_EXTERN __device__
42- #if __clang_major__ < 22
42+ #if LLVM_MAIN_REVISION < 554785
4343#define CK_TILE_HOST_DEVICE_EXTERN __host__ __device__
4444#else
4545#define CK_TILE_HOST_DEVICE_EXTERN
You can’t perform that action at this time.
0 commit comments