2022-08-05 00:32:20 +00:00
|
|
|
set(PATCH ${PROJECT_SOURCE_DIR}/patches/composable_kernel/Fix_Clang_Build.patch)
|
|
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
|
FetchContent_Declare(composable_kernel
|
2023-08-24 00:39:16 +00:00
|
|
|
URL ${DEP_URL_composable_kernel}
|
|
|
|
|
URL_HASH SHA1=${DEP_SHA1_composable_kernel}
|
|
|
|
|
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PATCH}
|
2022-08-05 00:32:20 +00:00
|
|
|
)
|
|
|
|
|
|
2022-09-15 05:11:31 +00:00
|
|
|
FetchContent_GetProperties(composable_kernel)
|
|
|
|
|
if(NOT composable_kernel_POPULATED)
|
|
|
|
|
FetchContent_Populate(composable_kernel)
|
2022-10-05 08:15:16 +00:00
|
|
|
set(BUILD_DEV OFF CACHE BOOL "Disable -Weverything, otherwise, error: 'constexpr' specifier is incompatible with C++98 [-Werror,-Wc++98-compat]" FORCE)
|
2023-08-22 03:08:55 +00:00
|
|
|
# Exclude i8 device gemm instances due to excessive long compilation time and not being used
|
2023-11-13 23:43:38 +00:00
|
|
|
set(DTYPES fp32 fp16 bf16 fp8)
|
2023-08-22 03:08:55 +00:00
|
|
|
set(INSTANCES_ONLY ON)
|
2022-09-15 05:11:31 +00:00
|
|
|
add_subdirectory(${composable_kernel_SOURCE_DIR} ${composable_kernel_BINARY_DIR} EXCLUDE_FROM_ALL)
|
2022-08-05 00:32:20 +00:00
|
|
|
|
2022-09-15 05:11:31 +00:00
|
|
|
add_library(onnxruntime_composable_kernel_includes INTERFACE)
|
|
|
|
|
target_include_directories(onnxruntime_composable_kernel_includes INTERFACE
|
|
|
|
|
${composable_kernel_SOURCE_DIR}/include
|
2023-11-13 23:43:38 +00:00
|
|
|
${composable_kernel_BINARY_DIR}/include
|
2022-09-15 05:11:31 +00:00
|
|
|
${composable_kernel_SOURCE_DIR}/library/include)
|
2023-08-22 03:08:55 +00:00
|
|
|
target_compile_definitions(onnxruntime_composable_kernel_includes INTERFACE __fp32__ __fp16__ __bf16__)
|
2022-09-15 05:11:31 +00:00
|
|
|
endif()
|