Skip to content

[mlir][TOSA] Fix linalg lowering of depthwise conv2d #130282

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 1 commit into from
Mar 7, 2025

Conversation

RoboTux
Copy link
Contributor

@RoboTux RoboTux commented Mar 7, 2025

Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.

Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.
@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-tosa

Author: Thomas Preud'homme (RoboTux)

Changes

Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.


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

2 Files Affected:

  • (modified) mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp (+17-18)
  • (modified) mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir (+26-1)
diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
index 2a2589e19d0ac..c8c1975177b90 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
@@ -477,27 +477,21 @@ class DepthwiseConvConverter
       return rewriter.notifyMatchFailure(
           op, "weight zero point must be zero for non-int8 integer types");
 
-    bool hasZp = (inputZpVal != 0) || (weightZpVal != 0);
     auto weightShape = weightTy.getShape();
     auto resultShape = resultTy.getShape();
 
     // Apply padding as necessary.
-    TypedAttr zeroAttr = rewriter.getZeroAttr(inputETy);
-    if (hasZp) {
-      int64_t intMin =
-          APInt::getSignedMinValue(inputETy.getIntOrFloatBitWidth())
-              .getSExtValue();
-      int64_t intMax =
-          APInt::getSignedMaxValue(inputETy.getIntOrFloatBitWidth())
-              .getSExtValue();
+    int64_t intMin = APInt::getSignedMinValue(inputETy.getIntOrFloatBitWidth())
+                         .getSExtValue();
+    int64_t intMax = APInt::getSignedMaxValue(inputETy.getIntOrFloatBitWidth())
+                         .getSExtValue();
 
-      if (inputZpVal < intMin || inputZpVal > intMax)
-        return rewriter.notifyMatchFailure(
-            op, "tosa.depthwise_conv op quantization has zp outside of input "
-                "range");
+    if (inputZpVal < intMin || inputZpVal > intMax)
+      return rewriter.notifyMatchFailure(
+          op, "tosa.depthwise_conv op quantization has zp outside of input "
+              "range");
 
-      zeroAttr = rewriter.getIntegerAttr(inputETy, inputZpVal);
-    }
+    TypedAttr zeroAttr = rewriter.getIntegerAttr(inputETy, inputZpVal);
 
     llvm::SmallVector<int64_t> pad;
     pad.resize(2, 0);
@@ -536,7 +530,7 @@ class DepthwiseConvConverter
     indexingMaps.push_back(rewriter.getMultiDimIdentityMap(resultRank));
     indexingMaps.push_back(rewriter.getMultiDimIdentityMap(resultRank));
 
