triton-lang / triton

Development repository for the Triton language and compiler
https://triton-lang.org/
MIT License
13.47k stars 1.66k forks source link

[LAYOUTS] Implement LL conversion for DotOperand(Hopper) #5193

Closed lezcano closed 2 days ago

lezcano commented 3 days ago

We also rewrite the way we implement DotOperand(Ampere) and mma Ampere to promote code reusing. I also started using what I believe is a rather compact pattern to write these things, where you first call identiyND with the repOrder, which gives you an LL with the dims in the correct order, and then you construct the final layout by specifying the tiles by multiplying identity1D maps. Using this allowed me to heavily simplify the handling of the warps of DotOperand which used to be a tad messy.

lezcano commented 3 days ago

I reverted the commit that activated the use of this LL throughout the codebase https://github.com/triton-lang/triton/commit/a6759ac7cb99519f25ce5ec3c311e9941522324a as we should first port the trick in https://github.com/triton-lang/triton/pull/3370 to linear layouts

lezcano commented 2 days ago

I was missing a little thing. Fixed!

The diff is horrible, to review, I suggest you simply read the new implementation