-
Notifications
You must be signed in to change notification settings - Fork 270
[CK_TILE] Stream-K Tile Engine Test Config File Generation #3662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
This change converts the stream-k smoke tests to use tile engine. Since the m, n, and k values dependent on the CU count of a device, the configs are generated during the Configuration Phase.
Removing redundant tests that are now run via tile engine.
This change updates the Stream-K tile engine interface to ensure that num_wgs_per_tile is propaged and passed into the compare_results function to calculate the rel and abs tolerance. Before, split-k was used, which is incorrect for Stream-K since the split-k value is always 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds generation of Stream-K Tile Engine test configuration files during CMake configure-time so Stream-K “smoke test” coverage can scale (and depend on device CU count) without manually maintained gtests.
Changes:
- Generate Stream-K Tile Engine JSON configs at configure time (in the build directory) using a CU-count query helper.
- Update Stream-K Tile Engine kernel interface to return
(time, num_wgs_per_tile)and usenum_wgs_per_tilefor verification tolerances. - Remove redundant legacy Stream-K smoke gtests/configs and update the Tile Engine Stream-K test to use GPU reference GEMM.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tile_engine/ops/gemm_streamk/gemm_streamk_profiler.hpp | Propagates num_wgs_per_tile into verification path. |
| tile_engine/ops/gemm_streamk/gemm_streamk_instance_builder.py | Makes generated kernels return (time, num_wgs_per_tile) from launch(). |
| test/ck_tile/gemm_streamk_tile_engine/test_gemm_streamk_simple.cpp | Uses GPU reference GEMM and uses num_wgs_per_tile for tolerance. |
| test/ck_tile/gemm_streamk_tile_engine/generate_configs.py | New Python generator for CU-dependent Stream-K configs. |
| test/ck_tile/gemm_streamk_tile_engine/generate_configs.cmake | New CMake helpers to query CU count + generate configs at configure time. |
| test/ck_tile/gemm_streamk_tile_engine/cu_count.cpp | HIP helper executable to query CU count. |
| test/ck_tile/gemm_streamk_tile_engine/configs/simple_test_config.json | Removes static config (replaced by generated configs). |
| test/ck_tile/gemm_streamk_tile_engine/README.md | Documents new config generation flow and CU_COUNT usage. |
| test/ck_tile/gemm_streamk_tile_engine/CMakeLists.txt | Integrates configure-time generation + expands smoke test datatype coverage. |
| test/ck_tile/gemm_streamk/test_gemm_streamk_types.hpp | Removes unused reduction type list. |
| test/ck_tile/gemm_streamk/test_gemm_streamk_smoke_cases.inc | Removes legacy smoke case definitions. |
| test/ck_tile/gemm_streamk/test_gemm_streamk_reduction_cases.inc | Removes legacy reduction case definitions. |
| test/ck_tile/gemm_streamk/smoke_tests/* | Removes redundant legacy smoke test translation units. |
| test/ck_tile/gemm_streamk/CMakeLists.txt | Stops building removed legacy smoke/reduction test executables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This commit makes the following changes: - Uses Typing module for nested type hints - Uses quotes around cu_count_arg argument in generate_configs.cmake in if statements - Adds explicit include for tuple in test_gemm_streamk_simple.cpp - Adds a type for the tiles argument in argparser to check argument validity
Proposed changes
Currently, Stream-K's unit tests are manual gtests. That said, these tests are difficult to scale due to needing to manually create testing types and individual cpp files for each testing variant. Instead, we are moving to tile engine tests to help us scale up our unit testing. PR #3514 laid out the initial Stream-K tile engine test setup. The main purpose of this PR is to add the configs necessary to replicate our smoke tests. Future work will extend our smoke tests to test more instances, tile sizes, etc.
Since our smoke test m, n, and k sizes often rely on the number of compute units (CUs) on a device, static config files are not feasible. Hence, this PR opts to generate various config files at configuration time; these configs are stored in the build directory and are then used by the existing tile engine infrastructure to generate our tests.
The main changes this PR makes are as follows:
Note:
false. But, a future PR will add support for padding in tile engine for Stream-K.Checklist
Please put an
xinto 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.clang-formaton all changed files