tilus.ir.layout.permute¶
- tilus.ir.layout.permute(layout, dims)[source]¶
Permute the dimensions of the layout.
Given a layout with shape (d_0, d_1, …, d_{n-1}), the permute function will return a new layout with shape (d_{dims[0]}, d_{dims[1]}, …, d_{dims[n-1]}).
- Parameters:
layout (RegisterLayout) – The layout to permute.
dims (Sequence[int]) – The permutation order of the dimensions. The length of dims must be equal to the number of dimensions of the layout.
- Returns:
ret – The permuted layout.
- Return type: