OVERVIEW: MLIR test case reduction tool.
USAGE: mlir-reduce [options]
OPTIONS:
General options:
Reduction Passes to Run
--pass-pipeline - A textual description of a pass pipeline to run
Passes:
--affine-data-copy-generate - Generate explicit copying for affine memory operations
--fast-mem-capacity= - Set fast memory space capacity in KiB (default: unlimited)
--fast-mem-space= - Fast memory space identifier for copy generation (default: 1)
--generate-dma - Generate DMA instead of point-wise copy
--min-dma-transfer= - Minimum DMA transfer size supported by the target in bytes
--skip-non-unit-stride-loops - Testing purposes: avoid non-unit stride loop choice depths for copy placement
--slow-mem-space= - Slow memory space identifier for copy generation (default: 0)
--tag-mem-space= - Tag memory space identifier for copy generation (default: 0)
--affine-loop-coalescing - Coalesce nested loops with independent bounds into a single loop
--affine-loop-fusion - Fuse affine loop nests
--fusion-compute-tolerance= - Fractional increase in additional computation tolerated while fusing
--fusion-fast-mem-space= - Faster memory space number to promote fusion buffers to
--fusion-local-buf-threshold= - Threshold size (KiB) for promoting local buffers to fast memory space
--fusion-maximal - Enables maximal loop fusion
--mode= - fusion mode to attempt
=greedy - Perform greedy (both producer-consumer and sibling) fusion
=producer - Perform only producer-consumer fusion
=sibling - Perform only sibling fusion
--affine-loop-invariant-code-motion - Hoist loop invariant instructions outside of affine loops
--affine-loop-normalize - Apply normalization transformations to affine loop-like ops
--affine-loop-tile - Tile affine loop nests
--cache-size= - Set size of cache to tile for in KiB
--separate - Separate full and partial tiles
--tile-size= - Use this tile size for all loops
--tile-sizes= - List of tile sizes for each perfect nest (overridden by -tile-size)
--affine-loop-unroll - Unroll affine loops
--unroll-factor= - Use this unroll factor for all loops being unrolled
--unroll-full - Fully unroll loops
--unroll-full-threshold= - Unroll all loops with trip count less than or equal to this
--unroll-num-reps= - Unroll innermost loops repeatedly this many times
--unroll-up-to-factor - Allow unrolling up to the factor specified
--affine-loop-unroll-jam - Unroll and jam affine loops
--unroll-jam-factor= - Use this unroll jam factor for all loops (default 4)
--affine-parallelize - Convert affine.for ops into 1-D affine.parallel
--max-nested= - Maximum number of nested parallel loops to produce. Defaults to unlimited (UINT_MAX).
--parallel-reductions - Whether to parallelize reduction loops. Defaults to false.
--affine-pipeline-data-transfer - Pipeline non-blocking data transfers between explicitly managed levels of the memory hierarchy
--affine-scalrep - Replace affine memref acceses by scalars by forwarding stores to loads and eliminating redundant loads
--affine-simplify-structures - Simplify affine expressions in maps/sets and normalize memrefs
--affine-super-vectorize - Vectorize to a target independent n-D vector abstraction
--test-fastest-varying= - Specify a 1-D, 2-D or 3-D pattern of fastest varying memory dimensions to match. See defaultPatterns in Vectorize.cpp for a description and examples. This is used for testing purposes
--vectorize-reductions - Vectorize known reductions expressed via iter_args. Switched off by default.
--virtual-vector-size= - Specify an n-D virtual vector size for vectorization
--arith-bufferize - Bufferize Arithmetic dialect ops.
--alignment= - Create global memrefs with a specified alignment
--arith-expand - Legalize Arithmetic ops to be convertible to LLVM.
--arm-neon-2d-to-intr - Convert Arm NEON structured ops to intrinsics
--async-parallel-for - Convert scf.parallel operations to multiple async compute ops executed concurrently for non-overlapping iteration ranges
--async-dispatch - Dispatch async compute tasks using recursive work splitting. If `false` async compute tasks will be launched using simple for loop in the caller thread.
--min-task-size= - The minimum task size for sharding parallel operation.
--num-workers= - The number of available workers to execute async operations. If `-1` the value will be retrieved from the runtime.
--async-runtime-policy-based-ref-counting - Policy based reference counting for Async runtime operations
--async-runtime-ref-counting - Automatic reference counting for Async runtime operations
--async-runtime-ref-counting-opt - Optimize automatic reference counting operations for theAsync runtime by removing redundant operations
--async-to-async-runtime - Lower high level async operations (e.g. async.execute) to theexplicit async.runtime and async.coro operations
--eliminate-blocking-await-ops - Rewrite functions with blocking async.runtime.await as coroutines with async.runtime.await_and_resume.
--buffer-deallocation - Adds all required dealloc operations for all allocations in the input program
--buffer-hoisting - Optimizes placement of allocation operations by moving them into common dominators and out of nested regions
--buffer-loop-hoisting - Optimizes placement of allocation operations by moving them out of loop nests
--buffer-results-to-out-params - Converts memref-typed function results to out-params
--canonicalize - Canonicalize operations
--disable-patterns= - Labels of patterns that should be filtered out during application
--enable-patterns= - Labels of patterns that should be used during application, all other patterns are filtered out
--max-iterations= - Seed the worklist in general top-down order
--region-simplify - Seed the worklist in general top-down order
--top-down - Seed the worklist in general top-down order
--control-flow-sink - Sink operations into conditional blocks
--convert-affine-for-to-gpu - Convert top-level AffineFor Ops to GPU kernels
--gpu-block-dims= - Number of GPU block dimensions for mapping
--gpu-thread-dims= - Number of GPU thread dimensions for mapping
--convert-arith-to-llvm - Convert Arithmetic dialect to LLVM dialect
--index-bitwidth= - Bitwidth of the index type, 0 to use size of machine word
--convert-arith-to-spirv - Convert Arithmetic dialect to SPIR-V dialect
--emulate-non-32-bit-scalar-types - Emulate non-32-bit scalar types with 32-bit ones if missing native support
--convert-async-to-llvm - Convert the operations from the async dialect into the LLVM dialect
--convert-bufferization-to-memref - Convert operations from the Bufferization dialect to the MemRef dialect
--convert-complex-to-llvm - Convert Complex dialect to LLVM dialect
--convert-complex-to-standard - Convert Complex dialect to standard dialect
--convert-elementwise-to-linalg - Convert ElementwiseMappable ops to linalg
--convert-gpu-launch-to-vulkan-launch - Convert gpu.launch_func to vulkanLaunch external call
--convert-gpu-to-nvvm - Generate NVVM operations for gpu operations
--index-bitwidth= - Bitwidth of the index type, 0 to use size of machine word
--convert-gpu-to-rocdl - Generate ROCDL operations for gpu operations
--index-bitwidth= - Bitwidth of the index type, 0 to use size of machine word
--runtime= - Runtime code will be run on (default is Unknown, can also use HIP or OpenCl)
=unknown - Unknown (default)
=HIP - HIP
=OpenCL - OpenCL
--convert-gpu-to-spirv - Convert GPU dialect to SPIR-V dialect
--convert-linalg-tiled-loops-to-scf - Lower linalg tiled loops to SCF loops and parallel loops
--convert-linalg-to-affine-loops - Lower the operations from the linalg dialect into affine loops
--convert-linalg-to-llvm - Convert the operations from the linalg dialect into the LLVM dialect
--convert-linalg-to-loops - Lower the operations from the linalg dialect into loops
--convert-linalg-to-parallel-loops - Lower the operations from the linalg dialect into parallel loops
--convert-linalg-to-spirv - Convert Linalg dialect to SPIR-V dialect
--convert-linalg-to-std - Convert the operations from the linalg dialect into the Standard dialect
--convert-math-to-libm - Convert Math dialect to libm calls
--convert-math-to-llvm - Convert Math dialect to LLVM dialect
--convert-math-to-spirv - Convert Math dialect to SPIR-V dialect
--convert-memref-to-llvm - Convert operations from the MemRef dialect to the LLVM dialect
--index-bitwidth= - Bitwidth of the index type, 0 to use size of machine word
--use-aligned-alloc - Use aligned_alloc in place of malloc for heap allocations
--convert-memref-to-spirv - Convert MemRef dialect to SPIR-V dialect
--bool-num-bits= - The number of bits to store a boolean value
--convert-openacc-to-llvm - Convert the OpenACC ops to LLVM dialect
--convert-openacc-to-scf - Convert the OpenACC ops to OpenACC with SCF dialect
--convert-openmp-to-llvm - Convert the OpenMP ops to OpenMP ops with LLVM dialect
--convert-parallel-loops-to-gpu - Convert mapped scf.parallel ops to gpu launch operations
--convert-pdl-to-pdl-interp - Convert PDL ops to PDL interpreter ops
--convert-scf-to-openmp - Convert SCF parallel loop to OpenMP parallel + workshare constructs.
--convert-scf-to-spirv - Convert SCF dialect to SPIR-V dialect.
--convert-scf-to-std - Convert SCF dialect to Standard dialect, replacing structured control flow with a CFG
--convert-shape-constraints - Convert shape constraint operations to the standard dialect
--convert-shape-to-std - Convert operations from the shape dialect into the standard dialect
--convert-spirv-to-llvm - Convert SPIR-V dialect to LLVM dialect
--convert-std-to-llvm - Convert scalar and vector operations from the Standard to the LLVM dialect
--data-layout= - String description (LLVM format) of the data layout that is expected on the produced module
--emit-c-wrappers - Emit wrappers for C-compatible pointer-to-struct memref descriptors
--index-bitwidth= - Bitwidth of the index type, 0 to use size of machine word
--use-bare-ptr-memref-call-conv - Replace FuncOp's MemRef arguments with bare pointers to the MemRef element types
--convert-std-to-spirv - Convert Standard dialect to SPIR-V dialect
--emulate-non-32-bit-scalar-types - Emulate non-32-bit scalar types with 32-bit ones if missing native support
--convert-vector-to-gpu - Lower the operations from the vector dialect into the GPU dialect
--convert-vector-to-llvm - Lower the operations from the vector dialect into the LLVM dialect
--enable-amx - Enables the use of AMX dialect while lowering the vector dialect.
--enable-arm-neon - Enables the use of ArmNeon dialect while lowering the vector dialect.
--enable-arm-sve - Enables the use of ArmSVE dialect while lowering the vector dialect.
--enable-index-optimizations - Allows compiler to assume indices fit in 32-bit if that yields faster code
--enable-x86vector - Enables the use of X86Vector dialect while lowering the vector dialect.
--reassociate-fp-reductions - Allows llvm to reassociate floating-point reductions for speed
--convert-vector-to-rocdl - Lower the operations from the vector dialect into the ROCDL dialect
--convert-vector-to-scf - Lower the operations from the vector dialect into the SCF dialect
--full-unroll - Perform full unrolling when converting vector transfers to SCF
--lower-permutation-maps - Replace permutation maps with vector transposes/broadcasts before lowering transfer ops
--lower-tensors - Lower transfer ops that operate on tensors
--target-rank= - Target vector rank to which transfer ops should be lowered
--convert-vector-to-spirv - Convert Vector dialect to SPIR-V dialect
--cse - Eliminate common sub-expressions
--decorate-spirv-composite-type-layout - Decorate SPIR-V composite type with layout info
--finalizing-bufferize - Finalize a partial bufferization
--fold-memref-subview-ops - Fold memref.subview ops into consumer load/store ops
--func-bufferize - Bufferize func/call/return ops
--gpu-async-region - Make GPU ops async
--gpu-kernel-outlining - Outline gpu.launch bodies to kernel functions
--data-layout-str= - String containing the data layout specification to be attached to the GPU kernel module
--gpu-to-llvm - Convert GPU dialect to LLVM dialect with GPU runtime calls
--gpu-binary-annotation= - Annotation attribute string for GPU binary
--inline - Inline function calls
--default-pipeline= - The default optimizer pipeline used for callables
--max-iterations= - Maximum number of iterations when inlining within an SCC
--op-pipelines= - Callable operation specific optimizer pipelines (in the form of `dialect.op(pipeline)`)
--launch-func-to-vulkan - Convert vulkanLaunch external call to Vulkan runtime external calls
--linalg-bufferize - Bufferize the linalg dialect
--linalg-comprehensive-module-bufferize - Bufferize (tensor into memref) for a Module.
--allow-return-memref - Allows the return of memrefs (for testing purposes only)
--allow-unknown-ops - Allows unknown (not bufferizable) ops in the input IR.
--analysis-fuzzer-seed= - Analyze ops in random order with a given seed (fuzzer)
--create-deallocs - Specify if buffers should be deallocated. For compatibility with core bufferization passes.
--fully-dynamic-layout-maps - Generate MemRef types with dynamic offset+strides by default.
--init-tensor-elimination - (Experimental) Try to eliminate init_tensor operations that are anchored at an insert_slice op
--print-conflicts - Annotates IR with RaW conflicts. Requires test-analysis-only.
--test-analysis-only - Only runs inplaceability analysis (for testing purposes only)
--use-alloca - Use stack allocations for memrefs (for testing purposes only)
--use-memref.copy - Use a copy operation implemented as a Linalg op.
--linalg-detensorize - Detensorize linalg ops
--aggressive-mode - Detensorize all ops that qualify for detensoring along with branch operands and basic-block arguments.
--linalg-fold-reshape-ops-by-linearization- Fold TensorReshapeOps with generic/indexed generic ops by linearization
--allow-folding-unit-dim-reshapes - Allow fusing linalg.tensor_reshape ops that performs unit dimension collapsing
--linalg-fold-unit-extent-dims - Remove unit-extent dimension in Linalg ops on tensors
--fold-one-trip-loops-only - Only folds the one-trip loops from Linalg ops on tensors (for testing purposes only)
--linalg-fuse-elementwise-ops - Fuse elementwise operations on tensors
--allow-folding-unit-dim-reshapes - Allow fusing linalg.tensor_reshape ops that performs unit dimension collapsing
--linalg-generalize-named-ops - Convert named ops into generic ops
--linalg-inline-scalar-operands - Inline scalar operands into linalg generic ops
--linalg-named-op-conversion - Convert from one named linalg op to another.
--linalg-promote-subviews - Promote subview ops to local buffers
--test-promote-dynamic - Test generation of dynamic promoted buffers
--test-use-alloca - Test generation of alloca'ed buffers.
--linalg-strategy-decompose-pass - Configurable pass to apply pattern-based generalization.
--anchor-func= - Which func op is the anchor to latch on.
--linalg-strategy-enable-pass - Configurable pass to enable the application of other pattern-based linalg passes.
--anchor-func= - Which func op is the anchor to latch on.
--linalg-strategy-generalize-pass - Configurable pass to apply pattern-based generalization.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--linalg-strategy-interchange-pass - Configurable pass to apply pattern-based iterator interchange.
--anchor-func= - Which func op is the anchor to latch on.
--linalg-strategy-lower-vectors-pass - Configurable pass to lower vector operations.
--anchor-func= - Which func op is the anchor to latch on.
--linalg-strategy-pad-pass - Configurable pass to apply padding and hoisting.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--linalg-strategy-promote-pass - Configurable pass to apply pattern-based linalg promotion.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--linalg-strategy-remove-markers-pass - Cleanup pass that drops markers.
--anchor-func= - Which func op is the anchor to latch on.
--linalg-strategy-tile-and-fuse-pass - Configurable pass to apply pattern-based tiling and fusion.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--linalg-strategy-tile-pass - Configurable pass to apply pattern-based linalg tiling.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--linalg-strategy-vectorize-pass - Configurable pass to apply pattern-based linalg vectorization.
--anchor-func= - Which func op is the anchor to latch on.
--anchor-op= - Which linalg op within the func is the anchor to latch on.
--vectorize-padding - Enable vectorization of padding ops.
--linalg-tile - Tile operations in the linalg dialect
--distribution-types= - DistributionTypes (if loop-type=tiled_loop)
--loop-type= - Specify the type of loops to generate: for, parallel or tiled_loop
--tile-sizes= - Tile sizes
--llvm-legalize-for-export - Legalize LLVM dialect to be convertible to LLVM IR
--loop-invariant-code-motion - Hoist loop invariant instructions outside of the loop
--lower-affine - Lower Affine operations to a combination of Standard and SCF operations
--lower-host-to-llvm - Lowers the host module code and `gpu.launch_func` to LLVM
--memref-expand - Legalize memref operations to be convertible to LLVM.
--normalize-memrefs - Normalize memrefs
--opt-reduction-pass - A wrapper pass that reduces the file with optimization passes
--opt-pass= - The optimization passes used for reduction, e.g., symbol-dce
--test= - The location of the tester which tests the file interestingness
--test-arg= - arguments of the tester
--print-op-stats - Print statistics of operations
--promote-buffers-to-stack - Promotes heap-based allocations to automatically managed stack-based allocations
--max-alloc-size-in-bytes= - Maximal size in bytes to promote allocations to stack.
--max-rank-of-allocated-memref= - Maximal memref rank to promote dynamic buffers.
--quant-convert-const - Converts constants followed by qbarrier to actual quantized values
--quant-convert-simulated-quantization - Converts training-time simulated quantization ops to corresponding quantize/dequantize casts
--reconcile-unrealized-casts - Simplify and eliminate unrealized conversion casts
--reduction-tree - Reduce the input with reduction-tree algorithm
--test= - The location of the tester which tests the file interestingness
--test-arg= - arguments of the tester
--traversal-mode= - The graph traversal mode, the default is single-path mode
--remove-shape-constraints - Replace all cstr_ ops with a true witness
--resolve-ranked-shaped-type-result-dims - Resolve memref.dim of result values of ranked shape type
--resolve-shaped-type-result-dims - Resolve memref.dim of result values
--sccp - Sparse Conditional Constant Propagation
--scf-bufferize - Bufferize the scf dialect.
--scf-for-loop-canonicalization - Canonicalize operations within scf.for loop bodies
--scf-for-loop-peeling - Peel `for` loops at their upper bounds.
--skip-partial - Do not peel loops inside of the last, partial iteration of another already peeled loop.
--scf-for-loop-range-folding - Fold add/mul ops into loop range
--scf-for-loop-specialization - Specialize `for` loops for vectorization
--scf-for-to-while - Convert SCF for loops to SCF while loops
--scf-parallel-loop-collapsing - Collapse parallel loops to use less induction variables
--collapsed-indices-0= - Which loop indices to combine 0th loop index
--collapsed-indices-1= - Which loop indices to combine into the position 1 loop index
--collapsed-indices-2= - Which loop indices to combine into the position 2 loop index
--scf-parallel-loop-fusion - Fuse adjacent parallel loops
--scf-parallel-loop-specialization - Specialize parallel loops for vectorization
--scf-parallel-loop-tiling - Tile parallel loops
--no-min-max-bounds - Perform tiling with fixed upper bound with inbound check inside the internal loops
--parallel-loop-tile-sizes= - Factors to tile parallel loops by
--shape-bufferize - Bufferize the shape dialect.
--shape-to-shape-lowering - Legalize Shape dialect to be convertible to Standard
--snapshot-op-locations - Generate new locations from the current IR
--filename= - The filename to print the generated IR
--tag= - A tag to use when fusing the new locations with the original. If unset, the locations are replaced.
--sparse-tensor-conversion - Apply conversion rules to sparse tensor primitives and types
--sparsification - Automatically generate sparse tensor code from sparse tensor types
--enable-simd-index32 - Enable i32 indexing into vectors (for efficiency)
--parallelization-strategy= - Set the parallelization strategy
--vectorization-strategy= - Set the vectorization strategy
--vl= - Set the vector length
--spirv-lower-abi-attrs - Decorate SPIR-V composite type with layout info
--spirv-rewrite-inserts - Rewrite sequential chains of spv.CompositeInsert operations into spv.CompositeConstruct operations
--spirv-update-vce - Deduce and attach minimal (version, capabilities, extensions) requirements to spv.module ops
--std-bufferize - Bufferize the std dialect
--strip-debuginfo - Strip debug info from all operations
--symbol-dce - Eliminate dead symbols
--tensor-bufferize - Bufferize the `tensor` dialect
--tosa-infer-shapes - Propagate shapes across TOSA operations
--tosa-make-broadcastable - TOSA rank Reshape to enable Broadcasting
--tosa-optional-decompositions - Applies Tosa operations optional decompositions
--tosa-to-linalg - Lower TOSA to LinAlg on tensors
--tosa-to-linalg-named - Lower TOSA to LinAlg named operations
--tosa-to-scf - Lower TOSA to the SCF dialect
--tosa-to-standard - Lower TOSA to the Standard dialect
--view-op-graph - Print Graphviz visualization of an operation
--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
Pass Pipelines:
--sparse-compiler - The standard pipeline for taking sparsity-agnostic IR using the sparse-tensor type, and lowering it to LLVM IR with concrete representations and algorithms for sparse tensors.
--enable-simd-index32 - Enable i32 indexing into vectors (for efficiency)
--parallelization-strategy= - Set the parallelization strategy
--vectorization-strategy= - Set the vectorization strategy
--vl= - Set the vector length
Generic Options:
--help - Display available options (--help-hidden for more)
--help-list - Display list of available options (--help-list-hidden for more)
--version - Display the version of this program
mlir-reduce options:
-o= - Output filename for the reduced test case