Skip to content

[mlir][x86vector] AVX512-BF16 Dot op #124800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 29, 2025

Conversation

adam-smnk
Copy link
Contributor

@adam-smnk adam-smnk commented Jan 28, 2025

Adds AVX512 bf16 dot-product operation and defines lowering to LLVM intrinsics.

AVX512 intrinsic operation definition is extended with an optional extension field that allows specifying necessary LLVM mnemonic suffix e.g., "bf16" for x86_avx512bf16_ intrinsics.

@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-vector

Author: Adam Siemieniuk (adam-smnk)

Changes

Adds AVX512-BF16 operation definitions and a bf16 dot-product operation.
Defines lowering to LLVM intrinsics.


Full diff: https://github.com/llvm/llvm-project/pull/124800.diff

5 Files Affected:

  • (modified) mlir/include/mlir/Dialect/X86Vector/X86Vector.td (+88)
  • (modified) mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp (+47-2)
  • (modified) mlir/test/Dialect/X86Vector/legalize-for-llvm.mlir (+27)
  • (modified) mlir/test/Dialect/X86Vector/roundtrip.mlir (+27)
  • (added) mlir/test/Integration/Dialect/Vector/CPU/X86Vector/dot-bf16.mlir (+25)
diff --git a/mlir/include/mlir/Dialect/X86Vector/X86Vector.td b/mlir/include/mlir/Dialect/X86Vector/X86Vector.td
index fa3f0ee0460b1d..409ef9ce16054e 100644
--- a/mlir/include/mlir/Dialect/X86Vector/X86Vector.td
+++ b/mlir/include/mlir/Dialect/X86Vector/X86Vector.td
@@ -271,6 +271,94 @@ def Vp2IntersectQIntrOp : AVX512_IntrOp<"vp2intersect.q.512", 2, [
                    VectorOfLengthAndType<[8], [I64]>:$b);
 }
 
