For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
Transpose
struct Transpose
Implemented traitsβ
AnyType,
ImplicitlyDestructible
Methodsβ
transpose_in_placeβ
static def transpose_in_place(input: ManagedTensorSlice[Input, static_spec=input.static_spec], permutations: ManagedTensorSlice[Input, static_spec=permutations.static_spec]) -> Tuple[IndexList[input.static_spec.rank], IndexList[input.static_spec.rank]]
Returns:
Tuple[IndexList[input.static_spec.rank], IndexList[input.static_spec.rank]]
update_input_viewβ
static def update_input_view[dtype: DType, rank: Int, //, output_static_shape: IntTuple, static_permutations: IntTuple](input: ManagedTensorSlice[Input, static_spec=input.static_spec], permutations: ManagedTensorSlice[Input, static_spec=permutations.static_spec]) -> ManagedTensorSlice[Input, static_spec=input.static_spec.with_tile_layout[rank, Layout[*?, *?]]()]
Returns:
ManagedTensorSlice[Input, static_spec=input.static_spec.with_tile_layout[rank, Layout[*?, *?]]()]
executeβ
static def execute[target: StringSlice[StaticConstantOrigin], _trace_name: StringSlice[StaticConstantOrigin], static_permutations: IntTuple, dtype: DType, rank: Int](output: ManagedTensorSlice[Output, static_spec=output.static_spec], input: ManagedTensorSlice[Input, static_spec=input.static_spec], permutations: ManagedTensorSlice[Input, static_spec=permutations.static_spec], ctx: DeviceContext)
shape_implβ
static def shape_impl(input: ManagedTensorSlice[Input, static_spec=input.static_spec], permutations: ManagedTensorSlice[Input, static_spec=permutations.static_spec]) -> IndexList[input.static_spec.rank]
Returns:
shapeβ
static def shape(input: ManagedTensorSlice[Input, static_spec=input.static_spec], permutations: ManagedTensorSlice[Input, static_spec=permutations.static_spec]) -> IndexList[input.static_spec.rank]
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!