Skip to content

[WaveTranform] estimate SGPR pressure before wave-transform - #3882

Draft
cmc-rep wants to merge 1 commit into
amd-feature/wave-transformfrom
amd/dev/gangc/estimate-sgpr-pressure
Draft

[WaveTranform] estimate SGPR pressure before wave-transform#3882
cmc-rep wants to merge 1 commit into
amd-feature/wave-transformfrom
amd/dev/gangc/estimate-sgpr-pressure

Conversation

@cmc-rep

@cmc-rep cmc-rep commented Aug 12, 2026

Copy link
Copy Markdown

This is a draft for idea-sharing

@cmc-rep
cmc-rep marked this pull request as draft August 12, 2026 22:47
@rocm-cciapp

rocm-cciapp Bot commented Aug 12, 2026

Copy link
Copy Markdown

@cmc-rep cmc-rep changed the title [WaveTranform] Register estimation problem [WaveTranform] estimate SGPR pressure before wave-transform Aug 12, 2026
@cmc-rep

cmc-rep commented Aug 13, 2026

Copy link
Copy Markdown
Author

@cdevadas @lalaniket8 not really asking for formal code review. Just make this PR a place for discussion:

Right now, if I measure SGPR pressure after WaveTransform for RCCL case, it is 564. If I measure lanemask + SGPR pressure using this pass on per-lane CFG before RA, it is like 138 + 4. So it is way off. Likely it means this algorithm needs improvement, and WaveTransform also needs improvement.

Finally, feel free to take this piece for the WaveTransform project.

@cdevadas

Copy link
Copy Markdown

@cdevadas @lalaniket8 not really asking for formal code review. Just make this PR a place for discussion:

Right now, if I measure SGPR pressure after WaveTransform for RCCL case, it is 564. If I measure lanemask + SGPR pressure using this pass on per-lane CFG before RA, it is like 138 + 4. So it is way off. Likely it means this algorithm needs improvement, and WaveTransform also needs improvement.

Finally, feel free to take this piece for the WaveTransform project.

Sure. It is hard to judge the pressure beforehand. This disparity is huge. I observed almost the similar difference when I incorporated the existing register pressure tracker earlier. We need to tighten the WaveTransform implementation for more optimal ACC initialization to keep them closer to the blocks they are used. Sure, we can try to use this analysis and see if it can be improved.

@cmc-rep

cmc-rep commented Aug 13, 2026

Copy link
Copy Markdown
Author

I counted 550+ sgpr initialization after WaveTransform in the entry block. So maybe my estimate is pretty close if we can fix the problem in WaveTranform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants