mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-16 02:54:21 +00:00
* parse examples inside the add_example_executable function
* fix the example 64 cmake file
* add xdl flag to the gemm_bias_softmax_gemm_permute example
* add filtering of tests based on architecture type
* enable test_grouped_gemm for gfx9 only
* enable test_transpose only for gfx9
* only linnk test_transpose if it gets built
* split the gemm instances by architectures
* split gemm_bilinear,grouped_conv_bwd_weight instances by targets
* split instances by architecture
* split grouped_conv instances by architecture
* fix clang format
* fix the if-else logic in group_conv headers
* small fix for grouped convolution instances
* fix the grouped conv bwd weight dl instances
* fix client examples
* only enable client examples 3 and 4 on gfx9
* set the gfx9 macro
* make sure the architecture macros are set by cmake
* use separate set of xdl/wmma flags for host code
* sinmplify the main cmake file
* add conv_fwd_bf8 instance declaration
[ROCm/composable_kernel commit: ae57e5938e]
65 lines
2.0 KiB
CMake
65 lines
2.0 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
project(ck_app)
|
|
add_compile_options(-std=c++17)
|
|
|
|
if (DTYPES)
|
|
add_definitions(-DDTYPES)
|
|
if (DTYPES MATCHES "int8")
|
|
add_definitions(-DCK_ENABLE_INT8)
|
|
if(NOT DEFINED ${CK_ENABLE_INT8})
|
|
set(CK_ENABLE_INT8 "ON")
|
|
endif()
|
|
endif()
|
|
if (DTYPES MATCHES "fp8")
|
|
add_definitions(-DCK_ENABLE_FP8)
|
|
if(NOT DEFINED ${CK_ENABLE_FP8})
|
|
set(CK_ENABLE_FP8 "ON")
|
|
endif()
|
|
endif()
|
|
if (DTYPES MATCHES "fp16")
|
|
add_definitions(-DCK_ENABLE_FP16)
|
|
if(NOT DEFINED ${CK_ENABLE_FP16})
|
|
set(CK_ENABLE_FP16 "ON")
|
|
endif()
|
|
endif()
|
|
if (DTYPES MATCHES "fp32")
|
|
add_definitions(-DCK_ENABLE_FP32)
|
|
if(NOT DEFINED ${CK_ENABLE_FP32})
|
|
set(CK_ENABLE_FP32 "ON")
|
|
endif()
|
|
endif()
|
|
if (DTYPES MATCHES "fp64")
|
|
add_definitions(-DCK_ENABLE_FP64)
|
|
if(NOT DEFINED ${CK_ENABLE_FP64})
|
|
set(CK_ENABLE_FP64 "ON")
|
|
endif()
|
|
endif()
|
|
if (DTYPES MATCHES "bf16")
|
|
add_definitions(-DCK_ENABLE_BF16)
|
|
if(NOT DEFINED ${CK_ENABLE_BF16})
|
|
set(CK_ENABLE_BF16 "ON")
|
|
endif()
|
|
endif()
|
|
message("DTYPES macro set to ${DTYPES}")
|
|
else()
|
|
add_definitions(-DCK_ENABLE_INT8 -DCK_ENABLE_FP8 -DCK_ENABLE_FP16 -DCK_ENABLE_FP32 -DCK_ENABLE_FP64 -DCK_ENABLE_BF16)
|
|
if(NOT DEFINED ${CK_ENABLE_ALL_DTYPES})
|
|
set(CK_ENABLE_ALL_DTYPES "ON")
|
|
endif()
|
|
endif()
|
|
|
|
find_package(composable_kernel COMPONENTS device_other_operations device_gemm_operations device_conv_operations device_reduction_operations)
|
|
if(GPU_TARGETS MATCHES "gfx9")
|
|
find_package(composable_kernel COMPONENTS device_contraction_operations)
|
|
endif()
|
|
find_package(hip REQUIRED PATHS /opt/rocm)
|
|
message(STATUS "Build with HIP ${hip_VERSION}")
|
|
|
|
# add all example subdir
|
|
file(GLOB dir_list LIST_DIRECTORIES true *)
|
|
FOREACH(subdir ${dir_list})
|
|
IF(IS_DIRECTORY "${subdir}" AND (NOT "${subdir}" MATCHES "build"))
|
|
add_subdirectory(${subdir})
|
|
ENDIF()
|
|
ENDFOREACH()
|