DispatchCreation
-iree-dispatch-creation-bubble-up-expand-shapes
link
Propagate expand_shapes up the program (and collapse_shapes down).
Optionslink
-enable-bubble-up-expand-shapes-across-reduction-ops : Enables propagation of 'expand_shape's through 'linalg.generic's with reductions
-iree-dispatch-creation-bubble-up-extract-slices
link
Bubble up extract_slice
ops through Linalg-like ops
-iree-dispatch-creation-clone-producers-into-dispatch-regions
link
Clone producers into dispatch regions to be isolated above.
Pass to clone into dispatch regions producers of values used in the dispatch regions but defined in the above. This prepares the dispatch regions for converting to dispatch workgroups with explicit captures.
Optionslink
-aggressive : Include operations that are cloned only under aggressive fusion mode
-iree-dispatch-creation-collapse-dimensions
link
Collapse dimensions of Linalg Ops on tensor ops.
Collapse dimensions of Linalg Ops on tensor ops inside dispatch.region ops and hoist the reshaping operations out of the dispatch.
Optionslink
-max-iterations : Maximum number of iterations to wait for collapse dimensions to converge
-iree-dispatch-creation-collapse-reduction-dimensions
link
Collapse reduction dimensions when possible.
-iree-dispatch-creation-convert-dispatch-regions-to-workgroups
link
Convert dispatch regions to dispatch workgroups.
Pass to convert dispatch regions to dispatch workgroups. This pass is intended to be used after dispatch regions have been formed.
Statisticslink
num-dispatches : Number of dispatches created
-iree-dispatch-creation-convert-encoding-to-flow
link
Convert top-level Encoding ops to Flow ops.
Pass to convert top-level Encoding ops to Flow ops, which only converts the Encoding ops outside flow.dispatch.region to Flow.
-iree-dispatch-creation-convert-tensor-to-flow
link
Convert tensor operations to flow
Pass to convert tensor operations to flow.tensor.* operations.
Statisticslink
num-slow-copy-dispatches : Number of slow copy dispatches (for handling slices) created
-iree-dispatch-creation-elementwise-op-fusion
link
Fuse elementwise operations.
Optionslink
-fuse-multi-reduction : Fuse ops that have multiple reduction iterators
-iree-dispatch-creation-fold-unit-extent-dims
link
Fold unit extent dimension of operations.
Imports upstream patterns to fold unit extent dims but with IREE control.
-iree-dispatch-creation-fold-unit-extent-dims-for-func
link
Fold unit extent dimension of operations on a function.
Imports upstream patterns to fold unit extent dims but with IREE control.
-iree-dispatch-creation-form-dispatch-regions
link
Form Dispatch Region Ops from Linalg operations on tensors to form dispatch.regions.
Pass to form dispatch.region ops from Linalg on tensor ops. A dispatch region is created for each tiled loop nest. This pass only moves the root compute op into the dispatch region, allowing producers to be outside.
Optionslink
-aggressive-fusion : Aggressive mode enabling fusions not ready for all backends
-fuse-pad-with-consumers : Enable fusing pad with consumer
-fuse-pad-with-producers : Enable fusion of pad with producers
-iree-dispatch-creation-form-scalar-dispatches
link
Form Dispatch Regions for scalar computations.
-iree-dispatch-creation-fuse-encoding-ops-into-dispatch-regions-pass
link
Fuses set_encoding ops into producer dispatch regions, or forms new dispatches around them.
-iree-dispatch-creation-fuse-horizontal-contractions
link
Fuses horizontal contraction ops
For cases where multiple contractions - that dont have a direct dependence - that have the same LHS operand - all the N dimensions of the RHS operands used are the same Such contractions can be executed as a single contraction, i.e.
A = matmul(lhs, rhs0); B = matmul(lhs, rhs1); C = matmul(lhs, rhs2);
can be combined into result = matmul(lhs, concat_along_N(rhs0, rhs1, rhs2)); A = slice0(result) B = slice1(result) C = slice2(result)
Instead of doing an actual concat of the RHS operands, and extracting slices of the result, the pass generates a single operation with - the lhs operands - all the rhs operands - multiple results representing the individual matmuls
Optionslink
-fusion-limit : Maximum number of contractions fused into one
Statisticslink
num-fusion-groups : Number of fusion groups found
num-size-2-groups : Number of fusion groups of size 2
num-size-3-groups : Number of fusion groups of size 3
-iree-dispatch-creation-fuse-multi-use-elementwise-producer
link
Fuse elementwise linalg operations on tensors when producers have multiple uses.
Optionslink
-num-iterations : Number of iterations to fuse multiuse ops
-iree-dispatch-creation-fusion-preprocessing
link
Run useful preprocessing patterns that help with fusion.
-iree-dispatch-creation-hoist-encoding-ops
link
Hoists tensor encoding ops out of flow dispatch regions.
Optionslink
-hoist-encodings-for-constexpr : Enable the hoisting when the source is a ConstExpr.
-iree-dispatch-creation-materialize-default-workgroup-count-region
link
Canonicalize dispatch workgroups ops.
Apply dispatch workgroups canonicalization patterns.
-iree-dispatch-creation-propagate-encodings
link
Propagate encodings across other operations.
-iree-dispatch-creation-set-encoding
link
Introduces tensor encoding for flow dispatch regions.
Optionslink
-encoding-option : Select the type of encoding options to add.
-iree-dispatch-creation-sink-reshapes
link
Sink reshapes to allow for compute op -> consumer fusion.
-iree-dispatch-creation-split-reduction-ops
link
Split reduction dimension to increase parallelism.
-iree-dispatch-creation-tensor-pad-to-tensor-insert-slice
link
Convert tensor.pad into linalg.fill + tensor.insert_slice.
Optionslink
-skip-one-linalg-use-case : Skip the op that has only one use which is usedby a Linalg op
-iree-dispatch-creation-transpose-generic-ops
link
Transpose generic op loops.