Skip to content

Conversation

@arun-thmn
Copy link
Contributor

@arun-thmn arun-thmn commented Nov 14, 2025

A transform pass to lower vector.contract to (a) vector.fma for F32, (b) x86vector.avx512.dot for BF16, (c) x86vector.avx.dot.i8 for Int8 packed types.

The lowering works on condition with m, batch, k dims to be one and vnni dim should be 2 for bf16; 4 for int8.

The lowering pattern: batch_reduce.matmul (input) -> register-tiling(M, N) -> Vectorization (to vector.contract) -> unroll vector.contract (unit dims) -> hoisting transformation (move C loads/store outside batch/k loop) -> apply licm, canonicalization, and bufferize.

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@arun-thmn
Copy link
Contributor Author

This transform pass is intended to use at the last stage of vectorization after unrolling of vector.contract to unit dims.
This pass is drafted based on the @adam-smnk work in TPP-MLIR PR:1063 (convert vc to fma). Did steal few of test-cases from the patch :). Adam will be added as co-author at the time of merge.

@arun-thmn
Copy link
Contributor Author

cc: @rengolin @shahidact please have a look.

@arun-thmn
Copy link
Contributor Author

cc: @rolfmorel

@rengolin rengolin requested a review from adam-smnk November 14, 2025 16:40
Copy link
Member

@rengolin rengolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a short description somewhere of what shape the input is expected to be?

Also, potentially, what upstream transforms may produce it from Linalg.

@adam-smnk
Copy link
Contributor

This transform pass is intended to use at the last stage of vectorization after unrolling of vector.contract to unit dims. This pass is drafted based on the @adam-smnk work in TPP-MLIR PR:1063 (convert vc to fma). Did steal few of test-cases from the patch :). Adam will be added as co-author at the time of merge.

I'm happy to hear it helped you in prototyping.
But I'd say me gluing a few things together is hardly worth mentioning. Especially as I'm not actively involved in this work, there's no need for such honors 😉

Let's just focus on getting things running. And, of course, thanks for iterating on this vectorization work, looks really promising.

@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-vector

Author: Arun Thangamani (arun-thmn)

Changes

A transform pass to lower vector.contract to (a) vector.fma for F32, (b) x86vector.avx512.dot for BF16, (c) x86vector.avx.dot.i8 for Int8 packed types.

The lowering works on condition with m, batch, k dims to be one and vnni dim should be 2 for bf16; 4 for int8.

The lowering pattern: batch_reduce.matmul (input) -> register-tiling(M, N) -> Vectorization (to vector.contract) -> unroll vector.contract (unit dims) -> hoisting transformation (move C loads/store outside batch/k loop) -> apply licm, canonicalization, and bufferize.


Patch is 41.17 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/168074.diff

14 Files Affected:

  • (modified) mlir/include/mlir/Dialect/X86Vector/CMakeLists.txt (+2)
  • (added) mlir/include/mlir/Dialect/X86Vector/TransformOps/CMakeLists.txt (+4)
  • (added) mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h (+31)
  • (added) mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.td (+42)
  • (modified) mlir/include/mlir/Dialect/X86Vector/Transforms.h (+11)
  • (modified) mlir/lib/Dialect/X86Vector/CMakeLists.txt (+1)
  • (added) mlir/lib/Dialect/X86Vector/TransformOps/CMakeLists.txt (+17)
  • (added) mlir/lib/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp (+65)
  • (modified) mlir/lib/Dialect/X86Vector/Transforms/CMakeLists.txt (+2)
  • (added) mlir/lib/Dialect/X86Vector/Transforms/VectorContractToFMA.cpp (+99)
  • (added) mlir/lib/Dialect/X86Vector/Transforms/VectorContractToPackedTypeDotProduct.cpp (+148)
  • (modified) mlir/lib/RegisterAllExtensions.cpp (+2)
  • (added) mlir/test/Dialect/X86Vector/vector-contract-to-fma.mlir (+210)
  • (added) mlir/test/Dialect/X86Vector/vector-contract-to-packed-type-dotproduct.mlir (+374)
diff --git a/mlir/include/mlir/Dialect/X86Vector/CMakeLists.txt b/mlir/include/mlir/Dialect/X86Vector/CMakeLists.txt
index 0fe01824b8248..bbe8e4eb892dd 100644
--- a/mlir/include/mlir/Dialect/X86Vector/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/X86Vector/CMakeLists.txt
@@ -3,3 +3,5 @@ add_mlir_doc(X86Vector X86Vector Dialects/ -gen-dialect-doc -dialect=x86vector)
 
 add_mlir_interface(X86VectorInterfaces)
 add_dependencies(MLIRX86VectorIncGen MLIRX86VectorInterfacesIncGen)
+
+add_subdirectory(TransformOps)
diff --git a/mlir/include/mlir/Dialect/X86Vector/TransformOps/CMakeLists.txt b/mlir/include/mlir/Dialect/X86Vector/TransformOps/CMakeLists.txt
new file mode 100644
index 0000000000000..6f377e10fa8f8
--- /dev/null
+++ b/mlir/include/mlir/Dialect/X86Vector/TransformOps/CMakeLists.txt
@@ -0,0 +1,4 @@
+set(LLVM_TARGET_DEFINITIONS X86VectorTransformOps.td)
+mlir_tablegen(X86VectorTransformOps.h.inc -gen-op-decls)
+mlir_tablegen(X86VectorTransformOps.cpp.inc -gen-op-defs)
+add_mlir_dialect_tablegen_target(MLIRX86VectorTransformOpsIncGen)
diff --git a/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h b/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h
new file mode 100644
index 0000000000000..e1d8b8762e799
--- /dev/null
+++ b/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h
@@ -0,0 +1,31 @@
+//===- X86VectorTransformOps.h - X86Vector transform ops --------*- C++ -*-===//
+//
+// 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 MLIR_DIALECT_X86VECTOR_TRANSFORMOPS_X86VECTORTRANSFORMOPS_H
+#define MLIR_DIALECT_X86VECTOR_TRANSFORMOPS_X86VECTORTRANSFORMOPS_H
+
+#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
+#include "mlir/IR/OpImplementation.h"
+
+//===----------------------------------------------------------------------===//
+// X86Vector Transform Operations
+//===----------------------------------------------------------------------===//
+
+#define GET_OP_CLASSES
+#include "mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h.inc"
+
+namespace mlir {
+class DialectRegistry;
+
+namespace x86vector {
+void registerTransformDialectExtension(DialectRegistry &registry);
+
+} // namespace x86vector
+} // namespace mlir
+
+#endif // MLIR_DIALECT_X86VECTOR_TRANSFORMOPS_X86VECTORTRANSFORMOPS_H
diff --git a/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.td b/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.td
new file mode 100644
index 0000000000000..4009a140bb097
--- /dev/null
+++ b/mlir/include/mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.td
@@ -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.
+  }];
+  
+  let assemblyFormat = "attr-dict";
+}
+
+def ApplyVectorContractToPackedTypeDotProductPatternsOp : Op<Transform_Dialect,
+    "apply_patterns.x86vector.vector_contract_to_packed_type_dot_product",
+    [DeclareOpInterfaceMethods<PatternDescriptorOpInterface>]> {
+  let description = [{
+    Indicates that vector contract operation can be lowered to a BF16/Int8 dot-product.
+  }];
+
+  let assemblyFormat = "attr-dict";
+}
+
+
+#endif // X86VECTOR_TRANSFORM_OPS
+
diff --git a/mlir/include/mlir/Dialect/X86Vector/Transforms.h b/mlir/include/mlir/Dialect/X86Vector/Transforms.h
index d54111ca41e69..943d7182d1960 100644
--- a/mlir/include/mlir/Dialect/X86Vector/Transforms.h
+++ b/mlir/include/mlir/Dialect/X86Vector/Transforms.h
@@ -11,6 +11,10 @@
 
 #include "mlir/IR/Value.h"
 
