Files
composable_kernel/test/ck_tile/batched_transpose/CMakeLists.txt
Emily Martins c08986b026 Tests for CK Tile Batched Transpose and Smoothquant (#2453)
* Create tests for ck tile batched transpose using example

* Create ck tile tests for smoothquant using examples

* fix precision input strings and convert batched transpose to regression tests

* Code cleanup and fix asserts

* add missing licenses

* update copyright and licensing in files

* Update smoothquant tests to use example's smoothquant.cpp

* Add custom target for batched transpose tests

* Add missing new lines at end of files for CMakelists

* fix typo in batched transpose CMakeList target_compile_options

---------

Co-authored-by: root <root@ctr-ubbsmc16.amd.com>
2025-07-17 09:53:34 -06:00

34 lines
1.5 KiB
CMake

# Currently ck_tile is only built on gfx9
if(GPU_TARGETS MATCHES "gfx9")
function (add_batched_transpose_test TARGET_NAME MAIN_SRC)
message(DEBUG "adding ${TARGET_NAME}")
add_test_executable(${TARGET_NAME} ${MAIN_SRC} batched_transpose_api.cpp)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
# NOTE: we turn off undefined-func-template to let source compile without explicit declare function specializations
list(APPEND EXAMPLE_BATCHED_TRANSPOSE_COMPILE_OPTIONS -Wno-undefined-func-template -Wno-float-equal)
# list(APPEND EXAMPLE_BATCHED_TRANSPOSE_COMPILE_OPTIONS -v --save-temps -Wno-gnu-line-marker)
target_compile_options(${TARGET_NAME} PRIVATE ${EXAMPLE_BATCHED_TRANSPOSE_COMPILE_OPTIONS})
endfunction(add_batched_transpose_test TARGET_NAME MAIN_SRC)
set(CUSTOM_TARGET_NAME test_ck_tile_batched_transpose)
add_custom_target(${CUSTOM_TARGET_NAME})
add_batched_transpose_test(test_ck_tile_batched_transpose_fp16 batched_transpose_fp16.cpp)
add_dependencies(${CUSTOM_TARGET_NAME} test_ck_tile_batched_transpose_fp16)
add_batched_transpose_test(test_ck_tile_batched_transpose_fp8 batched_transpose_fp8.cpp)
add_dependencies(${CUSTOM_TARGET_NAME} test_ck_tile_batched_transpose_fp8)
add_batched_transpose_test(test_ck_tile_batched_transpose_bf16 batched_transpose_bf16.cpp)
add_dependencies(${CUSTOM_TARGET_NAME} test_ck_tile_batched_transpose_bf16)
else()
message(DEBUG "Skipping ck_tile batched_transpose tests for current target")
endif()