triton.language.permute¶
- triton.language.permute(input, *dims, _semantic=None)¶
Permutes the dimensions of a tensor.
- Parameters:
input (Block) – The input tensor.
dims – The desired ordering of dimensions. For example,
(2, 1, 0)reverses the order dims in a 3D tensor.
dimscan be passed as a tuple or as individual parameters:# These are equivalent permute(x, (2, 1, 0)) permute(x, 2, 1, 0)
trans()is equivalent to this function, except whendimsis empty, it tries to swap the last two axes.This function can also be called as a member function on
tensor, asx.permute(...)instead ofpermute(x, ...).