+#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
+#include "mlir/IR/OpDefinition.h"
+#include "mlir/IR/PatternMatch.h"
+
 namespace mlir {
 
 class ImplicitLocOpBuilder;
@@ -79,6 +83,13 @@ struct MaskHelper {
   }
 };
 
+//===----------------------------------------------------------------------===//
+
+void populateVectorContractToFMAPatterns(RewritePatternSet &patterns);
+
+void populateVectorContractToPackedTypeDotProductPatterns(
+    RewritePatternSet &patterns);
+
 //===----------------------------------------------------------------------===//
 /// Helpers extracted from:
 ///   - clang/lib/Headers/avxintrin.h
diff --git a/mlir/lib/Dialect/X86Vector/CMakeLists.txt b/mlir/lib/Dialect/X86Vector/CMakeLists.txt
index 9f57627c321fb..cb1e9d01821a2 100644
--- a/mlir/lib/Dialect/X86Vector/CMakeLists.txt
+++ b/mlir/lib/Dialect/X86Vector/CMakeLists.txt
@@ -1,2 +1,3 @@
 add_subdirectory(IR)
 add_subdirectory(Transforms)
+add_subdirectory(TransformOps)
diff --git a/mlir/lib/Dialect/X86Vector/TransformOps/CMakeLists.txt b/mlir/lib/Dialect/X86Vector/TransformOps/CMakeLists.txt
new file mode 100644
index 0000000000000..f4c9f8a05acbc
--- /dev/null
+++ b/mlir/lib/Dialect/X86Vector/TransformOps/CMakeLists.txt
@@ -0,0 +1,17 @@
+add_mlir_dialect_library(MLIRX86VectorTransformOps
+  X86VectorTransformOps.cpp
+
+  DEPENDS
+  MLIRX86VectorTransformOpsIncGen
+
+  LINK_LIBS PUBLIC
+  MLIRIR
+  MLIRLLVMCommonConversion
+  MLIRLLVMDialect
+  MLIRVectorDialect
+  MLIRSideEffectInterfaces
+  MLIRTransformDialect
+  MLIRTransformDialectUtils
+  MLIRX86VectorDialect
+  MLIRX86VectorTransforms
+  )
diff --git a/mlir/lib/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp b/mlir/lib/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp
new file mode 100644
index 0000000000000..68d577326a308
--- /dev/null
+++ b/mlir/lib/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp
@@ -0,0 +1,65 @@
+//===- X86VectorTransformOps.cpp - Implementation of Vector transform ops
+//--===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.h"
+#include "mlir/Conversion/LLVMCommon/TypeConverter.h"
+#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
+#include "mlir/Dialect/Transform/IR/TransformDialect.h"
+#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Dialect/X86Vector/Transforms.h"
+#include "mlir/Dialect/X86Vector/X86VectorDialect.h"
+
+#include "mlir/IR/OpImplementation.h"
+#include "mlir/IR/RegionKindInterface.h"
+
+using namespace mlir;
+using namespace mlir::x86vector;
+using namespace mlir::transform;
+
+void mlir::transform::ApplyVectorContractToFMAPatternsOp::populatePatterns(
+    RewritePatternSet &patterns) {
+  x86vector::populateVectorContractToFMAPatterns(patterns);
+}
+
+void mlir::transform::ApplyVectorContractToPackedTypeDotProductPatternsOp::
+    populatePatterns(RewritePatternSet &patterns) {
+  x86vector::populateVectorContractToPackedTypeDotProductPatterns(patterns);
+}
+
+//===----------------------------------------------------------------------===//
+// Transform op registration
+//===----------------------------------------------------------------------===//
+
+namespace {
+class X86VectorTransformDialectExtension
+    : public transform::TransformDialectExtension<
+          X86VectorTransformDialectExtension> {
+public:
+  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(
+      X86VectorTransformDialectExtension)
+
+  X86VectorTransformDialectExtension() {
+    declareGeneratedDialect<x86vector::X86VectorDialect>();
+    declareGeneratedDialect<LLVM::LLVMDialect>();
+    registerTransformOps<
+#define GET_OP_LIST
+#include "mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp.inc"
+        >();
+  }
+};
+} // namespace
+
+#define GET_OP_CLASSES
+#include "mlir/Dialect/X86Vector/TransformOps/X86VectorTransformOps.cpp.inc"
+
+void mlir::x86vector::registerTransformDialectExtension(
+    DialectRegistry &registry) {
+  registry.addExtensions<X86VectorTransformDialectExtension>();
+}
diff --git a/mlir/lib/Dialect/X86Vector/Transforms/CMakeLists.txt b/mlir/lib/Dialect/X86Vector/Transforms/CMakeLists.txt
index c51266afe9e8f..3d2288049e49e 100644
--- a/mlir/lib/Dialect/X86Vector/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/X86Vector/Transforms/CMakeLists.txt
@@ -1,6 +1,8 @@
 add_mlir_dialect_library(MLIRX86VectorTransforms
   AVXTranspose.cpp
   LegalizeForLLVMExport.cpp
+  VectorContractToFMA.cpp
+  VectorContractToPackedTypeDotProduct.cpp
 
   LINK_LIBS PUBLIC
   MLIRArithDialect
diff --git a/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToFMA.cpp b/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToFMA.cpp
new file mode 100644
index 0000000000000..764ec46681094
--- /dev/null
+++ b/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToFMA.cpp
@@ -0,0 +1,99 @@
+//===- VectorContractToFMA.cpp --------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
+#include "mlir/Dialect/X86Vector/Transforms.h"
+#include "mlir/Dialect/X86Vector/X86VectorDialect.h"
+
+#include "mlir/IR/BuiltinAttributes.h"
+#include "mlir/IR/Dominance.h"
+#include "mlir/IR/PatternMatch.h"
+
+#include "mlir/Pass/Pass.h"
+#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
+
+using namespace mlir;
+using namespace mlir::vector;
+using namespace mlir::x86vector;
+
+// Implements outer product contraction as a sequence of broadcast and
+// FMA operations.
+//
+// For example - for F32 type:
+// ```
+//   vector.contract <1x1xf32>, <1x16xf32> into <1x16xf32>
+// ```
+// to
+// ```
+//   vector.broadcast %lhs to <16xf32>
+//   vector.fma vector<16xf32>
+// ```
+struct VectorContractToFMA : public OpRewritePattern<vector::ContractionOp> {
+  using OpRewritePattern<vector::ContractionOp>::OpRewritePattern;
+
+  LogicalResult matchAndRewrite(vector::ContractionOp contractOp,
+                                PatternRewriter &rewriter) const override {
+
+    if (contractOp.getKind() != vector::CombiningKind::ADD) {
+      return rewriter.notifyMatchFailure(contractOp,
+                                         "Expects add combining kind");
+    }
+
+    VectorType lhsTy = contractOp.getLhsType();
+    if (!lhsTy.getElementType().isF32())
+      return rewriter.notifyMatchFailure(contractOp,
+                                         "Only F32 lowering is supported.");
+    if (llvm::any_of(lhsTy.getShape(), [](int64_t dim) { return dim != 1; }))
+      return rewriter.notifyMatchFailure(
+          contractOp, "Expects one for all dimensions of LHS");
+
+    VectorType rhsTy = contractOp.getRhsType();
+    ArrayRef<int64_t> rhsShape = rhsTy.getShape();
+    llvm::SmallVector<int64_t> dimsRhs;
+    llvm::copy_if(rhsShape, std::back_inserter(dimsRhs),
+                  [](int64_t dim) { return dim != 1; });
+    if (dimsRhs.size() != 1)
+      return rewriter.notifyMatchFailure(contractOp, "Irregular RHS shape");
+
+    VectorType accTy = dyn_cast<VectorType>(contractOp.getAccType());
+    assert(accTy && "Invalid accumulator");
+    ArrayRef<int64_t> accShape = accTy.getShape();
+    llvm::SmallVector<int64_t> dimsAcc;
+    llvm::copy_if(accShape, std::back_inserter(dimsAcc),
+                  [](int64_t dim) { return dim != 1; });
+    if (dimsAcc.size() != 1)
+      return rewriter.notifyMatchFailure(contractOp, "Irregular ACC shape");
+
+    // Lowers vector.contract into a broadcast+FMA sequence.
+    auto loc = contractOp.getLoc();
+    auto castLhs = vector::ShapeCastOp::create(
+        rewriter, loc, VectorType::get(1, lhsTy.getElementType()),
+        contractOp.getLhs());
+    auto castRhs = vector::ShapeCastOp::create(
+        rewriter, loc, VectorType::get(dimsRhs.front(), rhsTy.getElementType()),
+        contractOp.getRhs());
+    auto castAcc = vector::ShapeCastOp::create(
+        rewriter, loc, VectorType::get(dimsAcc.front(), accTy.getElementType()),
+        contractOp.getAcc());
+    auto broadcastLhs = vector::BroadcastOp::create(
+        rewriter, loc, castRhs.getResult().getType(), castLhs);
+    auto fma =
+        vector::FMAOp::create(rewriter, loc, broadcastLhs, castRhs, castAcc);
+    auto castFma = vector::ShapeCastOp::create(rewriter, loc, accTy, fma);
+
+    rewriter.replaceOp(contractOp, castFma);
+
+    return success();
+  }
+};
+
+void x86vector::populateVectorContractToFMAPatterns(
+    RewritePatternSet &patterns) {
+  patterns.add<VectorContractToFMA>(patterns.getContext());
+}
diff --git a/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToPackedTypeDotProduct.cpp b/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToPackedTypeDotProduct.cpp
new file mode 100644
index 0000000000000..1dabbddbebb7e
--- /dev/null
+++ b/mlir/lib/Dialect/X86Vector/Transforms/VectorContractToPackedTypeDotProduct.cpp
@@ -0,0 +1,148 @@
+//===- VectorContractToPackedTypeDotProduct.cpp ---------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
+#include "mlir/Dialect/X86Vector/Transforms.h"
+#include "mlir/Dialect/X86Vector/X86VectorDialect.h"
+
+#include "mlir/IR/BuiltinAttributes.h"
+#include "mlir/IR/Dominance.h"
+#include "mlir/IR/PatternMatch.h"
+
+#include "mlir/Pass/Pass.h"
+#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
+
+using namespace mlir;
+using namespace mlir::vector;
+using namespace mlir::x86vector;
+
+// Implements packed type outer product contraction as a sequence
+// of broadcast and packed dot-product operations.
+//
+// For example - for F32 type:
+// ```
+//   vector.contract <1x1x2xbf16>, <1x16x2xbf16> into <1x16xf32>
+// ```
+// to
+// ```
+//   vector.broadcast %lhs to <32xbf16>
+//   x86vector.avx512.dot vector<32xbf16> -> vector<16xf32>
+// ```
+struct VectorContractToPackedTypeDotProduct
+    : public OpRewritePattern<vector::ContractionOp> {
+  using OpRewritePattern<vector::ContractionOp>::OpRewritePattern;
+
+  LogicalResult matchAndRewrite(vector::ContractionOp contractOp,
+                                PatternRewriter &rewriter) const override {
+
+    if (contractOp.getKind() != vector::CombiningKind::ADD) {
+      return rewriter.notifyMatchFailure(contractOp,
+                                         "Expects add combining kind");
+    }
+
+    VectorType lhsTy = contractOp.getLhsType();
+    if (!lhsTy.getElementType().isBF16() &&
+        !lhsTy.getElementType().isSignlessInteger(8))
+      return rewriter.notifyMatchFailure(
+          contractOp, "Only BF16/Int8 lowering is supported.");
+    ArrayRef<int64_t> lhsShape = lhsTy.getShape();
+    if (lhsTy.getElementType().isBF16() && lhsShape.back() != 2)
+      return rewriter.notifyMatchFailure(
+          contractOp, "The LHS vnni dim should be 2 for BF16.");
+
+    if (lhsTy.getElementType().isSignlessInteger(8) && lhsShape.back() != 4)
+      return rewriter.notifyMatchFailure(
+          contractOp, "The LHS vnni dim should be 4 for Int8.");
+    llvm::SmallVector<int64_t> dimsLhs;
+    llvm::copy_if(lhsShape, std::back_inserter(dimsLhs),
+                  [](int64_t dim) { return dim != 1; });
+    if (dimsLhs.size() != 1)
+      return rewriter.notifyMatchFailure(contractOp, "Irregular LHS shape");
+
+    VectorType rhsTy = contractOp.getRhsType();
+    ArrayRef<int64_t> rhsShape = rhsTy.getShape();
+    if (lhsTy.getElementType().isBF16() && rhsShape.back() != 2)
+      return rewriter.notifyMatchFailure(
+          contractOp, "The RHS vnni dim should be 2 for BF16.");
+    if (lhsTy.getElementType().isSignlessInteger(8) && rhsShape.back() != 4)
+      return rewriter.notifyMatchFailure(
+          contractOp, "The RHS vnni dim should be 4 for Int8.");
+    llvm::SmallVector<int64_t> dimsRhs;
+    llvm::copy_if(rhsShape, std::back_inserter(dimsRhs),
+                  [](int64_t dim) { return dim != 1; });
+    if (dimsRhs.size() != 2)
+      return rewriter.notifyMatchFailure(contractOp, "Irregular RHS shape");
+
+    VectorType accTy = dyn_cast<VectorType>(contractOp.getAccType());
+    assert(accTy && "Invalid accumulator");
+    if (!accTy.getElementType().isF32() &&
+        !accTy.getElementType().isSignlessInteger(32))
+      return rewriter.notifyMatchFailure(
+          contractOp, "Only F32/Int32 accumulation is supported.");
+    ArrayRef<int64_t> accShape = accTy.getShape();
+    llvm::SmallVector<int64_t> dimsAcc;
+    llvm::copy_if(accShape, std::back_inserter(dimsAcc),
+                  [](int64_t dim) { return dim != 1; });
+    if (dimsAcc.size() != 1)
+      return rewriter.notifyMatchFailure(contractOp, "Irregular ACC shape");
+
+    auto loc = contractOp.getLoc();
+    auto castRhs = vector::ShapeCastOp::create(
+        rewriter, loc,
+        VectorType::get(dimsRhs.front() * dimsRhs.back(),
+                        rhsTy.getElementType()),
+        contractOp.getRhs());
+
+    auto castAcc = vector::ShapeCastOp::create(
+        rewriter, loc, VectorType::get(dimsAcc.front(), accTy.getElementType()),
+        contractOp.getAcc());
+
+    auto castLhs = vector::ShapeCastOp::create(
+        rewriter, loc, VectorType::get(dimsLhs.front(), lhsTy.getElementType()),
+        contractOp.getLhs());
+    auto bitcastLhs = vector::BitCastOp::create(
+        rewriter, loc, VectorType::get({1}, rewriter.getIntegerType(32)),
+        castLhs);
+    auto broadcastLhs = vector::BroadcastOp::create(
+        rewriter, loc,
+        VectorType::get({dimsRhs.front()}, rewriter.getIntegerType(32)),
+        bitcastLhs);
+    auto bitcastLhsPkType = vector::BitCastOp::create(
+        rewriter, loc, castRhs.getResult().getType(), broadcastLhs);
+
+    Value dp;
+
+    if (lhsTy.getElementType().isBF16()) {
+      dp = x86vector::DotBF16Op::create(
+          rewriter, loc,
+          VectorType::get(dimsRhs.front(), rewriter.getF32Type()), castAcc,
+          bitcastLhsPkType, castRhs);
+    }
+
+    if (lhsTy.getElementType().isSignlessInteger(8)) {
+      dp = x86vector::DotInt8Op::create(
+          rewriter, loc,
+          VectorType::get(dimsRhs.front(), rewriter.getIntegerType(32)),
+          castAcc, bitcastLhsPkType, castRhs);
+    }
+
+    if (dp) {
+      auto castDp = vector::ShapeCastOp::create(rewriter, loc, accTy, dp);
+      rewriter.replaceOp(contractOp, castDp);
+      return success();
+    }
+
+    return failure();
+  }
+};
+
+void x86vector::populateVectorContractToPackedTypeDotProductPatterns(
+    RewritePatternSet &patterns) {
+  patterns.add<VectorContractToPackedTypeDotProduct>(patterns.getContext());
+}
diff --git a/mlir/lib/RegisterAllExtensions.cpp b/mlir/lib/RegisterAllExtensions.cpp
index c857c38df717c..4312100a0c0b0 100644
--- a/mlir/lib/RegisterAllExtensions.cpp
+++ b/mlir/lib/RegisterAllExtensions.cpp
@@ -56,6 +56,7 @@
 ...
[truncated]

Copy link
Member

@rengolin rengolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me already. If @adam-smnk is happy, I'm happy too.

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

🐧 Linux x64 Test Results

  • 7117 tests passed
  • 594 tests skipped

Copy link
Contributor

@adam-smnk adam-smnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good.
Only minor housekeeping comments.

Copy link
Contributor

@adam-smnk adam-smnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@adam-smnk adam-smnk merged commit b53e46f into llvm:main Nov 24, 2025
10 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 24, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building mlir at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/28772

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[6417/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangedConstraintManager.cpp.o
[6418/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SMTConstraintManager.cpp.o
[6419/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerManager.cpp.o
[6420/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SVals.cpp.o
[6421/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerContext.cpp.o
[6422/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SymbolManager.cpp.o
[6423/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/WorkList.cpp.o
[6424/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/BugReporterVisitors.cpp.o
[6425/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Frontend.cpp.o
[6426/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  -lpthread  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: In function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .isra.197] [clone .constprop.216]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.isra.197.constprop.216+0x33): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6427/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExplodedGraph.cpp.o
[6428/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngine.cpp.o
[6429/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineC.cpp.o
[6430/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CoreEngine.cpp.o
[6431/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCXX.cpp.o
[6432/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Visitor.cpp.o
[6433/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineObjC.cpp.o
[6434/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o
[6435/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCallAndReturn.cpp.o
[6436/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ProgramState.cpp.o
[6437/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleConstraintManager.cpp.o
[6438/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleSValBuilder.cpp.o
[6439/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/Store.cpp.o
[6440/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SValBuilder.cpp.o
[6441/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/LoopUnrolling.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:73,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp:15:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h: In instantiation of ‘bool clang::ast_matchers::internal::isDefaultedHelper(const T*) [with T = clang::ForStmt]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:5862:70:   required from ‘bool clang::ast_matchers::internal::matcher_hasBody0Matcher<NodeType, ParamT>::matches(const NodeType&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const [with NodeType = clang::ForStmt; ParamT = clang::ast_matchers::internal::Matcher<clang::Stmt>]’
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:5857:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h:878:62: warning: parameter ‘FD’ set but not used [-Wunused-but-set-parameter]
 template <typename T> inline bool isDefaultedHelper(const T *FD) {
                                                     ~~~~~~~~~^~
[6442/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/PlistDiagnostics.cpp.o
[6443/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SarifDiagnostics.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/LLVM.h:24,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:18,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/Diagnostic.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Lex/Preprocessor.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.h:12,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:13:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::assertSafeToReferenceAfterClear(ItTy, ItTy) [with ItTy = const llvm::StringRef*; T = std::__cxx11::basic_string<char>; <template-parameter-1-2> = void]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ADT/SmallVector.h:726:5:   required from ‘void llvm::SmallVectorImpl<T>::assign(ItTy, ItTy) [with ItTy = const llvm::StringRef*; <template-parameter-2-2> = void; T = std::__cxx11::basic_string<char>]’
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/Sarif.h:134:60:   required from here
Step 7 (build cmake config) failure: build cmake config (failure)
...
[6417/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangedConstraintManager.cpp.o
[6418/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SMTConstraintManager.cpp.o
[6419/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerManager.cpp.o
[6420/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SVals.cpp.o
[6421/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerContext.cpp.o
[6422/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SymbolManager.cpp.o
[6423/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/WorkList.cpp.o
[6424/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/BugReporterVisitors.cpp.o
[6425/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Frontend.cpp.o
[6426/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  -lpthread  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: In function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .isra.197] [clone .constprop.216]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.isra.197.constprop.216+0x33): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6427/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExplodedGraph.cpp.o
[6428/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngine.cpp.o
[6429/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineC.cpp.o
[6430/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CoreEngine.cpp.o
[6431/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCXX.cpp.o
[6432/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Visitor.cpp.o
[6433/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineObjC.cpp.o
[6434/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o
[6435/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCallAndReturn.cpp.o
[6436/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ProgramState.cpp.o
[6437/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleConstraintManager.cpp.o
[6438/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleSValBuilder.cpp.o
[6439/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/Store.cpp.o
[6440/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SValBuilder.cpp.o
[6441/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/LoopUnrolling.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:73,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp:15:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h: In instantiation of ‘bool clang::ast_matchers::internal::isDefaultedHelper(const T*) [with T = clang::ForStmt]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:5862:70:   required from ‘bool clang::ast_matchers::internal::matcher_hasBody0Matcher<NodeType, ParamT>::matches(const NodeType&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const [with NodeType = clang::ForStmt; ParamT = clang::ast_matchers::internal::Matcher<clang::Stmt>]’
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchers.h:5857:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h:878:62: warning: parameter ‘FD’ set but not used [-Wunused-but-set-parameter]
 template <typename T> inline bool isDefaultedHelper(const T *FD) {
                                                     ~~~~~~~~~^~
[6442/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/PlistDiagnostics.cpp.o
[6443/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SarifDiagnostics.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/LLVM.h:24,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:18,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/Diagnostic.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Lex/Preprocessor.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.h:12,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:13:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::assertSafeToReferenceAfterClear(ItTy, ItTy) [with ItTy = const llvm::StringRef*; T = std::__cxx11::basic_string<char>; <template-parameter-1-2> = void]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ADT/SmallVector.h:726:5:   required from ‘void llvm::SmallVectorImpl<T>::assign(ItTy, ItTy) [with ItTy = const llvm::StringRef*; <template-parameter-2-2> = void; T = std::__cxx11::basic_string<char>]’
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Basic/Sarif.h:134:60:   required from here

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 24, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building mlir at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/29960

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[6478/8218] Linking CXX shared library lib/libMLIRFuncTestPasses.so.22.0git
[6479/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/MemRegion.cpp.o
[6480/8218] Creating library symlink lib/libMLIRFuncTestPasses.so
[6481/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangedConstraintManager.cpp.o
[6482/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangeConstraintManager.cpp.o
[6483/8218] Linking CXX shared library lib/libMLIRDLTITestPasses.so.22.0git
[6484/8218] Linking CXX shared library lib/libMLIRTestToLLVMIRTranslation.so.22.0git
[6485/8218] Creating library symlink lib/libMLIRDLTITestPasses.so
[6486/8218] Creating library symlink lib/libMLIRTestToLLVMIRTranslation.so
[6487/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: in function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .constprop.0]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.constprop.0+0x3d): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6488/8218] Linking CXX shared library lib/libMLIRAffineTransformsTestPasses.so.22.0git
[6489/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/BugReporterVisitors.cpp.o
[6490/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Frontend.cpp.o
[6491/8218] Linking CXX shared library lib/libMLIRTestFuncToLLVM.so.22.0git
[6492/8218] Linking CXX shared library lib/libMLIRTestIR.so.22.0git
[6493/8218] Linking CXX shared library lib/libMLIRTestFromLLVMIRTranslation.so.22.0git
[6494/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Visitor.cpp.o
[6495/8218] Linking CXX shared library lib/libMLIRTestTransforms.so.22.0git
[6496/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerManager.cpp.o
[6497/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CoreEngine.cpp.o
[6498/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngine.cpp.o
[6499/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o
[6500/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCXX.cpp.o
[6501/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExplodedGraph.cpp.o
[6502/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCallAndReturn.cpp.o
[6503/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineC.cpp.o
[6504/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineObjC.cpp.o
[6505/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ProgramState.cpp.o
[6506/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/LoopUnrolling.cpp.o
[6507/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleConstraintManager.cpp.o
[6508/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleSValBuilder.cpp.o
[6509/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SarifDiagnostics.cpp.o
[6510/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/PlistDiagnostics.cpp.o
[6511/8218] Building CXX object tools/clang/lib/Frontend/CMakeFiles/obj.clangFrontend.dir/CompilerInvocation.cpp.o
[6512/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RegionStore.cpp.o
[6513/8218] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[6514/8218] Building CXX object tools/mlir/test/lib/Dialect/LLVM/CMakeFiles/MLIRLLVMTestPasses.dir/TestLowerToLLVM.cpp.o
[6515/8218] Building CXX object tools/mlir/lib/Dialect/SparseTensor/Transforms/CMakeFiles/obj.MLIRSparseTensorTransforms.dir/SparseTensorPasses.cpp.o
[6516/8218] Building CXX object tools/mlir/lib/Dialect/Vector/TransformOps/CMakeFiles/obj.MLIRVectorTransformOps.dir/VectorTransformOps.cpp.o
[6517/8218] Building CXX object tools/mlir/test/lib/Dialect/Vector/CMakeFiles/MLIRVectorTestPasses.dir/TestVectorTransforms.cpp.o
[6518/8218] Building CXX object tools/mlir/test/lib/Dialect/NVGPU/CMakeFiles/MLIRNVGPUTestPasses.dir/TestNVGPUTransforms.cpp.o
[6519/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/TransformOps/CMakeFiles/obj.MLIRLinalgTransformOps.dir/LinalgTransformOps.cpp.o
[6520/8218] Building InstCombineTables.inc...
ninja: build stopped: subcommand failed.
Step 7 (build cmake config) failure: build cmake config (failure)
...
[6478/8218] Linking CXX shared library lib/libMLIRFuncTestPasses.so.22.0git
[6479/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/MemRegion.cpp.o
[6480/8218] Creating library symlink lib/libMLIRFuncTestPasses.so
[6481/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangedConstraintManager.cpp.o
[6482/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RangeConstraintManager.cpp.o
[6483/8218] Linking CXX shared library lib/libMLIRDLTITestPasses.so.22.0git
[6484/8218] Linking CXX shared library lib/libMLIRTestToLLVMIRTranslation.so.22.0git
[6485/8218] Creating library symlink lib/libMLIRDLTITestPasses.so
[6486/8218] Creating library symlink lib/libMLIRTestToLLVMIRTranslation.so
[6487/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: in function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .constprop.0]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.constprop.0+0x3d): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6488/8218] Linking CXX shared library lib/libMLIRAffineTransformsTestPasses.so.22.0git
[6489/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/BugReporterVisitors.cpp.o
[6490/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Frontend.cpp.o
[6491/8218] Linking CXX shared library lib/libMLIRTestFuncToLLVM.so.22.0git
[6492/8218] Linking CXX shared library lib/libMLIRTestIR.so.22.0git
[6493/8218] Linking CXX shared library lib/libMLIRTestFromLLVMIRTranslation.so.22.0git
[6494/8218] Building CXX object tools/clang/lib/InstallAPI/CMakeFiles/obj.clangInstallAPI.dir/Visitor.cpp.o
[6495/8218] Linking CXX shared library lib/libMLIRTestTransforms.so.22.0git
[6496/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CheckerManager.cpp.o
[6497/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/CoreEngine.cpp.o
[6498/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngine.cpp.o
[6499/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o
[6500/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCXX.cpp.o
[6501/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExplodedGraph.cpp.o
[6502/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineCallAndReturn.cpp.o
[6503/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineC.cpp.o
[6504/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ExprEngineObjC.cpp.o
[6505/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/ProgramState.cpp.o
[6506/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/LoopUnrolling.cpp.o
[6507/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleConstraintManager.cpp.o
[6508/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SimpleSValBuilder.cpp.o
[6509/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/SarifDiagnostics.cpp.o
[6510/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/PlistDiagnostics.cpp.o
[6511/8218] Building CXX object tools/clang/lib/Frontend/CMakeFiles/obj.clangFrontend.dir/CompilerInvocation.cpp.o
[6512/8218] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/RegionStore.cpp.o
[6513/8218] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[6514/8218] Building CXX object tools/mlir/test/lib/Dialect/LLVM/CMakeFiles/MLIRLLVMTestPasses.dir/TestLowerToLLVM.cpp.o
[6515/8218] Building CXX object tools/mlir/lib/Dialect/SparseTensor/Transforms/CMakeFiles/obj.MLIRSparseTensorTransforms.dir/SparseTensorPasses.cpp.o
[6516/8218] Building CXX object tools/mlir/lib/Dialect/Vector/TransformOps/CMakeFiles/obj.MLIRVectorTransformOps.dir/VectorTransformOps.cpp.o
[6517/8218] Building CXX object tools/mlir/test/lib/Dialect/Vector/CMakeFiles/MLIRVectorTestPasses.dir/TestVectorTransforms.cpp.o
[6518/8218] Building CXX object tools/mlir/test/lib/Dialect/NVGPU/CMakeFiles/MLIRNVGPUTestPasses.dir/TestNVGPUTransforms.cpp.o
[6519/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/TransformOps/CMakeFiles/obj.MLIRLinalgTransformOps.dir/LinalgTransformOps.cpp.o
[6520/8218] Building InstCombineTables.inc...
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 24, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-9-cmake-build-only running on rocm-docker-rhel-9 while building mlir at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/28751

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[6161/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/WatchedLiteralsSolver.cpp.o
[6162/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/ChromiumCheckModel.cpp.o
[6163/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/Value.cpp.o
[6164/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/DebugSupport.cpp.o
[6165/8218] Building CXX object tools/mlir/lib/Dialect/X86Vector/TransformOps/CMakeFiles/obj.MLIRX86VectorTransformOps.dir/X86VectorTransformOps.cpp.o
[6166/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/UncheckedOptionalAccessModel.cpp.o
[6167/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/Transfer.cpp.o
[6168/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/FactsGenerator.cpp.o
[6169/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LifetimeAnnotations.cpp.o
[6170/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: in function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .constprop.0]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.constprop.0+0x29): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6171/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/UncheckedStatusOrAccessModel.cpp.o
[6172/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Facts.cpp.o
[6173/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Loans.cpp.o
[6174/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LifetimeSafety.cpp.o
[6175/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LiveOrigins.cpp.o
[6176/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/MacroPPCallbacks.cpp.o
[6177/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Checker.cpp.o
[6178/8218] Building CXX object tools/clang/lib/Edit/CMakeFiles/obj.clangEdit.dir/RewriteObjCFoundationAPI.cpp.o
[6179/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Origins.cpp.o
[6180/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LoanPropagation.cpp.o
[6181/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/MacroExpansionContext.cpp.o
[6182/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/LinkInModulesPass.cpp.o
[6183/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenAction.cpp.o
[6184/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/ReachableCode.cpp.o
[6185/8218] Building CXX object tools/clang/lib/Analysis/plugins/CheckerDependencyHandling/CMakeFiles/CheckerDependencyHandlingAnalyzerPlugin.dir/CheckerDependencyHandling.cpp.o
[6186/8218] Building CXX object tools/clang/lib/Analysis/plugins/CheckerOptionHandling/CMakeFiles/CheckerOptionHandlingAnalyzerPlugin.dir/CheckerOptionHandling.cpp.o
[6187/8218] Building CXX object tools/clang/lib/Analysis/plugins/SampleAnalyzer/CMakeFiles/SampleAnalyzerPlugin.dir/MainCallChecker.cpp.o
[6188/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ObjectFilePCHContainerWriter.cpp.o
[6189/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/UnsafeBufferUsage.cpp.o
[6190/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenPGO.cpp.o
[6191/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CoverageMappingGen.cpp.o
[6192/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenModule.cpp.o
[6193/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/Transforms.cpp.o
[6194/8218] Building CXX object tools/mlir/lib/CAPI/Dialect/CMakeFiles/obj.MLIRCAPILinalg.dir/LinalgPasses.cpp.o
[6195/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/Vectorization.cpp.o
[6196/8218] Building CXX object tools/flang/unittests/Evaluate/CMakeFiles/expression.test.dir/expression.cpp.o
[6197/8218] Building CXX object tools/mlir/test/lib/Dialect/LLVM/CMakeFiles/MLIRLLVMTestPasses.dir/TestLowerToLLVM.cpp.o
[6198/8218] Building InstCombineTables.inc...
[6199/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/TransformOps/CMakeFiles/obj.MLIRLinalgTransformOps.dir/LinalgTransformOps.cpp.o
[6200/8218] Building CXX object tools/mlir/lib/Dialect/Vector/TransformOps/CMakeFiles/obj.MLIRVectorTransformOps.dir/VectorTransformOps.cpp.o
[6201/8218] Building CXX object tools/mlir/test/lib/Dialect/Vector/CMakeFiles/MLIRVectorTestPasses.dir/TestVectorTransforms.cpp.o
[6202/8218] Building CXX object tools/mlir/test/lib/Dialect/NVGPU/CMakeFiles/MLIRNVGPUTestPasses.dir/TestNVGPUTransforms.cpp.o
[6203/8218] Building CXX object tools/flang/tools/f18-parse-demo/CMakeFiles/f18-parse-demo.dir/f18-parse-demo.cpp.o
ninja: build stopped: subcommand failed.
Step 7 (build cmake config) failure: build cmake config (failure)
...
[6161/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/WatchedLiteralsSolver.cpp.o
[6162/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/ChromiumCheckModel.cpp.o
[6163/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/Value.cpp.o
[6164/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/DebugSupport.cpp.o
[6165/8218] Building CXX object tools/mlir/lib/Dialect/X86Vector/TransformOps/CMakeFiles/obj.MLIRX86VectorTransformOps.dir/X86VectorTransformOps.cpp.o
[6166/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/UncheckedOptionalAccessModel.cpp.o
[6167/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/Transfer.cpp.o
[6168/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/FactsGenerator.cpp.o
[6169/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LifetimeAnnotations.cpp.o
[6170/8218] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o: in function `(anonymous namespace)::isInVnniLayout(mlir::Operation*, llvm::ArrayRef<mlir::AffineMap>, std::optional<unsigned int>) [clone .constprop.0]':
VectorContractToPackedTypeDotProduct.cpp:(.text._ZN12_GLOBAL__N_1L14isInVnniLayoutEPN4mlir9OperationEN4llvm8ArrayRefINS0_9AffineMapEEESt8optionalIjE.constprop.0+0x29): undefined reference to `mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)'
collect2: error: ld returned 1 exit status
[6171/8218] Building CXX object tools/clang/lib/Analysis/FlowSensitive/Models/CMakeFiles/obj.clangAnalysisFlowSensitiveModels.dir/UncheckedStatusOrAccessModel.cpp.o
[6172/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Facts.cpp.o
[6173/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Loans.cpp.o
[6174/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LifetimeSafety.cpp.o
[6175/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LiveOrigins.cpp.o
[6176/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/MacroPPCallbacks.cpp.o
[6177/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Checker.cpp.o
[6178/8218] Building CXX object tools/clang/lib/Edit/CMakeFiles/obj.clangEdit.dir/RewriteObjCFoundationAPI.cpp.o
[6179/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/Origins.cpp.o
[6180/8218] Building CXX object tools/clang/lib/Analysis/LifetimeSafety/CMakeFiles/obj.clangAnalysisLifetimeSafety.dir/LoanPropagation.cpp.o
[6181/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/MacroExpansionContext.cpp.o
[6182/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/LinkInModulesPass.cpp.o
[6183/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenAction.cpp.o
[6184/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/ReachableCode.cpp.o
[6185/8218] Building CXX object tools/clang/lib/Analysis/plugins/CheckerDependencyHandling/CMakeFiles/CheckerDependencyHandlingAnalyzerPlugin.dir/CheckerDependencyHandling.cpp.o
[6186/8218] Building CXX object tools/clang/lib/Analysis/plugins/CheckerOptionHandling/CMakeFiles/CheckerOptionHandlingAnalyzerPlugin.dir/CheckerOptionHandling.cpp.o
[6187/8218] Building CXX object tools/clang/lib/Analysis/plugins/SampleAnalyzer/CMakeFiles/SampleAnalyzerPlugin.dir/MainCallChecker.cpp.o
[6188/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ObjectFilePCHContainerWriter.cpp.o
[6189/8218] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/UnsafeBufferUsage.cpp.o
[6190/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenPGO.cpp.o
[6191/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CoverageMappingGen.cpp.o
[6192/8218] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenModule.cpp.o
[6193/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/Transforms.cpp.o
[6194/8218] Building CXX object tools/mlir/lib/CAPI/Dialect/CMakeFiles/obj.MLIRCAPILinalg.dir/LinalgPasses.cpp.o
[6195/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/Vectorization.cpp.o
[6196/8218] Building CXX object tools/flang/unittests/Evaluate/CMakeFiles/expression.test.dir/expression.cpp.o
[6197/8218] Building CXX object tools/mlir/test/lib/Dialect/LLVM/CMakeFiles/MLIRLLVMTestPasses.dir/TestLowerToLLVM.cpp.o
[6198/8218] Building InstCombineTables.inc...
[6199/8218] Building CXX object tools/mlir/lib/Dialect/Linalg/TransformOps/CMakeFiles/obj.MLIRLinalgTransformOps.dir/LinalgTransformOps.cpp.o
[6200/8218] Building CXX object tools/mlir/lib/Dialect/Vector/TransformOps/CMakeFiles/obj.MLIRVectorTransformOps.dir/VectorTransformOps.cpp.o
[6201/8218] Building CXX object tools/mlir/test/lib/Dialect/Vector/CMakeFiles/MLIRVectorTestPasses.dir/TestVectorTransforms.cpp.o
[6202/8218] Building CXX object tools/mlir/test/lib/Dialect/NVGPU/CMakeFiles/MLIRNVGPUTestPasses.dir/TestNVGPUTransforms.cpp.o
[6203/8218] Building CXX object tools/flang/tools/f18-parse-demo/CMakeFiles/f18-parse-demo.dir/f18-parse-demo.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 24, 2025

LLVM Buildbot has detected a new failure on builder mlir-nvidia running on mlir-nvidia while building mlir at step 6 "build-check-mlir-build-only".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/22218

Here is the relevant piece of the build log for the reference
Step 6 (build-check-mlir-build-only) failure: build (failure)
...
107.890 [398/16/5131] Linking CXX shared library lib/libMLIRLinalgTransformOps.so.22.0git
107.898 [397/16/5132] Creating library symlink lib/libMLIRLinalgTransformOps.so
107.929 [396/16/5133] Linking CXX shared library lib/libMLIRSparseTensorTransforms.so.22.0git
107.937 [395/16/5134] Creating library symlink lib/libMLIRSparseTensorTransforms.so
107.981 [394/16/5135] Building CXX object tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o
108.046 [393/16/5136] Linking CXX shared library lib/libMLIRSparseTensorTransformOps.so.22.0git
108.053 [392/16/5137] Creating library symlink lib/libMLIRSparseTensorTransformOps.so
108.079 [391/16/5138] Linking CXX shared library lib/libMLIRCAPISparseTensor.so.22.0git
108.086 [390/16/5139] Creating library symlink lib/libMLIRCAPISparseTensor.so
108.112 [389/16/5140] Linking CXX shared library lib/libMLIRX86VectorTransforms.so.22.0git
FAILED: lib/libMLIRX86VectorTransforms.so.22.0git 
: && /usr/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libMLIRX86VectorTransforms.so.22.0git -o lib/libMLIRX86VectorTransforms.so.22.0git tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/AVXTranspose.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/LegalizeForLLVMExport.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToFMA.cpp.o tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib:"  lib/libMLIRX86VectorDialect.so.22.0git  lib/libMLIRLLVMCommonConversion.so.22.0git  lib/libMLIRLLVMDialect.so.22.0git  lib/libMLIRVectorUtils.so.22.0git  lib/libMLIRTransforms.so.22.0git  lib/libMLIRTransformUtils.so.22.0git  lib/libMLIRSubsetOpInterface.so.22.0git  lib/libMLIRRewrite.so.22.0git  lib/libMLIRRewritePDL.so.22.0git  lib/libMLIRPDLToPDLInterp.so.22.0git  lib/libMLIRPass.so.22.0git  lib/libMLIRPDLInterpDialect.so.22.0git  lib/libMLIRPDLDialect.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.22.0git  lib/libLLVMBinaryFormat.so.22.0git  lib/libMLIRVectorDialect.so.22.0git  lib/libMLIRIndexingMapOpInterface.so.22.0git  lib/libMLIRMaskableOpInterface.so.22.0git  lib/libMLIRMaskingOpInterface.so.22.0git  lib/libMLIRVectorInterfaces.so.22.0git  lib/libMLIRAffineAnalysis.so.22.0git  lib/libMLIRSCFDialect.so.22.0git  lib/libMLIRTensorDialect.so.22.0git  lib/libMLIRAffineDialect.so.22.0git  lib/libMLIRMemRefDialect.so.22.0git  lib/libMLIRMemorySlotInterfaces.so.22.0git  lib/libMLIRMemOpInterfaces.so.22.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.22.0git  lib/libMLIRArithUtils.so.22.0git  lib/libMLIRDialectUtils.so.22.0git  lib/libMLIRComplexDialect.so.22.0git  lib/libMLIRParallelCombiningOpInterface.so.22.0git  lib/libMLIRValueBoundsOpInterface.so.22.0git  lib/libMLIRDestinationStyleOpInterface.so.22.0git  lib/libMLIRAnalysis.so.22.0git  lib/libMLIRDataLayoutInterfaces.so.22.0git  lib/libMLIRInferStridedMetadataInterface.so.22.0git  lib/libMLIRViewLikeInterface.so.22.0git  lib/libMLIRPresburger.so.22.0git  lib/libMLIRLoopLikeInterface.so.22.0git  lib/libMLIRControlFlowDialect.so.22.0git  lib/libMLIRArithDialect.so.22.0git  lib/libMLIRCastInterfaces.so.22.0git  lib/libMLIRDialect.so.22.0git  lib/libMLIRInferIntRangeCommon.so.22.0git  lib/libMLIRShapedOpInterfaces.so.22.0git  lib/libMLIRInferIntRangeInterface.so.22.0git  lib/libMLIRUBDialect.so.22.0git  lib/libMLIRFuncDialect.so.22.0git  lib/libMLIRInferTypeOpInterface.so.22.0git  lib/libMLIRSideEffectInterfaces.so.22.0git  lib/libMLIRControlFlowInterfaces.so.22.0git  lib/libMLIRFunctionInterfaces.so.22.0git  lib/libMLIRCallInterfaces.so.22.0git  lib/libMLIRIR.so.22.0git  lib/libMLIRSupport.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib && :
ld.lld: error: undefined symbol: mlir::linalg::inferContractionDims(llvm::ArrayRef<mlir::AffineMap>)
>>> referenced by VectorContractToPackedTypeDotProduct.cpp
>>>               tools/mlir/lib/Dialect/X86Vector/Transforms/CMakeFiles/obj.MLIRX86VectorTransforms.dir/VectorContractToPackedTypeDotProduct.cpp.o:((anonymous namespace)::VectorContractToPackedTypeDotProduct::matchAndRewrite(mlir::vector::ContractionOp, mlir::PatternRewriter&) const)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
108.122 [389/15/5141] Building CXX object tools/mlir/test/lib/Dialect/Transform/CMakeFiles/MLIRTestTransformDialect.dir/TestTransformDialectInterpreter.cpp.o
108.530 [389/14/5142] Linking CXX shared library lib/libMLIRTestDialect.so.22.0git
110.235 [389/13/5143] Building CXX object tools/mlir/lib/CAPI/Dialect/CMakeFiles/obj.MLIRCAPILinalg.dir/LinalgPasses.cpp.o
110.664 [389/12/5144] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgFusionTransforms.cpp.o
114.411 [389/11/5145] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgDropUnitDims.cpp.o
115.959 [389/10/5146] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestPadFusion.cpp.o
116.341 [389/9/5147] Building CXX object tools/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeFiles/obj.MLIRSparseTensorPipelines.dir/SparseTensorPipelines.cpp.o
116.412 [389/8/5148] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgElementwiseFusion.cpp.o
116.554 [389/7/5149] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestDataLayoutPropagation.cpp.o
116.584 [389/6/5150] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgDecomposeOps.cpp.o
117.632 [389/5/5151] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgTransforms.cpp.o
118.246 [389/4/5152] Building CXX object tools/mlir/lib/Dialect/Vector/TransformOps/CMakeFiles/obj.MLIRVectorTransformOps.dir/VectorTransformOps.cpp.o
118.353 [389/3/5153] Building CXX object tools/mlir/test/lib/Dialect/Linalg/CMakeFiles/MLIRLinalgTestPasses.dir/TestLinalgRankReduceContractionOps.cpp.o
120.310 [389/2/5154] Building CXX object tools/mlir/unittests/ExecutionEngine/CMakeFiles/MLIRExecutionEngineTests.dir/Invoke.cpp.o
121.720 [389/1/5155] Building CXX object tools/mlir/test/lib/Dialect/NVGPU/CMakeFiles/MLIRNVGPUTestPasses.dir/TestNVGPUTransforms.cpp.o
ninja: build stopped: subcommand failed.

adam-smnk added a commit that referenced this pull request Nov 24, 2025
Adds required dependency for `inferContractionDims`.

Fixes #168074
WillFroom pushed a commit that referenced this pull request Nov 24, 2025
This PR fixes the bazel build that went out of sync with the changes
introduced in #168074.

Signed-off-by: Ingo Müller <ingomueller@google.com>
ingomueller-net added a commit to ingomueller-net/llvm-project that referenced this pull request Nov 24, 2025
This is a second attempt to fix the bazel build (after the first in
 llvm#169294, which was accidentally merged before CI passed). In the first
 attempt, not all bazel dependencies had been added; this PR should add
 them all and make CI pass.

Signed-off-by: Ingo Müller <ingomueller@google.com>
ingomueller-net added a commit to ingomueller-net/llvm-project that referenced this pull request Nov 24, 2025
This is a second attempt to fix the bazel build (after the first in
 llvm#169294, which was accidentally merged before CI passed). In the first
 attempt, not all bazel dependencies had been added; this PR should add
 them all and make CI pass.

Signed-off-by: Ingo Müller <ingomueller@google.com>
akuegel pushed a commit that referenced this pull request Nov 24, 2025
…69316)

This is a second attempt to fix the bazel build (after the first in
#169294, which was accidentally merged before CI passed). In the first
attempt, not all bazel dependencies had been added; this PR should add
them all and make CI pass.

Signed-off-by: Ingo Müller <ingomueller@google.com>
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
…duct (llvm#168074)

A `transform` pass to lower `vector.contract` to (a) `vector.fma` for
`F32`, (b) `x86vector.avx512.dot` for `BF16`, (c) `x86vector.avx.dot.i8`
for `Int8` packed types.

The lowering works on condition with `m`, `batch`, `k` dims to be `one`
and `vnni` dim should be `2` for `bf16`; `4` for `int8`.

**The lowering pattern**: `batch_reduce.matmul` (input) ->
register-tiling(M, N) -> Vectorization (to `vector.contract`) ->
`unroll` vector.contract (`unit` dims) -> `hoisting` transformation
(move `C` loads/store outside batch/k loop) -> apply `licm`,
`canonicalization`, and `bufferize`.
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
Adds required dependency for `inferContractionDims`.

Fixes llvm#168074
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
…69294)

This PR fixes the bazel build that went out of sync with the changes
introduced in llvm#168074.

Signed-off-by: Ingo Müller <ingomueller@google.com>
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
…llvm#169316)

This is a second attempt to fix the bazel build (after the first in
llvm#169294, which was accidentally merged before CI passed). In the first
attempt, not all bazel dependencies had been added; this PR should add
them all and make CI pass.

Signed-off-by: Ingo Müller <ingomueller@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants