Slow compilation of grouped strided conv wgrad test on gfx1100
- Dominant language
- C++
- Stars
- 25
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
`test_conv_wgrad_asm_emitter_nhwc_krsc_grouped_strided` takes ~30 seconds to compile on gfx1100, compared to <1s for the similar non-strided tests (`test_conv_wgrad_asm_emitter_nhwc_krsc_plain` and `test_conv_wgrad_asm_emitter_nhwc_krsc_grouped`) and <1s for the same test on gfx942.
https://github.com/iree-org/fusilli/blob/main/tests/lit/test_conv_wgrad_asm_emitter_nhwc_krsc_grouped_strided.cpp
## Root Cause
The issue is in IREE's `setContractConfig`. This codepath is hit on gfx1100 because RDNA3 has no f32-input WMMA instructions, so `setVectorDistributionConfig` fails and falls through to `setContractConfig` which only tiles the innermost reduction dimension causing a massive amount of IR to be generated via unrolling. The reduction dims are `[16, 32, 16]` and the config is set to `reduction = [0, 0, 0, 0, 0, 32]`.
## Reproducer
Download [test_conv_wgrad_asm_emitter_nhwc_krsc_grouped_strided.mlir](https://gist.github.com/IanWood1/3525cba992f5f1b7a4f75913a1f0dbe1)
This should take ~30 seconds:
```bash
iree-compile test_conv_wgrad_asm_emitter_nhwc_krsc_grouped_strided.mlir --iree-hal-target-backends=rocm --iree-rocm-target=gfx1100
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with tests/lit/test_conv_wgrad_asm_emitter_nhwc_krsc_grouped_strided.cpp and reproduce the delay using the linked MLIR file and iree-compile command for gfx1100. Inspect IREE's setContractConfig path and its handling of the listed reduction dimensions. Done means the grouped strided test compiles substantially faster without regressing the comparable tests or gfx942 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100