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] Unify the implementation of getShapePerCTATile #5183

Closed lezcano closed 1 day ago

lezcano commented 4 days ago

We unify it and simplify its API (it was taking an unused shape parameter). While doing this, we found that the previous implementation was incorrect at least for AMDWmmaEncodingAttr, as this layout was using the shape parameter.

Interestingly enough the doc in the header file for this function noted that the function is indeed independent of the tensor shape, even though the function does take a shape as an input! https://github.com/triton-lang/triton/blob/0bd30a2f3192204c5a50d5ffde27ad8493f6c026/include/triton/Dialect/TritonGPU/IR/Dialect.h#L113-L114