Skip to content

GlobalOptimization

-iree-global-opt-cleanup-numeric-narrowinglink

Cleans up any numeric narrowing ops inserted by iree-global-opt-infer-numeric-narrowing.

-iree-global-opt-convert-1x1-filter-conv2d-to-matmullink

Convert linalg convolution ops with 1x1 kernels into linalg matrix multiplication ops.

-iree-global-opt-convert-strided-contraction-to-contractionlink

Factors out an extract_slice from contraction-like ops with strided inputs.

-iree-global-opt-data-layout-propagationlink

Propagate pack/unpack ops across other ops to improve fusion

-iree-global-opt-decompose-concatlink

Decomposes concatenations into a destination and a sequence of slice inserts.

Optionslink

-enable-concat-transposition : Allows transposing concatenations such that they occur on the inner most dims.

-iree-global-opt-demote-contraction-inputs-to-bf16link

Demotes inputs (LHS, RHS) of linalg matmul-like ops from f32 to bf16.

Optionslink

-demote-only : Select the type of contraction ops to demote.

-iree-global-opt-detach-elementwise-from-named-opslink

Detaches elementwise ops from named Linalg ops.

-iree-global-opt-erase-unused-linalg-operandslink

Erases unused linalg operand and remove dead code.

-iree-global-opt-expand-tensor-shapeslink

Expands tensor shape dimensions into SSA values across the program.

-iree-global-opt-fuse-dequantization-matmullink

Fuses dequantization and matmul linalg.generic ops.

-iree-global-opt-fuse-silu-horizontal-matmullink

Fuses matmul ops and silu linalg.generic op.

-iree-global-opt-generalize-linalg-named-opslink

Convert some Linalg named ops into linalg.generics.

Optionslink

-enable-generalize-matmul : Convert linalg named opt to generic ops.

-iree-global-opt-infer-numeric-narrowinglink

Infers and inserts util.numeric.optional_narrow ops at points that may be beneficial.

-iree-global-opt-loop-invariant-code-motionlink

Hoist loop invariants out of loops with zero-trip-check.

-iree-global-opt-materialize-homogeneous-encodingslink

Materializes logical encodings to physical encodings if there is a single device target.

-iree-global-opt-optimize-numericslink

Optimizes numerics given annotations added via iree-global-opt-infer-numeric-narrowing.

-iree-global-opt-propagate-linalg-transposelink

Propagates linalg.transpose through a restricted set of ops.

Optionslink

-enable-aggressive-propagation              : Enable aggressive propagation to named ops.
-test-sinking-only                          : Flag used for lit-testing sinking patterns only. Not for general usage
-test-bubbling-only                         : Flag used for lit-testing bubbling patterns only. Not for general usage
-enable-attention-v-transpose               : Enable transposition of attention v operand
-enable-aggressive-propagation-through-conv : enable propagation through convolutions

-iree-global-opt-quantized-conv-to-convlink

Lower quantized_conv to conv

-iree-global-opt-quantized-matmul-to-matmullink

Lower quantized_matmul to matmul

-iree-global-opt-raise-special-opslink

Raises special ops like softmax to the high level linalg.ext representation.

-iree-global-opt-remove-zero-extent-tensorslink

Removes tensors that have 0-extents.

-iree-global-opt-simplify-pack-unpacklink

Simplifies tensor pack and unpack ops.

-iree-global-opt-warn-on-uninitialized-valueslink

Catch some uses of uninitialized values