+//===----------------------------------------------------------------------===//
+// AVX512-BF16 op definitions
+//===----------------------------------------------------------------------===//
+
+// Operation that is part of the input dialect.
+class AVX512BF16_Op<string mnemonic, list<Trait> traits = []> :
+  Op<X86Vector_Dialect, "avx512bf16." # mnemonic, traits> {}
+
+// Intrinsic operation used during lowering to LLVM IR.
+class AVX512BF16_IntrOp<string mnemonic, int numResults, list<Trait> traits = []> :
+  LLVM_IntrOpBase<X86Vector_Dialect, "avx512bf16.intr." # mnemonic,
+                  "x86_avx512bf16_" # !subst(".", "_", mnemonic),
+                  [], [], traits, numResults>;
+
+// Defined by first result overload. May have to be extended for other
+// instructions in the future.
+class AVX512BF16_IntrOverloadedOp<string mnemonic,
+                              list<Trait> traits = []> :
+  LLVM_IntrOpBase<X86Vector_Dialect, "avx512bf16.intr." # mnemonic,
+                  "x86_avx512bf16_" # !subst(".", "_", mnemonic),
+                  /*list<int> overloadedResults=*/[0],
+                  /*list<int> overloadedOperands=*/[],
+                  traits, /*numResults=*/1>;
+
+//----------------------------------------------------------------------------//
+// AVX512-BF16 Dot
+//----------------------------------------------------------------------------//
+
+def DotBF16Op : AVX512BF16_Op<"dot", [Pure,
+  AllTypesMatch<["a", "b"]>,
+  AllTypesMatch<["src", "dst"]>,
+  TypesMatchWith<"`a` has twice an many elements as `src`",
+                 "src", "a",
+                 "VectorType::get({::llvm::cast<VectorType>($_self).getShape()[0] * 2}, "
+                 "BFloat16Type::get($_self.getContext()))">]> {
+  let summary = "Dot BF16 op";
+  let description = [{
+    The `dot` op is an AVX512-BF16 specific op that can lower to the proper
+    LLVMAVX512BF16 operation `llvm.dpbf16ps` depending on the width of MLIR
+    vectors it is applied to.
+
+    #### From the Intel Intrinsics Guide:
+
+    Compute dot-product of BF16 (16-bit) floating-point pairs in `a` and `b`,
+    accumulating the intermediate single-precision (32-bit) floating-point
+    elements with elements in `src`, and store the results in `dst`.
+
+    Example:
+    ```mlir
+    %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<32xbf16> -> vector<16xf32>
+    ```
+  }];
+  let arguments = (ins VectorOfLengthAndType<[4, 8, 16], [F32]>:$src,
+                   VectorOfLengthAndType<[8, 16, 32], [BF16]>:$a,
+                   VectorOfLengthAndType<[8, 16, 32], [BF16]>:$b
+                   );
+  let results = (outs VectorOfLengthAndType<[4, 8, 16], [F32]>:$dst);
+  let assemblyFormat =
+    "$src `,` $a `,` $b attr-dict `:` type($a) `->` type($src)";
+}
+
+def DotBF16Ps128IntrOp : AVX512BF16_IntrOp<"dpbf16ps.128", 1, [Pure,
+    AllTypesMatch<["a", "b"]>,
+    AllTypesMatch<["src", "res"]>]> {
+  let arguments = (ins VectorOfLengthAndType<[4], [F32]>:$src,
+                       VectorOfLengthAndType<[8], [BF16]>:$a,
+                       VectorOfLengthAndType<[8], [BF16]>:$b);
+  let results = (outs VectorOfLengthAndType<[4], [F32]>:$res);
+}
+
+def DotBF16Ps256IntrOp : AVX512BF16_IntrOp<"dpbf16ps.256", 1, [Pure,
+    AllTypesMatch<["a", "b"]>,
+    AllTypesMatch<["src", "res"]>]> {
+  let arguments = (ins VectorOfLengthAndType<[8], [F32]>:$src,
+                       VectorOfLengthAndType<[16], [BF16]>:$a,
+                       VectorOfLengthAndType<[16], [BF16]>:$b);
+  let results = (outs VectorOfLengthAndType<[8], [F32]>:$res);
+}
+
+def DotBF16Ps512IntrOp : AVX512BF16_IntrOp<"dpbf16ps.512", 1, [Pure,
+    AllTypesMatch<["a", "b"]>,
+    AllTypesMatch<["src", "res"]>]> {
+  let arguments = (ins VectorOfLengthAndType<[16], [F32]>:$src,
+                       VectorOfLengthAndType<[32], [BF16]>:$a,
+                       VectorOfLengthAndType<[32], [BF16]>:$b);
+  let results = (outs VectorOfLengthAndType<[16], [F32]>:$res);
+}
+
 //===----------------------------------------------------------------------===//
 // AVX op definitions
 //===----------------------------------------------------------------------===//
diff --git a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
index e918473cae9e3a..260ac9ce589a38 100644
--- a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
@@ -90,6 +90,47 @@ struct MaskCompressOpConversion
   }
 };
 
