mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-11 09:40:51 +00:00
fix: guard arg.Print() in WMMA bwd data grouped conv with log level check (#9232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation Resolves https://github.com/ROCm/ROCm/issues/6403. ## Technical Details Stray `arg.Print()` was causing a flood of debug lines when running a torch reproducer that triggers backward-data WMMA grouped-conv path on gfx1151. For example, ``` a_grid_desc_m_ak_container{7744, 7520} b_grid_desc_n_bk_container_{64, 7520} e_grid_desc_mblock_mperblock_nblock_nperblock_container_{7744, 64} a_grid_desc_m_ak_container_{7808, 5024} b_grid_desc_n_bk_container_{128, 5024} e_grid_desc_mblock_mperblock_nblock_nperblock_container_{7808, 128} ``` Guarded the `arg.Print()` with a log level check `stream_config.log_level_ > 0`, matching the logic found in other ``arg.Print()`` statements, [ref](https://github.com/ROCm/rocm-libraries/blob/develop/projects/composablekernel/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_data_multiple_d_wmma_cshuffle_v3.hpp#L1311-L1314). ## Test Plan Compile example (`example/38_grouped_conv_bwd_data_multiple_d/grouped_conv_bwd_data_wmma_v3_fp16.cpp`) and run binary against both patched and unpatched header. Check output to see that debug logging is no longer present with patched version. ## Test Result Unpatched output (flood present): ``` out: dim 5, lengths {32, 4, 192, 28, 28}, strides {602112, 150528, 1, 5376, 192} wei: dim 5, lengths {32, 192, 192, 3, 3}, strides {331776, 1728, 1, 576, 192} in: dim 5, lengths {32, 4, 192, 28, 28}, strides {602112, 150528, 1, 5376, 192} a_grid_desc_m_ak_container_{3136, 1728} b_grid_desc_n_bk_container_{192, 1728} e_grid_desc_mblock_mperblock_nblock_nperblock_container_{3136, 192} Perf: 0 ms, inf TFlops, inf GB/s ``` Patched output (flood gone, conv still runs): ``` out: dim 5, lengths {32, 4, 192, 28, 28}, strides {602112, 150528, 1, 5376, 192} wei: dim 5, lengths {32, 192, 192, 3, 3}, strides {331776, 1728, 1, 576, 192} in: dim 5, lengths {32, 4, 192, 28, 28}, strides {602112, 150528, 1, 5376, 192} Perf: 0 ms, inf TFlops, inf GB/s ``` ## Submission Checklist - [X] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.