mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 21:51:28 +00:00
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>
This commit is contained in:
28
test/ck_tile/smoothquant/CMakeLists.txt
Normal file
28
test/ck_tile/smoothquant/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
# Currently ck_tile is only built on gfx9
|
||||
if(GPU_TARGETS MATCHES "gfx9")
|
||||
function (add_smoothquant_test TARGET_NAME MAIN_SRC)
|
||||
message(DEBUG "adding ${TARGET_NAME}")
|
||||
|
||||
add_test_executable(${TARGET_NAME} ${MAIN_SRC})
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
foreach(source IN LISTS ARGN)
|
||||
list(APPEND INSTANCE_SRCS ${source})
|
||||
endforeach()
|
||||
|
||||
target_sources(${TARGET_NAME} PRIVATE ${INSTANCE_SRCS})
|
||||
|
||||
set(COMPILE_OPTIONS)
|
||||
# NOTE: we turn off undefined-func-template to let source compile without explicit declare function specializations
|
||||
list(APPEND COMPILE_OPTIONS -Wno-undefined-func-template -Wno-float-equal)
|
||||
|
||||
target_compile_options(${TARGET_NAME} PRIVATE ${COMPILE_OPTIONS})
|
||||
endfunction(add_smoothquant_test TARGET_NAME MAIN_SRC)
|
||||
|
||||
file(GLOB INSTANCE_SRCS instances/*.cpp)
|
||||
add_smoothquant_test(test_ck_tile_smoothquant_fp16 smoothquant_fp16.cpp ${INSTANCE_SRCS})
|
||||
add_smoothquant_test(test_ck_tile_smoothquant_bf16 smoothquant_bf16.cpp ${INSTANCE_SRCS})
|
||||
|
||||
else()
|
||||
message(DEBUG "Skipping ck_tile smoothquant tests for current target")
|
||||
endif()
|
||||
Reference in New Issue
Block a user