+struct DotBF16OpConversion : public ConvertOpToLLVMPattern<DotBF16Op> {
+  using ConvertOpToLLVMPattern<DotBF16Op>::ConvertOpToLLVMPattern;
+
+  LogicalResult
+  matchAndRewrite(DotBF16Op op, OpAdaptor adaptor,
+                  ConversionPatternRewriter &rewriter) const override {
+    auto typeA = dyn_cast<VectorType>(op.getA().getType());
+    unsigned elemBitWidth = typeA.getElementTypeBitWidth();
+    unsigned opBitWidth = typeA.getShape()[0] * elemBitWidth;
+
+    auto opType = adaptor.getSrc().getType();
+    auto opSrc = adaptor.getSrc();
+    auto opA = adaptor.getA();
+    auto opB = adaptor.getB();
+
+    switch (opBitWidth) {
+    case 128: {
+      rewriter.replaceOpWithNewOp<DotBF16Ps128IntrOp>(op, opType, opSrc, opA,
+                                                      opB);
+      break;
+    }
+    case 256: {
+      rewriter.replaceOpWithNewOp<DotBF16Ps256IntrOp>(op, opType, opSrc, opA,
+                                                      opB);
+      break;
+    }
+    case 512: {
+      rewriter.replaceOpWithNewOp<DotBF16Ps512IntrOp>(op, opType, opSrc, opA,
+                                                      opB);
+      break;
+    }
+    default: {
+      return rewriter.notifyMatchFailure(op,
+                                         "unsupported AVX512-BF16 dot variant");
+    }
+    }
+
+    return success();
+  }
+};
+
 struct RsqrtOpConversion : public ConvertOpToLLVMPattern<RsqrtOp> {
   using ConvertOpToLLVMPattern<RsqrtOp>::ConvertOpToLLVMPattern;
 
@@ -161,8 +202,8 @@ using Registry = RegistryImpl<
 void mlir::populateX86VectorLegalizeForLLVMExportPatterns(
     const LLVMTypeConverter &converter, RewritePatternSet &patterns) {
   Registry::registerPatterns(converter, patterns);
-  patterns.add<MaskCompressOpConversion, RsqrtOpConversion, DotOpConversion>(
-      converter);
+  patterns.add<MaskCompressOpConversion, DotBF16OpConversion, RsqrtOpConversion,
+               DotOpConversion>(converter);
 }
 
 void mlir::configureX86VectorLegalizeForExportTarget(
@@ -170,6 +211,10 @@ void mlir::configureX86VectorLegalizeForExportTarget(
   Registry::configureTarget(target);
   target.addLegalOp<MaskCompressIntrOp>();
   target.addIllegalOp<MaskCompressOp>();
+  target.addLegalOp<DotBF16Ps128IntrOp>();
+  target.addLegalOp<DotBF16Ps256IntrOp>();
+  target.addLegalOp<DotBF16Ps512IntrOp>();
+  target.addIllegalOp<DotBF16Op>();
   target.addLegalOp<RsqrtIntrOp>();
   target.addIllegalOp<RsqrtOp>();
   target.addLegalOp<DotIntrOp>();
diff --git a/mlir/test/Dialect/X86Vector/legalize-for-llvm.mlir b/mlir/test/Dialect/X86Vector/legalize-for-llvm.mlir
index 8b9006395fdfe4..cbc8c3051c6ab1 100644
--- a/mlir/test/Dialect/X86Vector/legalize-for-llvm.mlir
+++ b/mlir/test/Dialect/X86Vector/legalize-for-llvm.mlir
@@ -43,6 +43,33 @@ func.func @avx512_vp2intersect(%a: vector<16xi32>, %b: vector<8xi64>)
   return %0, %1, %2, %3 : vector<16xi1>, vector<16xi1>, vector<8xi1>, vector<8xi1>
 }
 
+// CHECK-LABEL: func @avx512bf16_dot_128
+func.func @avx512bf16_dot_128(%src: vector<4xf32>, %a: vector<8xbf16>,
+  %b: vector<8xbf16>) -> (vector<4xf32>)
+{
+  // CHECK: x86vector.avx512bf16.intr.dpbf16ps.128
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<8xbf16> -> vector<4xf32>
+  return %0 : vector<4xf32>
+}
+
+// CHECK-LABEL: func @avx512bf16_dot_256
+func.func @avx512bf16_dot_256(%src: vector<8xf32>, %a: vector<16xbf16>,
+  %b: vector<16xbf16>) -> (vector<8xf32>)
+{
+  // CHECK: x86vector.avx512bf16.intr.dpbf16ps.256
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<16xbf16> -> vector<8xf32>
+  return %0 : vector<8xf32>
+}
+
+// CHECK-LABEL: func @avx512bf16_dot_512
+func.func @avx512bf16_dot_512(%src: vector<16xf32>, %a: vector<32xbf16>,
+  %b: vector<32xbf16>) -> (vector<16xf32>)
+{
+  // CHECK: x86vector.avx512bf16.intr.dpbf16ps.512
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<32xbf16> -> vector<16xf32>
+  return %0 : vector<16xf32>
+}
+
 // CHECK-LABEL: func @avx_rsqrt
 func.func @avx_rsqrt(%a: vector<8xf32>) -> (vector<8xf32>)
 {
diff --git a/mlir/test/Dialect/X86Vector/roundtrip.mlir b/mlir/test/Dialect/X86Vector/roundtrip.mlir
index 557978b51c5123..f7111f75db6180 100644
--- a/mlir/test/Dialect/X86Vector/roundtrip.mlir
+++ b/mlir/test/Dialect/X86Vector/roundtrip.mlir
@@ -47,6 +47,33 @@ func.func @avx512_mask_compress(%k1: vector<16xi1>, %a1: vector<16xf32>,
   return %0, %1, %2 : vector<16xf32>, vector<16xf32>, vector<8xi64>
 }
 
+// CHECK-LABEL: func @avx512bf16_dot_128
+func.func @avx512bf16_dot_128(%src: vector<4xf32>, %a: vector<8xbf16>,
+  %b: vector<8xbf16>) -> (vector<4xf32>)
+{
+  // CHECK: x86vector.avx512bf16.dot {{.*}} : vector<8xbf16> -> vector<4xf32>
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<8xbf16> -> vector<4xf32>
+  return %0 : vector<4xf32>
+}
+
+// CHECK-LABEL: func @avx512bf16_dot_256
+func.func @avx512bf16_dot_256(%src: vector<8xf32>, %a: vector<16xbf16>,
+  %b: vector<16xbf16>) -> (vector<8xf32>)
+{
+  // CHECK: x86vector.avx512bf16.dot {{.*}} : vector<16xbf16> -> vector<8xf32>
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<16xbf16> -> vector<8xf32>
+  return %0 : vector<8xf32>
+}
+
+// CHECK-LABEL: func @avx512bf16_dot_512
+func.func @avx512bf16_dot_512(%src: vector<16xf32>, %a: vector<32xbf16>,
+  %b: vector<32xbf16>) -> (vector<16xf32>)
+{
+  // CHECK: x86vector.avx512bf16.dot {{.*}} : vector<32xbf16> -> vector<16xf32>
+  %0 = x86vector.avx512bf16.dot %src, %a, %b : vector<32xbf16> -> vector<16xf32>
+  return %0 : vector<16xf32>
+}
+
 // CHECK-LABEL: func @avx_rsqrt
 func.func @avx_rsqrt(%a: vector<8xf32>) -> (vector<8xf32>)
 {
diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/dot-bf16.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/dot-bf16.mlir
new file mode 100644
index 00000000000000..fe333f49fc8e14
--- /dev/null
+++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/dot-bf16.mlir
@@ -0,0 +1,25 @@
+// RUN: mlir-opt %s -convert-vector-to-scf -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm -reconcile-unrealized-casts | \
+// RUN: mlir-translate --mlir-to-llvmir | \
+// RUN: %lli --entry-function=entry --mattr="avx512bf16" --dlopen=%mlir_c_runner_utils | \
+// RUN: FileCheck %s
+
+func.func @entry() -> i32 {
+  %i0 = arith.constant 0 : i32
+  %i3 = arith.constant 3 : i32
+
+  %src = arith.constant dense<1.0> : vector<4xf32>
+  %a = arith.constant dense<[1.0,  2.0,  3.0,  4.0,  5.0,  6.0,  7.0,  8.0]> : vector<8xbf16>
+  %b = arith.constant dense<[9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]> : vector<8xbf16>
+  %dst = x86vector.avx512bf16.dot %src, %a, %b : vector<8xbf16> -> vector<4xf32>
+
+  %1 = vector.extractelement %dst[%i0 : i32] : vector<4xf32>
+  %2 = vector.extractelement %dst[%i3 : i32] : vector<4xf32>
+  %d = arith.addf %1, %2 : f32
+
+  // CHECK: ( 30, 82, 150, 234 )
+  // CHECK: 264
+  vector.print %dst : vector<4xf32>
+  vector.print %d : f32
+
+  return %i0 : i32
+}

@adam-smnk adam-smnk changed the title [mlir][x86vector] AVX512-B16 Dot op [mlir][x86vector] AVX512-BF16 Dot op Jan 28, 2025
@rengolin
Copy link
Member

@ienkovich

@Groverkss Groverkss requested a review from bjacob January 28, 2025 22:03
Copy link
Contributor

@bjacob bjacob left a comment

Choose a reason for hiding this comment

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

LGTM. FWIW:

  1. IREE-wise, we are not directly concerned because we use microkernels for matrix multiplication kernels on CPU, e.g. for avx512bf16: https://github.com/iree-org/iree/blob/main/runtime/src/iree/builtins/ukernel/arch/x86_64/mmt4d_x86_64_avx512_bf16.c). Just mentioning why I don't have strong opinions here as a downstream.
  2. AMD-wise, avx512bf16 is supported on all microarchitectures since Zen4 (2023-ish) but not on earlier CPUs (up to Zen3 inclusive) so there probably are many folks running these tests without avx512bf16 support. I agree with the sentiment that test suites should not crash on older CPUs, so hopefully you can resolve that.

@rengolin
Copy link
Member

  1. IREE-wise, we are not directly concerned because we use microkernels for matrix multiplication kernels on CPU, e.g. for avx512bf16: https://github.com/iree-org/iree/blob/main/runtime/src/iree/builtins/ukernel/arch/x86_64/mmt4d_x86_64_avx512_bf16.c). Just mentioning why I don't have strong opinions here as a downstream.

Indeed, our position too.

We're now looking into generating simple kernels directly and why we want to resurrect this dialect. The plan is to have micro-kernel quality "special lowering" for particular patterns but still use micro-kernels for the more complex stuff, and slowly cover the space.

Once we have some minimal prototype we'll have lessons learned on both dialect and vector level transform, which we'll start working with you guys to upstream. We're hoping this will directly benefit IREE too.

@adam-smnk
Copy link
Contributor Author

I'd dare to say nobody runs these tests as their lowering seems incomplete atm ;)
Anyway, I'll adjust bf16 test as suggested and update the others separately too.

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.

Awesome, thank you!

@adam-smnk adam-smnk merged commit 87782b2 into llvm:main Jan 29, 2025
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 29, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-translate --mlir-to-llvmir
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t90: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t54, t71, t88
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x000000011635c51c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2f5c51c)
# |  #1 0x000000011635cc74 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
# |  #2 0x00000001163595f0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2f595f0)
# |  #3 0x000000011635cf5c SignalHandler(int) Signals.cpp:0:0
# |  #4 0x00007fff83f004d8 (linux-vdso64.so.1+0x4d8)
# |  #5 0x00007fff837aa448 raise (/usr/lib64/libc.so.6+0x4a448)
# |  #6 0x00007fff83784a54 abort (/usr/lib64/libc.so.6+0x24a54)
# |  #7 0x0000000116297db4 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2e97db4)
# |  #8 0x0000000116297b4c llvm::report_fatal_error(char const*, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2e97b4c)
# |  #9 0x000000011615007c llvm::DAGTypeLegalizer::SplitVectorResult(llvm::SDNode*, unsigned int) LegalizeVectorTypes.cpp:0:0
# | #10 0x000000011610690c llvm::DAGTypeLegalizer::run() LegalizeTypes.cpp:0:0
# | #11 0x000000011610c4ac llvm::SelectionDAG::LegalizeTypes() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2d0c4ac)
# | #12 0x00000001160eee10 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2ceee10)
# | #13 0x00000001160ee55c llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, bool&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2cee55c)
# | #14 0x00000001160ed5e4 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2ced5e4)
# | #15 0x00000001160ea550 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2cea550)
# | #16 0x000000011483e9d8 (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) PPCISelDAGToDAG.cpp:0:0
# | #17 0x00000001160e7574 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2ce7574)
# | #18 0x0000000114f690ec llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x1b690ec)
# | #19 0x0000000115677c30 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2277c30)
# | #20 0x0000000115681a68 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x2281a68)
# | #21 0x00000001156785c0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x22785c0)
# | #22 0x000000011568204c llvm::legacy::PassManager::run(llvm::Module&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/llc+0x228204c)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 29, 2025

LLVM Buildbot has detected a new failure on builder mlir-s390x-linux running on systemz-1 while building mlir at step 6 "test-build-unified-tree-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/FileCheck /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# executed command: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-translate --mlir-to-llvmir
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t80: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t59, t69, t78
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'SystemZ DAG->DAG Pattern Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x000002aa32432d86 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1eb2d86)
# |  #1 0x000002aa32430446 llvm::sys::RunSignalHandlers() (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1eb0446)
# |  #2 0x000002aa324305e4 SignalHandler(int) Signals.cpp:0:0
# |  #3 0x000003ff92c7e478 (linux-vdso64.so.1+0x478)
# |  #4 0x000003ff92598116 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
# |  #5 0x000003ff92548ac0 raise ./signal/../sysdeps/posix/raise.c:27:3
# |  #6 0x000003ff9252a460 abort ./stdlib/abort.c:81:7
# |  #7 0x000002aa323719f6 (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1df19f6)
# |  #8 0x000002aa32371ab2 (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1df1ab2)
# |  #9 0x000002aa322a55d0 llvm::DAGTypeLegalizer::SplitVectorResult(llvm::SDNode*, unsigned int) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1d255d0)
# | #10 0x000002aa322374f6 llvm::DAGTypeLegalizer::run() (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1cb74f6)
# | #11 0x000002aa322383f2 llvm::SelectionDAG::LegalizeTypes() (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1cb83f2)
# | #12 0x000002aa32174996 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1bf4996)
# | #13 0x000002aa3217878c llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1bf878c)
# | #14 0x000002aa3217a18e llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1bfa18e)
# | #15 0x000002aa32168670 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1be8670)
# | #16 0x000002aa310d8470 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
# | #17 0x000002aa317e5082 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1265082)
# | #18 0x000002aa317e538c llvm::FPPassManager::runOnModule(llvm::Module&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x126538c)
# | #19 0x000002aa317e5f72 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x1265f72)
# | #20 0x000002aa30a78912 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
# | #21 0x000002aa309b49f0 main (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/llc+0x4349f0)
# | #22 0x000003ff9252a712 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
# | #23 0x000003ff9252a7f0 call_init ./csu/../csu/libc-start.c:128:20
...

@adam-smnk
Copy link
Contributor Author

The test should've been restricted to x86 target. I'll make a fix.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 29, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot12 while building mlir at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86243 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82158 of 86243)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000ad37287ecbf4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #1 0x0000ad37287e73c8 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
# |  #2 0x0000ad37287ede28 SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
# |  #3 0x0000e7823543c8f8 (linux-vdso.so.1+0x8f8)
# |  #4 0x0000e78234d77628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #5 0x0000e78234d2cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #6 0x0000e78234d17e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #7 0x0000ad3728660834 begin /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:267:45
# |  #8 0x0000ad3728660834 data /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:286:35
# |  #9 0x0000ad3728660834 str /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:720:47
Step 11 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86243 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82158 of 86243)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000ad37287ecbf4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #1 0x0000ad37287e73c8 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
# |  #2 0x0000ad37287ede28 SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
# |  #3 0x0000e7823543c8f8 (linux-vdso.so.1+0x8f8)
# |  #4 0x0000e78234d77628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #5 0x0000e78234d2cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #6 0x0000e78234d17e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #7 0x0000ad3728660834 begin /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:267:45
# |  #8 0x0000ad3728660834 data /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:286:35
# |  #9 0x0000ad3728660834 str /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:720:47

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 29, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-asan running on sanitizer-buildbot7 while building mlir at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86244 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82038 of 86244)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000bcee7c6dc0a4 ___interceptor_backtrace /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:4497:13
# |  #1 0x0000bcee82fb9638 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #2 0x0000bcee82fb5404 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
# |  #3 0x0000bcee82fba2bc SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
# |  #4 0x0000eecdc02fd8f8 (linux-vdso.so.1+0x8f8)
# |  #5 0x0000eecdbfbc7628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #6 0x0000eecdbfb7cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #7 0x0000eecdbfb67e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #8 0x0000bcee82e66e38 operator<< /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:233:7
# |  #9 0x0000bcee82e66e38 operator<< /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:257:18
Step 11 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86244 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82038 of 86244)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000bcee7c6dc0a4 ___interceptor_backtrace /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:4497:13
# |  #1 0x0000bcee82fb9638 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #2 0x0000bcee82fb5404 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
# |  #3 0x0000bcee82fba2bc SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
# |  #4 0x0000eecdc02fd8f8 (linux-vdso.so.1+0x8f8)
# |  #5 0x0000eecdbfbc7628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #6 0x0000eecdbfb7cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #7 0x0000eecdbfb67e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #8 0x0000bcee82e66e38 operator<< /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:233:7
# |  #9 0x0000bcee82e66e38 operator<< /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/raw_ostream.h:257:18

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 29, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-ubsan running on sanitizer-buildbot10 while building mlir at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86244 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82012 of 86244)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000b0af7d219e48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #1 0x0000b0af7d216e10 __cxx_atomic_store<CallbackAndCookie::Status> /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_install_ubsan/include/c++/v1/__atomic/support/c11.h:68:3
# |  #2 0x0000b0af7d216e10 store /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_install_ubsan/include/c++/v1/__atomic/atomic.h:59:5
# |  #3 0x0000b0af7d216e10 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Signals.cpp:107:16
# |  #4 0x0000b0af7d21a91c SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:415:1
# |  #5 0x0000f093df1a88f8 (linux-vdso.so.1+0x8f8)
# |  #6 0x0000f093deb97628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #7 0x0000f093deb4cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #8 0x0000f093deb37e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #9 0x0000b0af7d152cbc llvm::report_fatal_error(llvm::Twine const&, bool) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/ErrorHandling.cpp:124:5
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86244 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: MLIR :: Dialect/X86Vector/dot-bf16.mlir (82012 of 86244)
******************** TEST 'MLIR :: Dialect/X86Vector/dot-bf16.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir    -convert-vector-to-llvm="enable-x86vector" -convert-to-llvm    -reconcile-unrealized-casts |  /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-translate --mlir-to-llvmir |  llc -mcpu=sapphirerapids |  /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-opt /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/mlir/test/Dialect/X86Vector/dot-bf16.mlir -convert-vector-to-llvm=enable-x86vector -convert-to-llvm -reconcile-unrealized-casts
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/mlir-translate --mlir-to-llvmir
# note: command had no output on stdout or stderr
# executed command: llc -mcpu=sapphirerapids
# .---command stderr------------
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | 'sapphirerapids' is not a recognized processor for this target (ignoring processor)
# | SplitVectorResult #0: t82: v4f32 = llvm.x86.avx512bf16.dpbf16ps.128 TargetConstant:i64<14053>, t46, t63, t80
# | 
# | LLVM ERROR: Do not know how to split the result of this operator!
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: llc -mcpu=sapphirerapids
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AArch64 Instruction Selection' on function '@avx512bf16_dot_128'
# |  #0 0x0000b0af7d219e48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:13
# |  #1 0x0000b0af7d216e10 __cxx_atomic_store<CallbackAndCookie::Status> /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_install_ubsan/include/c++/v1/__atomic/support/c11.h:68:3
# |  #2 0x0000b0af7d216e10 store /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_install_ubsan/include/c++/v1/__atomic/atomic.h:59:5
# |  #3 0x0000b0af7d216e10 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Signals.cpp:107:16
# |  #4 0x0000b0af7d21a91c SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:415:1
# |  #5 0x0000f093df1a88f8 (linux-vdso.so.1+0x8f8)
# |  #6 0x0000f093deb97628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #7 0x0000f093deb4cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #8 0x0000f093deb37e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #9 0x0000b0af7d152cbc llvm::report_fatal_error(llvm::Twine const&, bool) /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/ErrorHandling.cpp:124:5

