mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-26 08:00:13 +00:00
* Refactor instance_traits_util and add unit tests tests * Address reviewer comments. Just adds some TODOs to indicate deprecated layouts in our reflection. Our strategy is to leave the reflection code broad (covering deprecated features), but keep the builder concepts narrow. Once we've removed deprecated features from all instances, we can remove them from reflection. Also add a comment to the cmake to explain the unit test target test_conv_builder. * Addressed more reviewer comments. * Remove duplicate PassThrough::name Accidentally added this field to the end of the struct, too. The `name` field should be a the start of the struct for consistency.
29 lines
1.0 KiB
CMake
29 lines
1.0 KiB
CMake
include(gtest)
|
|
|
|
# Helper function to create a gtest executable with common properties
|
|
function(add_ck_builder_test test_name)
|
|
add_executable(${test_name} ${ARGN})
|
|
target_compile_features(${test_name} PRIVATE cxx_std_20)
|
|
target_include_directories(${test_name} PRIVATE
|
|
"${PROJECT_SOURCE_DIR}/experimental/builder/include"
|
|
"${PROJECT_SOURCE_DIR}/include"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
)
|
|
target_compile_options(${test_name} PRIVATE
|
|
-Wno-global-constructors
|
|
-Wno-c++20-compat
|
|
)
|
|
target_link_libraries(${test_name} PRIVATE GTest::gtest_main GTest::gmock)
|
|
endfunction()
|
|
|
|
# The test_conv_builder target has all the unit tests (each test should run < 10 ms)
|
|
add_ck_builder_test(test_conv_builder
|
|
test_conv_builder.cpp
|
|
test_instance_traits.cpp
|
|
test_instance_traits_util.cpp
|
|
testing_utils.cpp)
|
|
|
|
# Testing the virtual GetInstanceString methods requires kernel compilation.
|
|
add_ck_builder_test(test_get_instance_string
|
|
test_get_instance_string.cpp)
|