Transpose
The transpose operation permutes the dimensions of a tensor according to a permutation vector. For each output axis i, the value permutation[i] is the source axis taken from the input (so output_dim[i] = input_dim[permutation[i]], and strides are permuted the same way).
On supported cuDNN versions, the graph lowers to the backend transpose operation (CUDNN_BACKEND_OPERATION_TRANSPOSE_DESCRIPTOR).
Requirements
- Native backend transpose support requires cuDNN 9.22.0 or newer. Older toolkits may report
GRAPH_NOT_SUPPORTEDfor transpose nodes.
C++ API
Transpose_attributes provides:
The permutation must have length equal to the input rank, contain each index 0 .. rank-1 exactly once, and describe where each output axis reads from in the input.
Python API
pygraph.transpose(input, permutation, name="")- input: source tensor.
- permutation: list of ints, same semantics as C++.
- name: optional node name.