@rengolin
Copy link
Member

Buildbots should be fixed with #124916 (008e162)

@dcaballe
Copy link
Contributor

I haven't thought too deeply about this but I believe the current structure of the x86Vector dialect may not scale well as we add more operations. Here are a couple of guiding principles to consider:

  1. For targets that do not support certain instructions, such as AVX512, we might want to avoid loading those operations into the dialect registry. Among other benefits, this would prevent us from generating illegal instructions. We could achieve this by creating independent dialects (e.g., x86.avx512, x86.avx2, x86.sseXY).

  2. We should also consider extending the previous point to AVX-512 sub-ISAs with the same goals: do not load unsupported operations or generate illegal instructions.

I wonder if we could find a way to conditionally register operations within the same dialect. This approach would help us implement the second point without having to create an independent dialect for each sub-ISA. However, if this conditional registration is not feasible, creating separate dialects for each sub-ISA doesn’t sound terrible to me, esp. if we plan to add a significant number of operations.

It would be great to take some actions on this regard before things get out of control...

@rengolin
Copy link
Member

I haven't thought too deeply about this but I believe the current structure of the x86Vector dialect may not scale well as we add more operations.

Agree. The idea is not to add "all or a lot of operations", but to add enough (3-4) to have a prototype that guide us through a scalable design.

  1. For targets that do not support certain instructions, such as AVX512, we might want to avoid loading those operations into the dialect registry. Among other benefits, this would prevent us from generating illegal instructions. We could achieve this by creating independent dialects (e.g., x86.avx512, x86.avx2, x86.sseXY).

