Files
composable_kernel/test/ck_tile/reduce/CMakeLists.txt
assistant-librarian[bot] 50217c14c8 test: Add umbrella test targets for CK Tile operations (#4301)
## Proposed changes

Adds operation-specific umbrella test targets for CK Tile to enable
running all tests for a specific operation without running the entire
test suite. This improves the development workflow by allowing faster
iteration when working on specific operations.

## Motivation

Previously, developers working on CK Tile operations could only:
- Run individual test executables one at a time
- Run global labels (, , ) which test the entire codebase
- Build all tests for an operation but had no simple way to run them all

This made it cumbersome to validate changes to a specific operation
(e.g., GEMM quantization) without either running tests individually or
running the entire test suite.

### Documentation

- - Comprehensive testing guide with usage examples and implementation
details

## Usage Examples

# Run all GEMM tests with 256 parallel jobs
ninja -j256 ck_tile_gemm_tests

# Run all GEMM block scale (quantization) tests
ninja -j256 ck_tile_gemm_block_scale_tests

# Run all GEMM StreamK tests
ninja -j256 ck_tile_gemm_streamk_tests

## Checklist

Please put an into the boxes that apply. You can also fill these out
after creating the PR. If you're not sure, please don't hesitate to ask.

- [x] I have added tests relevant to the introduced functionality, and
the unit tests are passing locally
- [x] I have added the test to REGRESSION_TESTS list defined at the top
of CMakeLists.txt in tests/CMakeLists.txt, **IF** the test takes more
than 30 seconds to run.
- [x] I have added inline documentation which enables the maintainers
with understanding the motivation
- [x] I have removed the stale documentation which is no longer relevant
after this pull request
- [ ] (If this change is user-facing) I have added release notes which
provide the end users with a brief summary of the improvement from this
pull request
- [x] I have run  on all changed files
- [x] Any dependent changes have been merged

## Discussion

If this is a relatively large or complex change, feel free to start a
discussion by explaining why you chose the solution you did and what
alternatives you considered



---
🔁 Imported from
[ROCm/composable_kernel#3654](https://github.com/ROCm/composable_kernel/pull/3654)
🧑‍💻 Originally authored by @AviralGoelAMD

---------

Co-authored-by: AviralGoelAMD <aviral.goel@amd.com>
Co-authored-by: assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
Co-authored-by: Thomas Ning <Thomas.Ning@amd.com>
2026-03-03 07:39:32 -08:00

36 lines
1.5 KiB
CMake

# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
if(GPU_TARGETS MATCHES "gfx9|gfx11|gfx12")
add_gtest_executable(test_ck_tile_reduce2d test_reduce2d.cpp)
add_gtest_executable(test_ck_tile_multi_reduce2d_threadwise test_multi_reduce2d_threadwise.cpp)
add_gtest_executable(test_ck_tile_multi_reduce2d_multiblock test_multi_reduce2d_multiblock.cpp)
if(result EQUAL 0)
target_link_libraries(test_ck_tile_reduce2d PRIVATE utility)
target_link_libraries(test_ck_tile_multi_reduce2d_threadwise PRIVATE utility)
target_link_libraries(test_ck_tile_multi_reduce2d_multiblock PRIVATE utility)
endif()
# Collect all test targets for umbrella label
set(CK_TILE_REDUCE_TEST_TARGETS
test_ck_tile_reduce2d
test_ck_tile_multi_reduce2d_threadwise
test_ck_tile_multi_reduce2d_multiblock
)
# Label all ck_tile reduce tests with CK_TILE_REDUCE_TESTS for selective execution
foreach(test_target ${CK_TILE_REDUCE_TEST_TARGETS})
set_tests_properties(${test_target} PROPERTIES LABELS "CK_TILE_REDUCE_TESTS")
endforeach()
# Umbrella target to build and run all ck_tile reduce tests
# Usage: ninja ck_tile_reduce_tests
add_custom_target(ck_tile_reduce_tests
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C ${CMAKE_CFG_INTDIR} -L "CK_TILE_REDUCE_TESTS"
DEPENDS ${CK_TILE_REDUCE_TEST_TARGETS}
USES_TERMINAL
COMMENT "Running all ck_tile reduce tests..."
)
endif()