[Mlir-commits] [mlir] [mlir][x86vector] Lower vector.contract to FMA or packed type dot-product (PR #168074)

Rolf Morel llvmlistbot at llvm.org
Tue Nov 18 08:20:53 PST 2025


================
@@ -0,0 +1,42 @@
+//===- X86VectorTransformOps.td - X86Vector transform ops ---*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef X86VECTOR_TRANSFORM_OPS
+#define X86VECTOR_TRANSFORM_OPS
+
+include "mlir/Dialect/Transform/IR/TransformDialect.td"
+include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.td"
+include "mlir/Interfaces/SideEffectInterfaces.td"
+include "mlir/IR/OpBase.td"
+include "mlir/Dialect/Transform/IR/TransformAttrs.td"
+include "mlir/Dialect/Transform/IR/TransformTypes.td"
+include "mlir/IR/RegionKindInterface.td"
+
+def ApplyVectorContractToFMAPatternsOp : Op<Transform_Dialect,
+    "apply_patterns.x86vector.vector_contract_to_fma",
+    [DeclareOpInterfaceMethods<PatternDescriptorOpInterface>]> {
+  let description = [{
+    Indicates that vector contract operation can be lowered to a FMA.
----------------
rolfmorel wrote:

I see that the arm_neon transform ops use this phrasing, e.g. https://mlir.llvm.org/docs/Dialects/Transform/#arm-neon-transform-operations, though I would prefer a description of what the op does in terms of how it contributes when it occurs in a `transform.apply_patterns`' region. So something like "Collects patterns that promote inputs to outputs and remove unused inputs of linalg.generic ops." -- see https://mlir.llvm.org/docs/Dialects/Transform/#transformapply_patternslinalgerase_unnecessary_inputs-transformapplyeraseunnecessaryinputspatternsop

https://github.com/llvm/llvm-project/pull/168074


More information about the Mlir-commits mailing list