[Mlir-commits] [mlir] [mlir][x86] Add pattern to tile and unroll vector.contract (PR #229076)
Adam Siemieniuk
llvmlistbot at llvm.org
Tue Oct 13 03:56:35 PDT 2026
================
@@ -93,4 +93,20 @@ def ApplyMoveAccumulatorForContractLoopPatternsOp : Op<Transform_Dialect,
let assemblyFormat = "attr-dict";
}
+def ApplyVectorContractMultiLevelUnrollPatternsOp : Op<Transform_Dialect,
+ "apply_patterns.x86.vector_contract_multi_level_unroll",
+ [DeclareOpInterfaceMethods<PatternDescriptorOpInterface>]> {
+ let description = [{
+ Collect patterns that tile and unroll contractions in order to prepare them
+ for the nanokernel lowerings.
+
+ The following flags control the decomposition:
+ - `enable_amx`: Prepare for AMX tile dot-product
----------------
adam-smnk wrote:
> This doesn't scale. We have AVX, AVX2, AVX512, AMX and ACE, with variants in each of them (VNNI, BF16, INT8, etc). We can't have a flag for each combination.
My direction here was to have simple toggles that indicate which extension are available.
Underlying patterns already filter what they can lower anyway. The overall pass can enforce that with order or benefit values, it doesn't need to be exposed to user.
Re variants (e.g., AVX512 vs AVX512bf16), it'd be better to move toward proper external solution like DLTI attribute on func/module and let individual rewrites decide. Then we can remove these toggles too.
https://github.com/llvm/llvm-project/pull/229076
More information about the Mlir-commits
mailing list