-    if (!hasZp) {
+    if (inputZpVal == 0 && weightZpVal == 0) {
       Value conv = rewriter
                        .create<linalg::DepthwiseConv2DNhwcHwcmOp>(
                            loc, linalgConvTy, ValueRange{input, weight},
@@ -556,8 +550,13 @@ class DepthwiseConvConverter
                   getNParallelLoopsAttrs(resultRank),
                   [&](OpBuilder &nestedBuilder, Location nestedLoc,
                       ValueRange args) {
-                    Value added = nestedBuilder.create<arith::AddFOp>(
-                        loc, args[0], args[1]);
+                    Value added;
+                    if (llvm::isa<FloatType>(inputETy))
+                      added = nestedBuilder.create<arith::AddFOp>(loc, args[0],
+                                                                  args[1]);
+                    else
+                      added = nestedBuilder.create<arith::AddIOp>(loc, args[0],
+                                                                  args[1]);
                     nestedBuilder.create<linalg::YieldOp>(nestedLoc, added);
                   })
               .getResult(0);
diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
index d4afc468eeea4..dab6f3f922347 100644
--- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
+++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
@@ -798,9 +798,10 @@ func.func @depthwise_conv2d_dyn_w_h(%arg0: tensor<2x?x?x3xf32>, %arg1: tensor<3x
   // CHECK: arith.subi
   // CHECK: arith.muli
   // CHECK: arith.divui
+  // CHECK: [[CST0:%.+]] = arith.constant 0
   // CHECK: %[[PADDED:.+]] = tensor.pad %arg0 low[0, 1, 3, 0] high[0, 2, 4, 0] {
   // CHECK: ^bb0(%[[ARG3:[0-9a-zA-Z_]+]]: index, %[[ARG4:[0-9a-zA-Z_]+]]: index, %[[ARG5:[0-9a-zA-Z_]+]]: index, %[[ARG6:[0-9a-zA-Z_]+]]: index):
-  // CHECK: tensor.yield %cst : f32
+  // CHECK: tensor.yield [[CST0]] : f32
   // CHECK:  } : tensor<2x?x?x3xf32> to tensor<2x?x?x3xf32>
   // CHECK: %[[CONV:.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<[2, 1]> : tensor<2xi64>, strides = dense<[1, 2]> : tensor<2xi64>} ins(%[[PADDED]], %arg1 : tensor<2x?x?x3xf32>, tensor<3x6x3x5xf32>) outs(%{{.*}} : tensor<2x?x?x3x5xf32>) -> tensor<2x?x?x3x5xf32>
   // CHECK: %[[COLLAPSED:.+]] = tensor.collapse_shape %[[CONV]] {{\[}}[0], [1], [2], [3, 4]]
@@ -812,6 +813,30 @@ func.func @depthwise_conv2d_dyn_w_h(%arg0: tensor<2x?x?x3xf32>, %arg1: tensor<3x
 
 // -----
 
+// CHECK: #[[$MAP0:.*]] = affine_map<(d0, d1, d2, d3) -> (d3)>
+// CHECK: #[[$MAP1:.*]] = affine_map<(d0, d1, d2, d3) -> (d0, d1, d2, d3)>
+
+// CHECK-LABEL: @depthwise_int_conv_zero_zp
+func.func @depthwise_int_conv_zero_zp(%arg0 : tensor<1x7x5x3xi8>, %arg1 : tensor<3x1x3x11xi8>, %arg2 : tensor<33xi32>) -> () {
+  // CHECK: [[INIT:%.+]] = tensor.empty()
+  // CHECK: [[CST0:%.+]] = arith.constant 0
+  // CHECK: [[FILL:%.+]] = linalg.fill ins([[CST0]]{{.*}}outs([[INIT]]
+  // CHECK: [[OUT:%.+]] = tensor.empty()
+  // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1 : tensor<1x7x5x3xi8>, tensor<3x1x3x11xi8>) outs([[FILL]] : tensor<1x5x5x3x11xi32>)
+  // CHECK: [[COLLAPSED:%.+]] = tensor.collapse_shape [[DEPTH]] {{\[}}[0], [1], [2], [3, 4]]
+  // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<33xi32>, tensor<1x5x5x33xi32>) outs([[OUT]] : tensor<1x5x5x33xi32>) {
+  // CHECK: ^bb0(%[[ARG3:[0-9a-zA-Z_]+]]: i32, %[[ARG4:[0-9a-zA-Z_]+]]: i32, %[[ARG5:[0-9a-zA-Z_]+]]: i32):
+  // CHECK:   [[ADD:%.+]] = arith.addi %[[ARG3]], %[[ARG4]] : i32
+  // CHECK:   linalg.yield [[ADD]] : i32
+  // CHECK: } -> tensor<1x5x5x33xi32>
+  %input_zp = "tosa.const"() <{value = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
+  %weight_zp = "tosa.const"() <{value = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
+  %2 = tosa.depthwise_conv2d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = i32, pad = array<i64: 0, 0, 0, 0>, stride = array<i64: 1, 1>, dilation = array<i64: 1, 1> } : (tensor<1x7x5x3xi8>, tensor<3x1x3x11xi8>, tensor<33xi32>, tensor<1xi8>, tensor<1xi8>) -> tensor<1x5x5x33xi32>
+  return
+}
+
+// -----
+
 // CHECK: #[[$MAP1:.+]] = affine_map<(d0, d1, d2, d3, d4) -> (d4)>
 // CHECK: #[[$MAP2:.+]] = affine_map<(d0, d1, d2, d3, d4) -> (d0, d1, d2, d3, d4)>
 

@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2025

@llvm/pr-subscribers-mlir-linalg

Author: Thomas Preud'homme (RoboTux)

Changes

Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.


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

2 Files Affected:

  • (modified) mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp (+17-18)
  • (modified) mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir (+26-1)
diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
index 2a2589e19d0ac..c8c1975177b90 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
@@ -477,27 +477,21 @@ class DepthwiseConvConverter
       return rewriter.notifyMatchFailure(
           op, "weight zero point must be zero for non-int8 integer types");
 
-    bool hasZp = (inputZpVal != 0) || (weightZpVal != 0);
     auto weightShape = weightTy.getShape();
     auto resultShape = resultTy.getShape();
 
     // Apply padding as necessary.
-    TypedAttr zeroAttr = rewriter.getZeroAttr(inputETy);
-    if (hasZp) {
-      int64_t intMin =
-          APInt::getSignedMinValue(inputETy.getIntOrFloatBitWidth())
-              .getSExtValue();
-      int64_t intMax =
-          APInt::getSignedMaxValue(inputETy.getIntOrFloatBitWidth())
-              .getSExtValue();
+    int64_t intMin = APInt::getSignedMinValue(inputETy.getIntOrFloatBitWidth())
+                         .getSExtValue();
+    int64_t intMax = APInt::getSignedMaxValue(inputETy.getIntOrFloatBitWidth())
+                         .getSExtValue();
 
-      if (inputZpVal < intMin || inputZpVal > intMax)
-        return rewriter.notifyMatchFailure(
-            op, "tosa.depthwise_conv op quantization has zp outside of input "
-                "range");
+    if (inputZpVal < intMin || inputZpVal > intMax)
+      return rewriter.notifyMatchFailure(
+          op, "tosa.depthwise_conv op quantization has zp outside of input "
+              "range");
 
-      zeroAttr = rewriter.getIntegerAttr(inputETy, inputZpVal);
-    }
+    TypedAttr zeroAttr = rewriter.getIntegerAttr(inputETy, inputZpVal);
 
     llvm::SmallVector<int64_t> pad;
     pad.resize(2, 0);
@@ -536,7 +530,7 @@ class DepthwiseConvConverter
     indexingMaps.push_back(rewriter.getMultiDimIdentityMap(resultRank));
     indexingMaps.push_back(rewriter.getMultiDimIdentityMap(resultRank));
 
-    if (!hasZp) {
+    if (inputZpVal == 0 && weightZpVal == 0) {
       Value conv = rewriter
                        .create<linalg::DepthwiseConv2DNhwcHwcmOp>(
                            loc, linalgConvTy, ValueRange{input, weight},
@@ -556,8 +550,13 @@ class DepthwiseConvConverter
                   getNParallelLoopsAttrs(resultRank),
                   [&](OpBuilder &nestedBuilder, Location nestedLoc,
                       ValueRange args) {
-                    Value added = nestedBuilder.create<arith::AddFOp>(
-                        loc, args[0], args[1]);
+                    Value added;
+                    if (llvm::isa<FloatType>(inputETy))
+                      added = nestedBuilder.create<arith::AddFOp>(loc, args[0],
+                                                                  args[1]);
+                    else
+                      added = nestedBuilder.create<arith::AddIOp>(loc, args[0],
+                                                                  args[1]);
                     nestedBuilder.create<linalg::YieldOp>(nestedLoc, added);
                   })
               .getResult(0);
diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
index d4afc468eeea4..dab6f3f922347 100644
--- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
+++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
@@ -798,9 +798,10 @@ func.func @depthwise_conv2d_dyn_w_h(%arg0: tensor<2x?x?x3xf32>, %arg1: tensor<3x
   // CHECK: arith.subi
   // CHECK: arith.muli
   // CHECK: arith.divui
+  // CHECK: [[CST0:%.+]] = arith.constant 0
   // CHECK: %[[PADDED:.+]] = tensor.pad %arg0 low[0, 1, 3, 0] high[0, 2, 4, 0] {
   // CHECK: ^bb0(%[[ARG3:[0-9a-zA-Z_]+]]: index, %[[ARG4:[0-9a-zA-Z_]+]]: index, %[[ARG5:[0-9a-zA-Z_]+]]: index, %[[ARG6:[0-9a-zA-Z_]+]]: index):
-  // CHECK: tensor.yield %cst : f32
+  // CHECK: tensor.yield [[CST0]] : f32
   // CHECK:  } : tensor<2x?x?x3xf32> to tensor<2x?x?x3xf32>
   // CHECK: %[[CONV:.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<[2, 1]> : tensor<2xi64>, strides = dense<[1, 2]> : tensor<2xi64>} ins(%[[PADDED]], %arg1 : tensor<2x?x?x3xf32>, tensor<3x6x3x5xf32>) outs(%{{.*}} : tensor<2x?x?x3x5xf32>) -> tensor<2x?x?x3x5xf32>
   // CHECK: %[[COLLAPSED:.+]] = tensor.collapse_shape %[[CONV]] {{\[}}[0], [1], [2], [3, 4]]
@@ -812,6 +813,30 @@ func.func @depthwise_conv2d_dyn_w_h(%arg0: tensor<2x?x?x3xf32>, %arg1: tensor<3x
 
 // -----
 
+// CHECK: #[[$MAP0:.*]] = affine_map<(d0, d1, d2, d3) -> (d3)>
+// CHECK: #[[$MAP1:.*]] = affine_map<(d0, d1, d2, d3) -> (d0, d1, d2, d3)>
+
+// CHECK-LABEL: @depthwise_int_conv_zero_zp
+func.func @depthwise_int_conv_zero_zp(%arg0 : tensor<1x7x5x3xi8>, %arg1 : tensor<3x1x3x11xi8>, %arg2 : tensor<33xi32>) -> () {
+  // CHECK: [[INIT:%.+]] = tensor.empty()
+  // CHECK: [[CST0:%.+]] = arith.constant 0
+  // CHECK: [[FILL:%.+]] = linalg.fill ins([[CST0]]{{.*}}outs([[INIT]]
+  // CHECK: [[OUT:%.+]] = tensor.empty()
+  // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1 : tensor<1x7x5x3xi8>, tensor<3x1x3x11xi8>) outs([[FILL]] : tensor<1x5x5x3x11xi32>)
+  // CHECK: [[COLLAPSED:%.+]] = tensor.collapse_shape [[DEPTH]] {{\[}}[0], [1], [2], [3, 4]]
+  // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<33xi32>, tensor<1x5x5x33xi32>) outs([[OUT]] : tensor<1x5x5x33xi32>) {
+  // CHECK: ^bb0(%[[ARG3:[0-9a-zA-Z_]+]]: i32, %[[ARG4:[0-9a-zA-Z_]+]]: i32, %[[ARG5:[0-9a-zA-Z_]+]]: i32):
+  // CHECK:   [[ADD:%.+]] = arith.addi %[[ARG3]], %[[ARG4]] : i32
+  // CHECK:   linalg.yield [[ADD]] : i32
+  // CHECK: } -> tensor<1x5x5x33xi32>
+  %input_zp = "tosa.const"() <{value = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
+  %weight_zp = "tosa.const"() <{value = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
+  %2 = tosa.depthwise_conv2d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = i32, pad = array<i64: 0, 0, 0, 0>, stride = array<i64: 1, 1>, dilation = array<i64: 1, 1> } : (tensor<1x7x5x3xi8>, tensor<3x1x3x11xi8>, tensor<33xi32>, tensor<1xi8>, tensor<1xi8>) -> tensor<1x5x5x33xi32>
+  return
+}
+
+// -----
+
 // CHECK: #[[$MAP1:.+]] = affine_map<(d0, d1, d2, d3, d4) -> (d4)>
 // CHECK: #[[$MAP2:.+]] = affine_map<(d0, d1, d2, d3, d4) -> (d0, d1, d2, d3, d4)>
 

@RoboTux RoboTux merged commit e22579a into llvm:main Mar 7, 2025
11 of 14 checks passed
// CHECK: [[ADD:%.+]] = arith.addi %[[ARG3]], %[[ARG4]] : i32
// CHECK: linalg.yield [[ADD]] : i32
// CHECK: } -> tensor<1x5x5x33xi32>
%input_zp = "tosa.const"() <{value = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect value needs updating to values after #129943

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 2025

LLVM Buildbot has detected a new failure on builder mlir-rocm-mi200 running on mi200-buildbot while building mlir at step 7 "test-build-check-mlir-build-only-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/FileCheck /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::IntegerAttr, BaseT = mlir::Attribute, StorageT = mlir::detail::IntegerAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <mlir::TypedAttr::Trait>, Args = <mlir::Type &, const llvm::APInt &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# |  #0 0x0000562ede3b38d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x42f98d8)
# |  #1 0x0000562ede3b13ce llvm::sys::RunSignalHandlers() (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x42f73ce)
# |  #2 0x0000562ede3b40b6 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# |  #3 0x00007f40afcc8420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
# |  #4 0x00007f40af78b00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
# |  #5 0x00007f40af76a859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
# |  #6 0x00007f40af76a729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
# |  #7 0x00007f40af77bfd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
# |  #8 0x0000562ee151b4c0 mlir::IntegerAttr::getChecked(llvm::function_ref<mlir::InFlightDiagnostic ()>, mlir::Type, llvm::APInt const&) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x74614c0)
# |  #9 0x0000562ee151b342 mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x7461342)
# | #10 0x0000562ee1516ee7 mlir::Builder::getIntegerAttr(mlir::Type, long) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x745cee7)
# | #11 0x0000562ee1318be9 (anonymous namespace)::DepthwiseConvConverter::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpAdaptor, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #12 0x0000562ee13196e1 mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpGenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #13 0x0000562ee131835a mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #14 0x0000562ee14882e6 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73ce2e6)
# | #15 0x0000562ee44b4d02 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
# | #16 0x0000562ee44b19df mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0xa3f79df)
# | #17 0x0000562ee148936d (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
# | #18 0x0000562ee1488407 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73ce407)
# | #19 0x0000562ee14895bf mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73cf5bf)
# | #20 0x0000562ee148f6ee mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73d56ee)
# | #21 0x0000562ee1310059 (anonymous namespace)::TosaToLinalgNamed::runOnOperation() TosaToLinalgNamedPass.cpp:0:0
# | #22 0x0000562ee142630a mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736c30a)
# | #23 0x0000562ee1426c12 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736cc12)
# | #24 0x0000562ee142cd2e auto void mlir::parallelForEach<__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0>(mlir::MLIRContext*, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&&)::'lambda'(__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>&&)::operator()<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&>(__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>&&) const Pass.cpp:0:0
# | #25 0x0000562ee142825b mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736e25b)
# | #26 0x0000562ee1426463 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736c463)
# | #27 0x0000562ee1426c12 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736cc12)
# | #28 0x0000562ee14291ee mlir::PassManager::run(mlir::Operation*) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x736f1ee)
# | #29 0x0000562ee14216eb performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
# | #30 0x0000562ee1421205 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
# | #31 0x0000562ee14dadf6 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0::operator()(llvm::StringRef) const ToolUtilities.cpp:0:0
# | #32 0x0000562ee14daaaf mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x7420aaf)
# | #33 0x0000562ee141b2f2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73612f2)
# | #34 0x0000562ee141b5a3 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73615a3)
# | #35 0x0000562ee141b8be mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt+0x73618be)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<ConcreteT, BaseT, StorageT, UniquerT, Traits>::get(mlir::MLIRContext*, Args&& ...) [with Args = {mlir::Type&, const llvm::APInt&}; ConcreteT = mlir::IntegerAttr; BaseT = mlir::Attribute; StorageT = mlir::detail::IntegerAttrStorage; UniquerT = mlir::detail::AttributeUniquer; Traits = {mlir::TypedAttr::Trait}]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# | Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
# | 0  mlir-opt  0x000058604024e7bb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 59
# | 1  mlir-opt  0x000058604024bb84
# | 2  libc.so.6 0x00007daa5011a520
# | 3  libc.so.6 0x00007daa5016e9fc pthread_kill + 300
# | 4  libc.so.6 0x00007daa5011a476 raise + 22
# | 5  libc.so.6 0x00007daa501007f3 abort + 211
# | 6  libc.so.6 0x00007daa5010071b
# | 7  libc.so.6 0x00007daa50111e96
# | 8  mlir-opt  0x000058604328b86c mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) + 620
# | 9  mlir-opt  0x000058604326afef mlir::Builder::getIntegerAttr(mlir::Type, long) + 223
# | 10 mlir-opt  0x0000586042f81eed
# | 11 mlir-opt  0x0000586042f70743
# | 12 mlir-opt  0x0000586042f7200c
# | 13 mlir-opt  0x00005860431bee5b mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const + 587
# | 14 mlir-opt  0x0000586046030bdb mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) + 1931
# | 15 mlir-opt  0x00005860431c2724
# | 16 mlir-opt  0x00005860431c2fa8 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) + 56
# | 17 mlir-opt  0x00005860431c5794 mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) + 724
# | 18 mlir-opt  0x00005860431c7bf4 mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) + 148
# | 19 mlir-opt  0x0000586042f6cdad
# | 20 mlir-opt  0x000058604311033e mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 1294
# | 21 mlir-opt  0x000058604311069a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 250
# | 22 mlir-opt  0x0000586043110a92
# | 23 mlir-opt  0x000058604310f8cd mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) + 3165
# | 24 mlir-opt  0x000058604311019a mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 874
# | 25 mlir-opt  0x0000586043111243
# | 26 mlir-opt  0x000058604311196f mlir::PassManager::run(mlir::Operation*) + 1295
# | 27 mlir-opt  0x00005860431024a7
# | 28 mlir-opt  0x0000586043102d3c
# | 29 mlir-opt  0x0000586043103091
# | 30 mlir-opt  0x000058604322676d
# | 31 mlir-opt  0x000058604322733e mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) + 1806
# | 32 mlir-opt  0x00005860430fc18c mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) + 220
# | 33 mlir-opt  0x00005860431031ef mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) + 287
# | 34 mlir-opt  0x00005860431036ae mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) + 414
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 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/16302

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 :: Conversion/TosaToLinalg/tosa-to-linalg-named.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 --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /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/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::IntegerAttr, BaseT = mlir::Attribute, StorageT = mlir::detail::IntegerAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <mlir::TypedAttr::Trait>, Args = <mlir::Type &, const llvm::APInt &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# |  #0 0x00000001185b7d2c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x3ce7d2c)
# |  #1 0x00000001185b8484 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
# |  #2 0x00000001185b4e30 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x3ce4e30)
# |  #3 0x00000001185b88ec SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# |  #4 0x00007fffa31404d8 (linux-vdso64.so.1+0x4d8)
# |  #5 0x00007fffa29ea448 raise (/usr/lib64/libc.so.6+0x4a448)
# |  #6 0x00007fffa29c4a54 abort (/usr/lib64/libc.so.6+0x24a54)
# |  #7 0x00007fffa29ddc30 __assert_fail_base (/usr/lib64/libc.so.6+0x3dc30)
# |  #8 0x00007fffa29ddcd4 __assert_fail (/usr/lib64/libc.so.6+0x3dcd4)
# |  #9 0x000000011c8acac0 mlir::IntegerAttr mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get<mlir::Type&, llvm::APInt const&>(mlir::MLIRContext*, mlir::Type&, llvm::APInt const&) BuiltinAttributes.cpp:0:0
# | #10 0x000000011c8ac868 mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7fdc868)
# | #11 0x000000011c8a6260 mlir::Builder::getIntegerAttr(mlir::Type, long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7fd6260)
# | #12 0x000000011c60cf14 (anonymous namespace)::DepthwiseConvConverter::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpAdaptor, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #13 0x000000011c60d8e4 mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpGenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #14 0x000000011c60c548 mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #15 0x000000011c7e36c0 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7f136c0)
# | #16 0x000000011f73e25c void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
# | #17 0x000000011f739f70 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0xae69f70)
# | #18 0x000000011c7e474c (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
# | #19 0x000000011c7e3844 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7f13844)
# | #20 0x000000011c7e4b20 mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7f14b20)
# | #21 0x000000011c7ebfbc mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7f1bfbc)
# | #22 0x000000011c602178 (anonymous namespace)::TosaToLinalgNamed::runOnOperation() TosaToLinalgNamedPass.cpp:0:0
# | #23 0x000000011c767904 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e97904)
# | #24 0x000000011c768520 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e98520)
# | #25 0x000000011c770c14 auto void mlir::parallelForEach<__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0>(mlir::MLIRContext*, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_0&&)::'lambda'(__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>&&)::operator()<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&>(__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>>&&) const Pass.cpp:0:0
# | #26 0x000000011c76a04c mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e9a04c)
# | #27 0x000000011c767a8c mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e97a8c)
# | #28 0x000000011c768520 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e98520)
# | #29 0x000000011c76b44c mlir::PassManager::run(mlir::Operation*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e9b44c)
# | #30 0x000000011c7611e0 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
# | #31 0x000000011c760be0 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
# | #32 0x000000011c853b8c mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0::operator()(llvm::StringRef) const ToolUtilities.cpp:0:0
# | #33 0x000000011c8537c0 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7f837c0)
# | #34 0x000000011c758a94 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e88a94)
# | #35 0x000000011c758e44 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt+0x7e88e44)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 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/7400

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 :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/FileCheck /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:179: static ConcreteT mlir::detail::StorageUserBase<ConcreteT, BaseT, StorageT, UniquerT, Traits>::get(mlir::MLIRContext*, Args&& ...) [with Args = {mlir::Type&, const llvm::APInt&}; ConcreteT = mlir::IntegerAttr; BaseT = mlir::Attribute; StorageT = mlir::detail::IntegerAttrStorage; UniquerT = mlir::detail::AttributeUniquer; Traits = {mlir::TypedAttr::Trait}]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# |  #0 0x000002aa208eebd6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x156ebd6)
# |  #1 0x000002aa208ebf56 llvm::sys::RunSignalHandlers() (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x156bf56)
# |  #2 0x000002aa208ec0f8 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# |  #3 0x000003ffbbc7e480 (linux-vdso64.so.1+0x480)
# |  #4 0x000003ffbb598116 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
# |  #5 0x000003ffbb548ac0 raise ./signal/../sysdeps/posix/raise.c:27:3
# |  #6 0x000003ffbb52a460 abort ./stdlib/abort.c:81:7
# |  #7 0x000003ffbb540188 __assert_fail_base ./assert/assert.c:91:7
# |  #8 0x000003ffbb5401fe (/lib/s390x-linux-gnu/libc.so.6+0x401fe)
# |  #9 0x000002aa23ff0d2c mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4c70d2c)
# | #10 0x000002aa23fc0f00 mlir::Builder::getIntegerAttr(mlir::Type, long) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4c40f00)
# | #11 0x000002aa23cddf46 (anonymous namespace)::DepthwiseConvConverter::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpAdaptor, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #12 0x000002aa23ccef4e mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x494ef4e)
# | #13 0x000002aa23efd4b8 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4b7d4b8)
# | #14 0x000002aa27104c02 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x7d84c02)
# | #15 0x000002aa23f01b12 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
# | #16 0x000002aa23f0206e mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4b8206e)
# | #17 0x000002aa23f05aa6 mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4b85aa6)
# | #18 0x000002aa23f07fd8 mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4b87fd8)
# | #19 0x000002aa23c75e06 (anonymous namespace)::TosaToLinalgNamed::runOnOperation() TosaToLinalgNamedPass.cpp:0:0
# | #20 0x000002aa23e49e9c mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4ac9e9c)
# | #21 0x000002aa23e4a384 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4aca384)
# | #22 0x000002aa23e4a984 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
# | #23 0x000002aa23e49492 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4ac9492)
# | #24 0x000002aa23e49cc0 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4ac9cc0)
# | #25 0x000002aa23e4a384 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4aca384)
# | #26 0x000002aa23e4b718 mlir::PassManager::run(mlir::Operation*) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4acb718)
# | #27 0x000002aa23e39886 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
# | #28 0x000002aa23e3a198 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
# | #29 0x000002aa23e3a48c llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
# | #30 0x000002aa23f6366c mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::'lambda'(llvm::StringRef)::operator()(llvm::StringRef) const ToolUtilities.cpp:0:0
# | #31 0x000002aa23f63ff2 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4be3ff2)
# | #32 0x000002aa23e32272 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4ab2272)
# | #33 0x000002aa23e3a5fc mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4aba5fc)
# | #34 0x000002aa23e3ab02 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x4abab02)
# | #35 0x000002aa20824e60 main (/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt+0x14a4e60)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building mlir at step 10 "Add check check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 10 (Add check check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<ConcreteT, BaseT, StorageT, UniquerT, Traits>::get(mlir::MLIRContext*, Args&& ...) [with Args = {mlir::Type&, const llvm::APInt&}; ConcreteT = mlir::IntegerAttr; BaseT = mlir::Attribute; StorageT = mlir::detail::IntegerAttrStorage; UniquerT = mlir::detail::AttributeUniquer; Traits = {mlir::TypedAttr::Trait}]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# |  #0 0x0000000001819e58 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x1819e58)
# |  #1 0x0000000001816db4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# |  #2 0x00007faf34fce910 __restore_rt (/lib64/libpthread.so.0+0x16910)
# |  #3 0x00007faf348fcd2b raise (/lib64/libc.so.6+0x4ad2b)
# |  #4 0x00007faf348fe3e5 abort (/lib64/libc.so.6+0x4c3e5)
# |  #5 0x00007faf348f4c6a __assert_fail_base (/lib64/libc.so.6+0x42c6a)
# |  #6 0x00007faf348f4cf2 (/lib64/libc.so.6+0x42cf2)
# |  #7 0x00000000042a3f27 mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x42a3f27)
# |  #8 0x0000000004287b47 mlir::Builder::getIntegerAttr(mlir::Type, long) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x4287b47)
# |  #9 0x000000000401067a (anonymous namespace)::DepthwiseConvConverter::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpAdaptor, mlir::ConversionPatternRewriter&) const TosaToLinalgNamed.cpp:0:0
# | #10 0x0000000004000420 mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpGenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) const (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x4000420)
# | #11 0x000000000400157e mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x400157e)
# | #12 0x00000000041f173b mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x41f173b)
# | #13 0x0000000007607a53 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x7607a53)
# | #14 0x00000000041f4db1 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
# | #15 0x00000000041f5615 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x41f5615)
# | #16 0x00000000041f7c0b mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x41f7c0b)
# | #17 0x00000000041f9fd1 mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x41f9fd1)
# | #18 0x0000000003fb345c (anonymous namespace)::TosaToLinalgNamed::runOnOperation() TosaToLinalgNamedPass.cpp:0:0
# | #19 0x000000000414bce1 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414bce1)
# | #20 0x000000000414c01a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414c01a)
# | #21 0x000000000414c3f2 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
# | #22 0x000000000414b2c5 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414b2c5)
# | #23 0x000000000414bb33 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414bb33)
# | #24 0x000000000414cb53 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (.constprop.559) Pass.cpp:0:0
# | #25 0x000000000414d25f mlir::PassManager::run(mlir::Operation*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414d25f)
# | #26 0x000000000413f317 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
# | #27 0x000000000413fb7c processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
# | #28 0x000000000413feb1 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
# | #29 0x00000000042452ed mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::'lambda'(llvm::StringRef)::operator()(llvm::StringRef) const ToolUtilities.cpp:0:0
# | #30 0x0000000004245e5e mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x4245e5e)
# | #31 0x0000000004138ffc mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x4138ffc)
# | #32 0x000000000413ffd7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x413ffd7)
# | #33 0x000000000414046b mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x414046b)
# | #34 0x0000000001746975 main (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/mlir-opt+0x1746975)
# | #35 0x00007faf348e724d __libc_start_main (/lib64/libc.so.6+0x3524d)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get(mlir::MLIRContext *, Args &&...) [ConcreteT = mlir::IntegerAttr, BaseT = mlir::Attribute, StorageT = mlir::detail::IntegerAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <mlir::TypedAttr::Trait>, Args = <mlir::Type &, const llvm::APInt &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# | Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
# | 0  libLLVMSupport.so.21.0git        0x00007bf4d6fef0c7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
# | 1  libLLVMSupport.so.21.0git        0x00007bf4d6fecc5e llvm::sys::RunSignalHandlers() + 238
# | 2  libLLVMSupport.so.21.0git        0x00007bf4d6fef795
# | 3  libc.so.6                        0x00007bf4d68b5520
# | 4  libc.so.6                        0x00007bf4d69099fc pthread_kill + 300
# | 5  libc.so.6                        0x00007bf4d68b5476 raise + 22
# | 6  libc.so.6                        0x00007bf4d689b7f3 abort + 211
# | 7  libc.so.6                        0x00007bf4d689b71b
# | 8  libc.so.6                        0x00007bf4d68ace96
# | 9  libMLIRIR.so.21.0git             0x00007bf4d71bbce1
# | 10 libMLIRIR.so.21.0git             0x00007bf4d71bbb73 mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) + 83
# | 11 libMLIRIR.so.21.0git             0x00007bf4d71b7247 mlir::Builder::getIntegerAttr(mlir::Type, long) + 135
# | 12 libMLIRTosaToLinalg.so.21.0git   0x00007bf4dd6f1923
# | 13 libMLIRTosaToLinalg.so.21.0git   0x00007bf4dd6f23d1
# | 14 libMLIRTosaToLinalg.so.21.0git   0x00007bf4dd6f10ba
# | 15 libMLIRTransformUtils.so.21.0git 0x00007bf4d779ff16 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const + 422
# | 16 libMLIRRewrite.so.21.0git        0x00007bf4d76f9ad1
# | 17 libMLIRRewrite.so.21.0git        0x00007bf4d76f64af mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) + 895
# | 18 libMLIRTransformUtils.so.21.0git 0x00007bf4d77a0fd2
# | 19 libMLIRTransformUtils.so.21.0git 0x00007bf4d77a0047 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) + 39
# | 20 libMLIRTransformUtils.so.21.0git 0x00007bf4d77a11ef mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) + 271
# | 21 libMLIRTransformUtils.so.21.0git 0x00007bf4d77a798e mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) + 94
# | 22 libMLIRTosaToLinalg.so.21.0git   0x00007bf4dd6fcc76
# | 23 libMLIRPass.so.21.0git           0x00007bf4d74bdc07 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 695
# | 24 libMLIRPass.so.21.0git           0x00007bf4d74be471 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 337
# | 25 libMLIRPass.so.21.0git           0x00007bf4d74c5f7e
# | 26 libMLIRPass.so.21.0git           0x00007bf4d74bfc6b mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) + 2987
# | 27 libMLIRPass.so.21.0git           0x00007bf4d74bdd60 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 1040
# | 28 libMLIRPass.so.21.0git           0x00007bf4d74be471 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 337
# | 29 libMLIRPass.so.21.0git           0x00007bf4d74c0b6b mlir::PassManager::run(mlir::Operation*) + 923
# | 30 libMLIROptLib.so.21.0git         0x00007bf4dfe1cf4f
# | 31 libMLIROptLib.so.21.0git         0x00007bf4dfe1ca78
# | 32 libMLIRSupport.so.21.0git        0x00007bf4d706b4b5
# | 33 libMLIRSupport.so.21.0git        0x00007bf4d706afee mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) + 1182
# | 34 libMLIROptLib.so.21.0git         0x00007bf4dfe143f1 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) + 225
...

RoboTux added a commit that referenced this pull request Mar 7, 2025
@RoboTux RoboTux deleted the depthwise_conv2d_linalg_nullzp_lowering branch March 7, 2025 15:18
RoboTux added a commit to RoboTux/llvm-project that referenced this pull request Mar 7, 2025
Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 7, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building mlir at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'MLIR :: Conversion/TosaToLinalg/tosa-to-linalg-named.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/build/buildbot/premerge-monolithic-linux/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-linalg-named))" /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -| /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
# executed command: /build/buildbot/premerge-monolithic-linux/build/bin/mlir-opt --verify-each --split-input-file '-pass-pipeline=builtin.module(func.func(tosa-to-linalg-named))' /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# .---command stderr------------
# | <unknown>:0: error: unexpected error: expected integer or index type
# | mlir-opt: /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::IntegerAttr, BaseT = mlir::Attribute, StorageT = mlir::detail::IntegerAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <mlir::TypedAttr::Trait>, Args = <mlir::Type &, const llvm::APInt &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /build/buildbot/premerge-monolithic-linux/build/bin/mlir-opt --verify-each --split-input-file -pass-pipeline=builtin.module(func.func(tosa-to-linalg-named)) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir -verify-diagnostics -o -
# |  #0 0x00005a50c46ce058 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:13
# |  #1 0x00005a50c46cbb8e llvm::sys::RunSignalHandlers() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Signals.cpp:106:18
# |  #2 0x00005a50c46ce831 SignalHandler(int, siginfo_t*, void*) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
# |  #3 0x000078cda9680520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
# |  #4 0x000078cda96d49fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
# |  #5 0x000078cda9680476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
# |  #6 0x000078cda96667f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
# |  #7 0x000078cda966671b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
# |  #8 0x000078cda9677e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
# |  #9 0x00005a50c7872a00 mlir::IntegerAttr::getChecked(llvm::function_ref<mlir::InFlightDiagnostic ()>, mlir::Type, llvm::APInt const&) /build/buildbot/premerge-monolithic-linux/build/tools/mlir/include/mlir/IR/BuiltinAttributes.cpp.inc:374:0
# | #10 0x00005a50c7872882 mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) /build/buildbot/premerge-monolithic-linux/build/tools/mlir/include/mlir/IR/BuiltinAttributes.cpp.inc:0:10
# | #11 0x00005a50c786e4b7 mlir::Builder::getIntegerAttr(mlir::Type, long) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/APInt.h:0:7
# | #12 0x00005a50c766ca49 (anonymous namespace)::DepthwiseConvConverter::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpAdaptor, mlir::ConversionPatternRewriter&) const /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp:0:35
# | #13 0x00005a50c766d541 mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::tosa::DepthwiseConv2DOp, mlir::tosa::DepthwiseConv2DOpGenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) const /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/Transforms/DialectConversion.h:716:12
# | #14 0x00005a50c766c1ba mlir::OpConversionPattern<mlir::tosa::DepthwiseConv2DOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/Transforms/DialectConversion.h:702:3
# | #15 0x00005a50c77df6a6 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1871:10
# | #16 0x00005a50ca860922 operator() /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:212:13
# | #17 0x00005a50ca860922 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #18 0x00005a50ca85d63e mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:233:9
# | #19 0x00005a50c77e0712 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
# | #20 0x00005a50c77df7b7 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
# | #21 0x00005a50c77e095f failed /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/LogicalResult.h:43:43
# | #22 0x00005a50c77e095f failed /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/LogicalResult.h:71:58
# | #23 0x00005a50c77e095f mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2677:9
# | #24 0x00005a50c77e6c8e applyFullConversion /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3381:22
# | #25 0x00005a50c77e6c8e mlir::applyFullConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3387:10
# | #26 0x00005a50c7663c65 (anonymous namespace)::TosaToLinalgNamed::runOnOperation() /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp:74:16
# | #27 0x00005a50c777d203 operator() /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Pass/Pass.cpp:0:17
# | #28 0x00005a50c777d203 callback_fn<(lambda at /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Pass/Pass.cpp:521:7)> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #29 0x00005a50c777d203 operator() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
# | #30 0x00005a50c777d203 executeAction<mlir::PassExecutionAction, mlir::Pass &> /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/IR/MLIRContext.h:280:7
# | #31 0x00005a50c777d203 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Pass/Pass.cpp:520:21
# | #32 0x00005a50c777da82 failed /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/LogicalResult.h:43:43
# | #33 0x00005a50c777da82 failed /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/LogicalResult.h:71:58
# | #34 0x00005a50c777da82 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Pass/Pass.cpp:592:9
# | #35 0x00005a50c7783f6e failed /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/LogicalResult.h:43:43
...

jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
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.

5 participants