From 6667a9021713f794a2c9aee4696c19f6cf376235 Mon Sep 17 00:00:00 2001 From: Emily Martins <65371150+ecamartins@users.noreply.github.com> Date: Tue, 14 Jul 2026 08:23:43 +0000 Subject: [PATCH] [rocm-libraries] ROCm/rocm-libraries#8595 (commit 7fbebbb) [CK] Clean up Stream-K remnants in old CK and fix static_assert in CK Tile (#8595) ## Motivation This PR is cleans up some Stream-K documentation (e.g., typos, unneeded docs) and fixes an error in a Stream-K static assert. This PR adds no new functionality. ## Technical Details Exact details about the clean-up changes are as follows: - Removes Stream-K documentation from old CK that were missed in PR #8141. - Fixes `static_assert` syntax in Stream-K kernel by adding `constexpr` to if-else condition and correcting empty message parameter. - Cleans up some typos in some Doxygen comments in the CK Tile Stream-K kernel file. ## Test Plan Ran existing tests locally; no new functionality was added, so no new tests were added. ## Test Result Tests passed. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- client_example/01_gemm/README.md | 2 -- .../kernel/streamk_gemm/streamk_gemm_kernel.hpp | 15 ++++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/client_example/01_gemm/README.md b/client_example/01_gemm/README.md index 6ff4958cee..fd457265f8 100644 --- a/client_example/01_gemm/README.md +++ b/client_example/01_gemm/README.md @@ -139,8 +139,6 @@ Table of supported cases by instance factory with XDL instruction for Row/Row/Ro * **DeviceGemmMultipleDLayernorm** - GEMM fused with layernorm. * **DeviceGemmMultipleDMultipleR** - GEMM fused with reductions and custom global reductions operators. * **DeviceGemmReduce** - GEMM fused with reduction. -* **DeviceGemm_Streamk_V2** - GEMM stream K implementation. Implementation allows to use reduction instead of AtomicAdd. -* **DeviceGemmStreamK** - GEMM stream K implementation using AtomicAdd. ## How to Run diff --git a/include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp b/include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp index 6f359e1bab..2c006ecfe7 100644 --- a/include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp +++ b/include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp @@ -325,11 +325,11 @@ struct StreamKKernel } /** - * @brief Runs the main Stream - K algorithm. - * @param kargs Stream - K kernel arguments. - * @param cta_idx The current Stream - K workgroup's index. + * @brief Runs the main Stream-K algorithm. + * @param kargs Stream-K kernel arguments. + * @param cta_idx The current Stream-K workgroup's index. * @param smem_ptr_0 Pointer to LDS. - * @note It is assumed that the first Stream - K workgroup has a `cta_idx` of zero. If a + * @note It is assumed that the first Stream-K workgroup has a `cta_idx` of zero. If a * non-persistent data-parallel (DP) section is used, then a Stream-K workgroup's `cta_idx` * *should be something like `blockIdx.x` minus number of DP workgroups. */ @@ -374,8 +374,9 @@ struct StreamKKernel { BaseGemm(kargs, tile_idx, num_loop_sk, i_k_a, i_k_b, k_size, smem_ptr_0); } - else if(TilePartitioner::ReductionStrategy == StreamKReductionStrategy::Linear || - TilePartitioner::ReductionStrategy == StreamKReductionStrategy::Tree) + else if constexpr(TilePartitioner::ReductionStrategy == + StreamKReductionStrategy::Linear || + TilePartitioner::ReductionStrategy == StreamKReductionStrategy::Tree) { const auto c_macro_tile_idx = kargs.tile_partitioner.get_output_tile_index(tile_idx); @@ -517,7 +518,7 @@ struct StreamKKernel else { static_assert( - "An implementation does not exist for the chosen reduction strategy."); + false, "An implementation does not exist for the chosen reduction strategy."); } // Prepare for next Stream-K loop iteration.