From a7e885154f36c5e2333b5920246b94b3d27aaaa6 Mon Sep 17 00:00:00 2001 From: Joseph Groenenboom Date: Mon, 26 Feb 2024 21:53:06 +0000 Subject: [PATCH] Update CK patch in ORT --- cmake/external/composable_kernel.cmake | 3 --- .../composable_kernel/Fix_Clang_Build.patch | 26 +++++++------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/cmake/external/composable_kernel.cmake b/cmake/external/composable_kernel.cmake index b4e6c834c83ab..375b696df4d2e 100644 --- a/cmake/external/composable_kernel.cmake +++ b/cmake/external/composable_kernel.cmake @@ -1,10 +1,7 @@ -set(PATCH ${PROJECT_SOURCE_DIR}/patches/composable_kernel/Fix_Clang_Build.patch) - include(FetchContent) FetchContent_Declare(composable_kernel URL ${DEP_URL_composable_kernel} URL_HASH SHA1=${DEP_SHA1_composable_kernel} - PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PATCH} ) FetchContent_GetProperties(composable_kernel) diff --git a/cmake/patches/composable_kernel/Fix_Clang_Build.patch b/cmake/patches/composable_kernel/Fix_Clang_Build.patch index 15844dd917744..12c32a2c43c4b 100644 --- a/cmake/patches/composable_kernel/Fix_Clang_Build.patch +++ b/cmake/patches/composable_kernel/Fix_Clang_Build.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 04674124c..12e8b8b00 100644 +index 6fc22b18..c2c22925 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ endif() @@ -11,7 +11,7 @@ index 04674124c..12e8b8b00 100644 list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") -@@ -173,27 +173,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) +@@ -201,27 +201,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") @@ -39,7 +39,7 @@ index 04674124c..12e8b8b00 100644 ## HIP find_package(HIP REQUIRED) # Override HIP version in config.h, if necessary. -@@ -215,8 +194,6 @@ if( DEFINED CK_OVERRIDE_HIP_VERSION_PATCH ) +@@ -243,8 +222,6 @@ if( DEFINED CK_OVERRIDE_HIP_VERSION_PATCH ) message(STATUS "CK_HIP_VERSION_PATCH overriden with ${CK_OVERRIDE_HIP_VERSION_PATCH}") endif() message(STATUS "Build with HIP ${HIP_VERSION}") @@ -48,18 +48,7 @@ index 04674124c..12e8b8b00 100644 ## tidy include(EnableCompilerWarnings) -@@ -376,7 +353,9 @@ if(BUILD_DEV) - add_compile_options(-Werror -Weverything) - endif() - #add flags to reduce the size of binaries --add_compile_options(-Oz -flto=thin) -+# -flto requires ORT to use a linker that support LTO and -flto flag shoud be passed to linker together. -+# add_compile_options(-Oz -flto=thin) -+add_compile_options(-Oz) - message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") - - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C ${CMAKE_CFG_INTDIR}) -@@ -482,11 +461,3 @@ rocm_install(FILES +@@ -509,11 +486,3 @@ rocm_install(FILES set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RPM_PACKAGE_LICENSE "MIT") @@ -72,7 +61,7 @@ index 04674124c..12e8b8b00 100644 - HEADER_ONLY -) diff --git a/library/src/tensor_operation_instance/gpu/CMakeLists.txt b/library/src/tensor_operation_instance/gpu/CMakeLists.txt -index 9cb5d0e9a..141a46f3d 100644 +index ac01c1b4..27f2a720 100644 --- a/library/src/tensor_operation_instance/gpu/CMakeLists.txt +++ b/library/src/tensor_operation_instance/gpu/CMakeLists.txt @@ -44,8 +44,14 @@ function(add_instance_library INSTANCE_NAME) @@ -90,3 +79,8 @@ index 9cb5d0e9a..141a46f3d 100644 set_target_properties(${INSTANCE_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) clang_tidy_check(${INSTANCE_NAME}) set(result 0) +@@ -281,4 +287,3 @@ set(DEV_OPS_INC_DIRS + ${PROJECT_SOURCE_DIR}/library/include/ck/ + ) + rocm_install(DIRECTORY ${DEV_OPS_INC_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ck) +-