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

Adam Siemieniuk llvmlistbot at llvm.org
Fri Nov 21 03:36:01 PST 2025


================
@@ -79,6 +79,16 @@ struct MaskHelper {
   }
 };
 
+//===----------------------------------------------------------------------===//
+
+// Lowers a FP32 type vector.contract operation to an FMA operation.
+void populateVectorContractToFMAPatterns(RewritePatternSet &patterns);
+
+// Lowers a BF16/Int8 type vector.contract operation to a BF16/Int8 dot-product
+// operation.
----------------
adam-smnk wrote:

nit: That's a bit too much implementation detail.
It'd be better to give a more general description that, for example, tells why you'd use this over vector to LLVM.

For F32, maybe: "A set of patterns for specialized lowering XYZ..."
For the other one, I'd lean into this generic concept of packed types: "...patterns for specialized 32-bit packed types..." or sth more general about targeting x86 intrinsics.

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


More information about the Mlir-commits mailing list