Conditionally loading operations in a dialect is not something trivial to do, nor it makes sense for cross-compilation, so I'd avoid trying to go there as a first step. I think a simpler step would be to conditionally load entire dialects in response to target (not host) information, but that still need us to have a coherent target description story.

the DLTI work is leading us there, but it's still not required (like LLVM's triple/DL), so we can't rely on that yet. My aim is to make DLTI mandatory like LLVM and then we can start making smarter compiler time and run time selections.

However, if this conditional registration is not feasible, creating separate dialects for each sub-ISA doesn’t sound terrible to me, esp. if we plan to add a significant number of operations.

It does sound terrible to me. SSE, AVX, AVX2 and AVX512 have a dozen variations each. NEON and SVE has a few more. And none of those are really there for code generation (like LLVM's intrinsics), but as short-cuts to a handful of LLVM intrinsics. As soon as we have specialized lowering transforms that can generate LLVM intrinsics directly, most of those instructions become irrelevant.

We do not want to recreate the LLVM pipeline in MLIR.

It would be great to take some actions on this regard before things get out of control...

There is the intention of design behind this PR, we don't want to just dump instructions here.

@dcaballe
Copy link
Contributor

the DLTI work is leading us there, but it's still not required (like LLVM's triple/DL), so we can't rely on that yet. My aim is to make DLTI mandatory like LLVM and then we can start making smarter compiler time and run time selections.

