[rocm-libraries] ROCm/rocm-libraries#9232 (commit 2d25e39)

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.
This commit is contained in:
Harkirat Gill
2026-07-10 12:22:23 +00:00
committed by assistant-librarian[bot]
parent 7a710c3542
commit 4975bd0c8e
2 changed files with 4 additions and 2 deletions

View File

@@ -1402,7 +1402,10 @@ struct DeviceGroupedConvBwdDataMultipleD_Wmma_CShuffleV3
ave_time += RunMultiDGemm<InMemoryDataOperationEnum::Set>(arg, stream_config);
}
arg.Print();
if(stream_config.log_level_ > 0)
{
arg.Print();
}
// Transpose from NHWGC to NGCHW
if constexpr(NeedTransposeKernel)

View File

@@ -139,7 +139,6 @@ TYPED_TEST(TestGroupedConvndBwdData2d, Test2D)
this->conv_params.push_back({2, 1, 1, 1, 32, {8, 8}, {16, 16}, {1, 1}, {1, 1}, {1, 1}, {1, 1}});
this->conv_params.push_back({2, 1, 1, 64, 3, {8, 8}, {16, 16}, {1, 1}, {1, 1}, {1, 1}, {1, 1}});
this->conv_params.push_back({2, 1, 1, 1, 1, {8, 8}, {16, 16}, {1, 1}, {1, 1}, {1, 1}, {1, 1}});
// G=1, stride>1, 2D, no D-tensors. gemms_count in {4, 9, 36}.
this->conv_params.push_back(
{2, 1, 16, 256, 128, {5, 5}, {40, 175}, {2, 2}, {1, 1}, {1, 1}, {1, 1}});