Script.transpose¶
- Script.transpose(x)¶
Transpose a 2-D register tensor.
This instruction transposes a 2-D register tensor, swapping its first and second dimensions. This instruction does not change the underlying data of the tensor, but only create a tensor with a new layout.
- Parameters:
x (RegisterTensor) – The register tensor to transpose. It must be a 2-D tensor.
- Returns:
ret – The transposed register tensor. The shape of the output tensor will be [x.shape[1], x.shape[0]].
- Return type:
Notes
Thread group: Can be executed by any sized thread group.