To fill this gap, different downstream project came up with their own way to represent target information and pass that to upstream code in some way. For example, we have some AVX2 specific transformations with an API that allows downstream projects to enable them using target information. I believe designing with that in mind would help transition to whatever we end up adopting without major rework.

However, if this conditional registration is not feasible, creating separate dialects for each sub-ISA doesn’t sound terrible to me, esp. if we plan to add a significant number of operations.

It does sound terrible to me. SSE, AVX, AVX2 and AVX512 have a dozen variations each. NEON and SVE has a few more. And none of those are really there for code generation (like LLVM's intrinsics), but as short-cuts to a handful of LLVM intrinsics.

Well, AVX512 alone has thousands of intrinsics, even when many in that list can be folded together. I think, loading all AVX512 ops vs just the supported subsets could really make a difference. We already have dialects with just a handful of operations so I don't see this being too much different. It's also difficult to know how these operations will be used in the long run. We already have some passes running on SME operations and I wouldn't be surprised if we ended up introducing some transformations/canonicalizations of the AVX2 operations that we generate.

My comment is mostly giving visibility to some concerns that were brought to my attention about the current state of some of these dialects. It's great to hear that there is a plan to improve this. I'll be happy to help to the extent possible :)

@rengolin
Copy link
Member

To fill this gap, different downstream project came up with their own way to represent target information and pass that to upstream code in some way. For example, we have some AVX2 specific transformations with an API that allows downstream projects to enable them using target information. I believe designing with that in mind would help transition to whatever we end up adopting without major rework.

