[Mlir-commits] [mlir] [mlir][x86vector] Lower BF16 vector.contract to FMA using AVX2 BF16 packed ops. (PR #170267)
Arun Thangamani
llvmlistbot at llvm.org
Wed Dec 17 04:31:55 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:
+ // (1) - It has false in-bounds
+ // (2) - The permutation map is not identical
+ if (auto readOp = prodOp.getDefiningOp<mlir::vector::TransferReadOp>()) {
+ ArrayAttr inBoundsAttr = readOp.getInBoundsAttr();
+ if (inBoundsAttr) {
+
+ for (Attribute attr : inBoundsAttr) {
+ auto boolAttr = llvm::dyn_cast<BoolAttr>(attr);
+ if (!boolAttr || !boolAttr.getValue()) {
+ return false;
+ }
+ }
+ }
----------------
arun-thmn wrote:
Thanks. Good to know.
Used that `hasOutOfBoundsDim()` API.
https://github.com/llvm/llvm-project/pull/170267
More information about the Mlir-commits
mailing list