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

[LLs] [BE] Simplify identityND #5199

Closed lezcano closed 1 day ago

lezcano commented 2 days ago

The auxiliary function identityND used to take an order parameter, that comes from triton, and a set of dimensions. Now, the order in triton is defined wrt. dim0..dim<rank-1>, so the dimension arg was redundant. This was quite confusing.

We see that in all the uses of identiyND, we would pass the canonical dimensions, other than in one that we simply remove as it was not necessary.

We remove the dims arg and simply return a layout with output dims dim0..dim<rank-1>.