mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
We are adding more instances of grouped convolution 3d forward with a ConvScale element-wise operation. This commit handles bf8@bf8->fp8 data types combination. * Included an example. * Added instances. * Added a client example. --------- Co-authored-by: Rostyslav Geyyer <rosty.geyyer@amd.com> Co-authored-by: Bartłomiej Kocot <barkocot@amd.com>
71 lines
2.1 KiB
CMake
71 lines
2.1 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)
|
|
set(CK_ENABLE_INT8 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "fp8")
|
|
add_definitions(-DCK_ENABLE_FP8)
|
|
set(CK_ENABLE_FP8 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "bf8")
|
|
add_definitions(-DCK_ENABLE_BF8)
|
|
set(CK_ENABLE_BF8 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "fp16")
|
|
add_definitions(-DCK_ENABLE_FP16)
|
|
set(CK_ENABLE_FP16 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "fp32")
|
|
add_definitions(-DCK_ENABLE_FP32)
|
|
set(CK_ENABLE_FP32 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "fp64")
|
|
add_definitions(-DCK_ENABLE_FP64)
|
|
set(CK_ENABLE_FP64 "ON")
|
|
endif()
|
|
if (DTYPES MATCHES "bf16")
|
|
add_definitions(-DCK_ENABLE_BF16)
|
|
set(CK_ENABLE_BF16 "ON")
|
|
endif()
|
|
message("DTYPES macro set to ${DTYPES}")
|
|
else()
|
|
add_definitions(-DCK_ENABLE_INT8 -DCK_ENABLE_FP8 -DCK_ENABLE_BF8 -DCK_ENABLE_FP16 -DCK_ENABLE_FP32 -DCK_ENABLE_FP64 -DCK_ENABLE_BF16)
|
|
set(CK_ENABLE_ALL_DTYPES "ON")
|
|
endif()
|
|
|
|
if (GPU_TARGETS)
|
|
if (GPU_TARGETS MATCHES "gfx9")
|
|
add_definitions(-DCK_USE_XDL)
|
|
set(CK_USE_XDL "ON")
|
|
endif()
|
|
if (GPU_TARGETS MATCHES "gfx11")
|
|
add_definitions(-DCK_USE_WMMA)
|
|
set(CK_USE_WMMA "ON")
|
|
endif()
|
|
else()
|
|
add_definitions(-DCK_USE_WMMA -DCK_USE_XDL)
|
|
set(CK_USE_XDL "ON")
|
|
set(CK_USE_WMMA "ON")
|
|
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")
|
|
AND (NOT "${subdir}" MATCHES ".vscode"))
|
|
add_subdirectory(${subdir})
|
|
ENDIF()
|
|
ENDFOREACH()
|