Expand description
Memory layout optimization pass.
Assigns optimal memory layouts to tensor global variables based on the target backend’s preferred format, and tracks where layout conversions would be needed.
Structs§
- Layout
Transform - Assigns a target memory layout to all tensor-typed global variables that do not already have a layout annotation.
- Transpose
Insertion - Pass that detects layout mismatches at graph boundaries and records the transposes needed to convert between layouts.
- Transpose
Record - Information about a needed transpose at a graph boundary.
Functions§
- count_
layout_ mismatches - Counts the number of layout mismatches between global variables.
- layout_
permutation - Returns the permutation needed to convert from one layout to another.
- preferred_
layout_ for_ target - Returns the preferred memory layout for a given backend target name.
- reorder_
dims - Reorder 4-D shape dimensions from one layout to another.