Skip to content

Flow

-iree-convert-mesh-to-flowlink

Convert Mesh dialect operations to flow.

Each mesh corresponds to a default !flow.channel with the same group name.

mesh.mesh @mesh_1(shape = 2x3)
%channel = flow.channel.default "mesh_1" : !flow.channel
If there is onl one mesh in the program than the name is omitted and the
%channel = flow.channel.default : !flow.channel

Each (mesh, mesh_axes) pair partitions and orders the devices into disjoint groups, each corresponding to a !flow.channel to perform a collective operation. For example

mesh.mesh @mesh(shape = 2x3x4x5)
...
%1 = mesh.all_reduce on @mesh mesh_axes = [2, 0] : tensor<10x20xf32>
For more information see Mesh dialect.

The mesh partition and device ordering determines the values for the color and key in the corresponding flow.channel.split operation used to create the channel. For more information on the meaning of color and key see MPI_Comm_split in the MPI standard.

Each !flow.channel is wrapped in an IREE util.global and its construction is done only once with util.initializer.

-iree-flow-annotate-dispatcheslink

Annotates executable dispatches based on their contents.

-iree-flow-canonicalizelink

Flow specific canonicalization pass

Optionslink

-cse-constants    : Do Not CSE constants on canonicalization
-test-convergence : Fails if the patterns fail to converge

-iree-flow-capture-dynamic-dimslink

Captures dynamic shape dimensions required by dispatch operands/results and control flow operations.

-iree-flow-cleanup-tensor-shapeslink

Cleans up any remaining tensor shape metadata after lowering.

-iree-flow-convert-to-flowlink

Convert operations to flow. Currently just a test pass.

Convert operations to flow ops. This pass is currently only used for testing, since the conversion to Flow ops happens within dispatch region formation.

-iree-flow-deduplicate-executableslink

Deduplicates executables that are identical.

-iree-flow-dump-dispatch-graph-passlink

Dump visualization of dispatches within the program.

Optionslink

-output-file              : File path to write to; or `` for stderr or `-` for stdout.
-max-label-len            : Limit attribute/type length to number of chars
-print-attrs              : Print attributes of operations
-print-control-flow-edges : Print control flow edges
-print-data-flow-edges    : Print data flow edges
-print-result-types       : Print result types of operations

-iree-flow-export-benchmark-funcs-passlink

Exports benchmark functions.

Exports all functions and dispatch executables as () -> () benchmark funcs.

-iree-flow-initialize-empty-tensorslink

Initialize empty tensors.

Initialize all empty tensors after dispatch formation to zero or uninitialized allocations.

Optionslink

-zero-fill : Fills empty tensors with zeros.

-iree-flow-inject-dispatch-tracinglink

Injects tracing markers for dispatch operation tensor inputs and outputs.

-iree-flow-inject-tensor-tracinglink

Injects tensor tracing on ops annotated with iree.tensor.trace.

-iree-flow-insert-debug-target-at-ordinallink

Crops and/or traces the program at the specified ordinal.

Optionslink

-break-debug-target : Ordinal at which to insert a break in the program.
-trace-debug-target : Ordinal to insert iree.flow.trace ops around.

-iree-flow-insert-debug-target-at-symbollink

Crops and/or traces the program at the specified symbol.

Optionslink

-break-debug-target : Symbol at which to insert a break in the program.
-trace-debug-target : Symbol to insert iree.flow.trace ops around.

-iree-flow-outline-constantslink

Outlines tensor constants into util.globals at the module level.

Outlines tensor constants throughout the program into globals initialized with stream ops.

-iree-flow-outline-dispatch-externslink

Outlines external dispatches into executables.

-iree-flow-outline-dispatch-regionslink

Outlines dispatch regions into executables.

-iree-top-level-scf-to-cfglink

Converts non-nested SCF constructs to CFG (not traversing into opaque operations).

-iree-verify-input-legalitylink

Checks the legality of the IR at the start of IREE flow transformation pipeline.

Verifies that the input to the Flow transformation pipeline is legal. This includes checking for operations from dialects that are expected to be legalized before this pass.