That's the idea.

Well, AVX512 alone has thousands of intrinsics, even when many in that list can be folded together. I think, loading all AVX512 ops vs just the supported subsets could really make a difference.

We're not proposing to complete the extension by any stretch of imagination. This would be wrong in too many levels. :)

It's also difficult to know how these operations will be used in the long run. We already have some passes running on SME operations and I wouldn't be surprised if we ended up introducing some transformations/canonicalizations of the AVX2 operations that we generate.

Transformations, yes. Canonicalizations, no. We want to have a "special lowering" from a vector.contract into a series of FMAs, broadcasts, permutes that implement an efficient algorithm utilizing more registers than standard LLVM vectorization. We have a local prototype that does that for F32 and reaches really high performance. We want to test the waters on BF16.

I do not believe we should have such a low level dialect in the first place (as @Groverkss said, this would be akin to Rocm), which does not make sense, as you also pointed out. We know that, and agree with the sentiment. So, we expose the problems in the current design and come up with a plan to refactor it.

My preference is to not need the intr namespace and match lowering directly based on types. But to refactor the dialect now, with partial information, would likely mean we'll have to do it again in a month from now. So, we continue with the current warts, then form a plan to remove them.

My comment is mostly giving visibility to some concerns that were brought to my attention about the current state of some of these dialects. It's great to hear that there is a plan to improve this. I'll be happy to help to the extent possible :)

Awesome! The intention was to grab the attention of people who care, so we can have a design upstream across usages, not particular to our own. We have two or three more to go and we'll have all we need for a transform that can convert contractions into efficient micro-kernels at the compiler level. With that example upstream, we can begin to discuss the pros and cons and redesign both x86vector and amx (and if Arm is game, their dialects, too).

We'll be counting on you to help us!

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.

7 participants