Investigate why reduction fusions are not being sent to rocMLIR
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 333
- Forks
- 150
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 54
Description
DOR (Definition of Ready)
This can be worked on now.
Description
As a software developer I want to investigate why reduction fusions don't seem to be going to rocMLIR. Here is an example from running unet with the following command:
MIGRAPHX_ENABLE_MLIR_REDUCE_FUSION=1 MIGRAPHX_ENABLE_MLIR_GEG_FUSION=1 MIGRAPHX_MLIR_ENABLE_SPLITK=1 MIGRAPHX_MLIR_USE_SPECIFIC_OPS="fused,attention,dot,fused,convolution" ./AMDMIGraphX/build/bin/driver perf /mnt/nas_share/migraphx/models/sd/stable-diffusion-2-onnx/unet/model.onnx --fp16 --input-dim @sample 2 4 64 64 @timestep 1 @encoder_hidden_states 2 64 1024
In looking at the output from this run, I see lots of kernels like: gpu::code_object::mul_reduce_sum_kernel: 0.138859ms / 8 = 0.0173574ms, 1%} that don't get sent to MLIR.
DOD (Definition of Done)
- Understand why reductions are not being sent to rocMLIR
- Implement a fix (if necessary)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the supplied driver perf command and inspect whether gpu::code_object::mul_reduce_sum_kernel entries are routed to rocMLIR. Trace the reduction-fusion decision from that output; done means explaining why these reductions are excluded and implementing a fix if necessary, then confirming the behavior with the same workload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100