[Mlir-commits] [mlir] [mlir][x86vector] Lower BF16 vector.contract to FMA using AVX2 BF16 packed ops. (PR #170267)

Adam Siemieniuk llvmlistbot at llvm.org
Wed Dec 17 02:31:54 PST 2025


================
@@ -24,6 +26,63 @@ using namespace mlir;
 using namespace mlir::vector;
 using namespace mlir::x86vector;
 
+static bool validateVectorProdOp(Value prodOp) {
+  Operation *defOp = prodOp.getDefiningOp();
+  if (!defOp)
+    return false;
+
+  // If the LHS/RHS op is transfer_read return false if:
----------------
adam-smnk wrote:

nit: `LHS/RHS` has no meaning in the context of this abstracted function

Also, I'd suggest slightly rephrasing it: `Verify that transfer read...` or sth in that fashion.
The key is to make a bit more abstract such that `return false` doesn't become outdated after a refactor.

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


More information about the Mlir-commits mailing list