diff --git a/docs/BuildOnLinuxOSX.md b/docs/BuildOnLinuxOSX.md
index d3917e6c9c..7cf2d5467c 100644
--- a/docs/BuildOnLinuxOSX.md
+++ b/docs/BuildOnLinuxOSX.md
@@ -15,7 +15,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
``` bash
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
-cd llvm-project && git checkout 00128a20eec27246719d73ba427bf821883b00b4 && cd ..
+cd llvm-project && git checkout 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..
```
[same-as-file]: <> (utils/build-mlir.sh)
diff --git a/docs/BuildOnWindows.md b/docs/BuildOnWindows.md
index 2d1628aa1a..8b53b1d4f9 100644
--- a/docs/BuildOnWindows.md
+++ b/docs/BuildOnWindows.md
@@ -52,7 +52,7 @@ Install MLIR (as a part of LLVM-Project):
```shell
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
-cd llvm-project && git checkout 00128a20eec27246719d73ba427bf821883b00b4 && cd ..
+cd llvm-project && git checkout 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..
```
[same-as-file]: <> (utils/build-mlir.cmd)
diff --git a/docs/Dialects/krnl.md b/docs/Dialects/krnl.md
index 4a9a3da08d..797aef9ae6 100644
--- a/docs/Dialects/krnl.md
+++ b/docs/Dialects/krnl.md
@@ -329,6 +329,7 @@ _Indicate ONNX entry point_
The "krnl.entry_point" function indicates the main entry
point of ONNX model.
+
### `krnl.erf` (KrnlErfOp)
_Krnl erf scalar operation_
@@ -453,7 +454,7 @@ in the `value` dense element attribute.
Traits: `AlwaysSpeculatableImplTrait`, `MemRefsNormalizable`
-Interfaces: `ConditionallySpeculatable`, `KrnlGlobalOpInterface`, `NoMemoryEffect (MemoryEffectOpInterface)`
+Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
Effects: `MemoryEffects::Effect{}`
diff --git a/docs/Dialects/zhigh.md b/docs/Dialects/zhigh.md
index 0ce869bc1c..4780cbe551 100644
--- a/docs/Dialects/zhigh.md
+++ b/docs/Dialects/zhigh.md
@@ -793,8 +793,6 @@ Effects: `MemoryEffects::Effect{}`
_ZHigh Stickified Constant operation_
This operator produces a constant tensor to store stickified data.
-`value` attribute has original constant or stickified constant.
-`stickified` attribute indicates the `value` is already stickified or not.
Stickified data is opaque and must be 4K-aligned. One who produces
the stickified data must make sure its size in bytes consistent with
the output tensor's size.
@@ -809,7 +807,6 @@ Effects: `MemoryEffects::Effect{}`
| Attribute | MLIR Type | Description |
-stickified | ::mlir::BoolAttr | bool attribute |
value | ::mlir::Attribute | any attribute |
alignment | ::mlir::IntegerAttr | 64-bit signless integer attribute |
diff --git a/docs/Dialects/zlow.md b/docs/Dialects/zlow.md
index 4b1c3c3b81..ba6907fced 100644
--- a/docs/Dialects/zlow.md
+++ b/docs/Dialects/zlow.md
@@ -752,34 +752,6 @@ Interfaces: `MemoryEffectOpInterface`
| `X` | memref of 16-bit float or 32-bit float values
| `Out` | memref of dlfloat16 type values
-### `zlow.stickifiedConstant` (::onnx_mlir::zlow::ZLowStickifiedConstantOp)
-
-_ZLow Stickified Constant operation._
-
-
-Traits: `MemRefsNormalizable`
-
-Interfaces: `KrnlGlobalOpInterface`
-
-#### Attributes:
-
-
-| Attribute | MLIR Type | Description |
-shape | ::mlir::Attribute | any attribute |
-name | ::mlir::StringAttr | string attribute |
-stickified | ::mlir::BoolAttr | bool attribute |
-value | ::mlir::Attribute | any attribute |
-layout | ::mlir::StringAttr | string attribute |
-offset | ::mlir::IntegerAttr | 64-bit signless integer attribute |
-alignment | ::mlir::IntegerAttr | 64-bit signless integer attribute |
-
-
-#### Results:
-
-| Result | Description |
-| :----: | ----------- |
-| `output` | memref of dlfloat16 type values
-
### `zlow.sub` (::onnx_mlir::zlow::ZLowSubOp)
_ZLow sub operation_
diff --git a/src/Accelerators/NNPA/Transform/ZLow/ZLowStickExpansion.cpp b/src/Accelerators/NNPA/Transform/ZLow/ZLowStickExpansion.cpp
index 45fa23162e..49ce989321 100644
--- a/src/Accelerators/NNPA/Transform/ZLow/ZLowStickExpansion.cpp
+++ b/src/Accelerators/NNPA/Transform/ZLow/ZLowStickExpansion.cpp
@@ -153,9 +153,7 @@ class UnstickExpansionPattern : public OpRewritePattern {
// 64.
IndexExpr T = LitIE(2);
DimsExpr reallocTileDims = {T, lit64};
- Value inputAsTx64 =
- create.mem.reinterpretCast(input, litZero.getValue(), reallocTileDims);
-
+ Value inputAsTx64 = create.mem.reinterpretCast(input, reallocTileDims);
// Outer loop (E4, E3, E2, E1 iterates over tiles of 64 elements)
create.krnl.iterateIE(loopDefs, loopDefs, lbs, ubs,
[&](const KrnlBuilder &b, ValueRange loopInd) {
@@ -456,8 +454,7 @@ class StickExpansionPattern : public OpRewritePattern {
// 64 elements.
IndexExpr T = LitIE(2);
DimsExpr reallocTileDims = {T, lit64};
- Value allocAsTx64 =
- create.mem.reinterpretCast(alloc, litZero.getValue(), reallocTileDims);
+ Value allocAsTx64 = create.mem.reinterpretCast(alloc, reallocTileDims);
// Outer loop (E1 iterates over tiles of 64 elements).
create.krnl.iterateIE(loopDefs, loopDefs, lbs, ubs,
diff --git a/src/Conversion/KrnlToAffine/ConvertKrnlToAffine.cpp b/src/Conversion/KrnlToAffine/ConvertKrnlToAffine.cpp
index ee31243724..73609c2f14 100644
--- a/src/Conversion/KrnlToAffine/ConvertKrnlToAffine.cpp
+++ b/src/Conversion/KrnlToAffine/ConvertKrnlToAffine.cpp
@@ -814,20 +814,18 @@ AffineTypeConverter::AffineTypeConverter() {
addConversion([](Type type) { return type; });
addSourceMaterialization([&](OpBuilder &builder, Type resultType,
- ValueRange inputs,
- Location loc) -> std::optional {
+ ValueRange inputs, Location loc) -> Value {
if (inputs.size() != 1)
- return std::nullopt;
+ return Value();
return builder.create(loc, resultType, inputs)
.getResult(0);
});
addTargetMaterialization([&](OpBuilder &builder, Type resultType,
- ValueRange inputs,
- Location loc) -> std::optional {
+ ValueRange inputs, Location loc) -> Value {
if (inputs.size() != 1)
- return std::nullopt;
+ return Value();
return builder.create(loc, resultType, inputs)
.getResult(0);
diff --git a/src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.cpp b/src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.cpp
index 4be0f7ecfc..ad35f5a3fb 100644
--- a/src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.cpp
+++ b/src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.cpp
@@ -547,20 +547,18 @@ KrnlTypeConverter::KrnlTypeConverter() {
});
addSourceMaterialization([&](OpBuilder &builder, Type resultType,
- ValueRange inputs,
- Location loc) -> std::optional {
+ ValueRange inputs, Location loc) -> Value {
if (inputs.size() != 1)
- return std::nullopt;
+ return Value();
return builder.create(loc, resultType, inputs)
.getResult(0);
});
addTargetMaterialization([&](OpBuilder &builder, Type resultType,
- ValueRange inputs,
- Location loc) -> std::optional {
+ ValueRange inputs, Location loc) -> Value {
if (inputs.size() != 1)
- return std::nullopt;
+ return Value();
return builder.create(loc, resultType, inputs)
.getResult(0);
diff --git a/src/Dialect/Mlir/DialectBuilder.cpp b/src/Dialect/Mlir/DialectBuilder.cpp
index 44836d961d..a0eeb54147 100644
--- a/src/Dialect/Mlir/DialectBuilder.cpp
+++ b/src/Dialect/Mlir/DialectBuilder.cpp
@@ -617,7 +617,7 @@ Value MathBuilder::constant(Type type, double val) const {
b().create(loc(), b().getF64FloatAttr(val));
})
.Case([&](IntegerType elementType) {
- assert(val == (int64_t)val && "value is ambiguous");
+ assert(val == static_cast(val) && "value is ambiguous");
unsigned width = elementType.getWidth();
if (width == 1)
@@ -628,11 +628,13 @@ Value MathBuilder::constant(Type type, double val) const {
if (elementType.isUnsignedInteger()) {
Type signlessTy = b().getIntegerType(width);
constant = b().create(loc(),
- b().getIntegerAttr(signlessTy, APInt(width, (int64_t)val)));
+ b().getIntegerAttr(signlessTy,
+ APInt(width, static_cast(val), false, true)));
constant = castToUnsigned(constant, width);
} else {
constant = b().create(loc(),
- b().getIntegerAttr(elementType, APInt(width, (int64_t)val)));
+ b().getIntegerAttr(elementType,
+ APInt(width, static_cast(val), false, true)));
}
}
})
@@ -695,7 +697,7 @@ TypedAttr MathBuilder::negativeInfAttr(Type type) const {
default:
llvm_unreachable("unsupported element type");
}
- attr = b().getIntegerAttr(type, APInt(width, value));
+ attr = b().getIntegerAttr(type, APInt(width, value, false, true));
})
.Default([](Type) { llvm_unreachable("unsupported element type"); });
assert(attr != nullptr && "Expecting valid attribute");
@@ -740,7 +742,7 @@ TypedAttr MathBuilder::positiveInfAttr(Type type) const {
default:
llvm_unreachable("unsupported element type");
}
- attr = b().getIntegerAttr(type, APInt(width, value));
+ attr = b().getIntegerAttr(type, APInt(width, value, false, true));
})
.Default([](Type) { llvm_unreachable("unsupported element type"); });
assert(attr != nullptr && "Expecting valid attribute");
@@ -2263,7 +2265,8 @@ Value LLVMBuilder::constant(Type type, int64_t val) const {
assert(type.isSignless() &&
"LLVM::ConstantOp requires a signless type.");
constant = b().create(loc(), type,
- b().getIntegerAttr(type, APInt(width, (int64_t)val)));
+ b().getIntegerAttr(
+ type, APInt(width, static_cast(val), false, true)));
}
})
.Case([&](Type) {
diff --git a/test/mlir/accelerators/nnpa/driver/matmul-div-in-attention-layer.mlir b/test/mlir/accelerators/nnpa/driver/matmul-div-in-attention-layer.mlir
index cfe6e2b611..58d8a904eb 100644
--- a/test/mlir/accelerators/nnpa/driver/matmul-div-in-attention-layer.mlir
+++ b/test/mlir/accelerators/nnpa/driver/matmul-div-in-attention-layer.mlir
@@ -8,13 +8,13 @@ func.func @matmul_div(%arg0: tensor) -> tensor {
%r = "onnx.Div"(%m, %scalar) : (tensor, tensor) -> tensor
"onnx.Return"(%r) : (tensor) -> ()
-// CHECK-LABEL: func.func @matmul_div
+// CHECK-LABEL: func.func @matmul_div
// CHECK: memref.alloc
// CHECK: memref.alloc
// CHECK: [[ALLOC:%.+]] = memref.alloc({{.*}}) {{.*}}: memref
// CHECK-DAG: [[MATMUL_RES:%.+]] = memref.cast [[ALLOC]] : memref to memref
// CHECK: "zlow.matmul"({{.*}}, {{.*}}, {{.*}}, {{.*}}, [[MATMUL_RES]]) {is_bcast = 0 : si64, is_stacked = -1 : si64} : (memref, memref, memref, memref<4xi64>, memref) -> ()
-// CHECK-NOT: "zlow.stick"
-// CHECK-NOT: "zlow.unstick"
+// CHECK-NOT: "zlow.stick"
+// CHECK-NOT: "zlow.unstick"
// CHECK: "zlow.div"([[MATMUL_RES]], {{.*}}, {{.*}}, {{.*}}) {layout = "3DS"} : (memref, memref, memref<3xi64>, memref) -> ()
}
diff --git a/test/mlir/accelerators/nnpa/driver/saturation.mlir b/test/mlir/accelerators/nnpa/driver/saturation.mlir
index 1023fdfe13..80d4383b2b 100644
--- a/test/mlir/accelerators/nnpa/driver/saturation.mlir
+++ b/test/mlir/accelerators/nnpa/driver/saturation.mlir
@@ -12,31 +12,31 @@
func.func @saturation(%arg0 : tensor<10x10xf32>) -> tensor<*xf32> {
%0 = "onnx.Relu"(%arg0) : (tensor<10x10xf32>) -> tensor<*xf32>
"func.return"(%0) : (tensor<*xf32>) -> ()
-// ZHIGH_OFF-LABEL: func @saturation
+// ZHIGH_OFF-LABEL: func @saturation
// ZHIGH_OFF: "zhigh.Stick"({{.*}}) {layout = "2D"} : {{.*}}
-// ZHIGH_ON-LABEL: func @saturation
+// ZHIGH_ON-LABEL: func @saturation
// ZHIGH_ON: "zhigh.Stick"({{.*}}) {layout = "2D", saturation = -1 : si64} : {{.*}}
-// ZLOW_OFF-LABEL: func @saturation
+// ZLOW_OFF-LABEL: func @saturation
// ZLOW_OFF: "zlow.stick"({{.*}}, {{.*}}) {layout = "2D"} : {{.*}}
-// ZLOW_ON-LABEL: func @saturation
+// ZLOW_ON-LABEL: func @saturation
// ZLOW_ON: "zlow.stick"({{.*}}, {{.*}}) {layout = "2D", saturation = -1 : si64} : {{.*}}
-// DECOMPOSE_OFF-LABEL: func @saturation
+// DECOMPOSE_OFF-LABEL: func @saturation
// DECOMPOSE_OFF: "zhigh.F32ToDLF16"(%arg0) : {{.*}}
-// DECOMPOSE_ON-LABEL: func @saturation
+// DECOMPOSE_ON-LABEL: func @saturation
// DECOMPOSE_ON: "zhigh.F32ToDLF16"(%arg0) {saturation = -1 : si64} : {{.*}}
-// COMPILER_STICK_OFF-LABEL: func @saturation
+// COMPILER_STICK_OFF-LABEL: func @saturation
// COMPILER_STICK_OFF-NOT: arith.minnumf
// COMPILER_STICK_OFF-NOT: arith.maxnumf
// COMPILER_STICK_OFF: zlow.relu
-// COMPILER_STICK_ON-LABEL: func @saturation
+// COMPILER_STICK_ON-LABEL: func @saturation
// COMPILER_STICK_ON: arith.minnumf
// COMPILER_STICK_ON: arith.maxnumf
// COMPILER_STICK_ON: zlow.relu
diff --git a/test/mlir/accelerators/nnpa/module_op_be/compiler-config.mlir b/test/mlir/accelerators/nnpa/module_op_be/compiler-config.mlir
index 4dc5006ae0..bfbd33690a 100644
--- a/test/mlir/accelerators/nnpa/module_op_be/compiler-config.mlir
+++ b/test/mlir/accelerators/nnpa/module_op_be/compiler-config.mlir
@@ -12,5 +12,5 @@ module {
"onnx.EntryPoint"() {func = @main_graph} : () -> ()
}
// CHECK: {{.*}} opt {{.*}} -o {{.*}}.bc
-// CHECK: {{.*}} llc {{.*}} {{.*}} {{.*}}.bc
+// CHECK: {{.*}} llc {{.*}} {{.*}} {{.*}}.bc
// CHECK: {{.*}} {{clang|c|g}}++{{.*}} {{.*}}.o -o {{.*}}.so -shared -fPIC -L{{.*}}/lib -lRuntimeNNPA -lzdnn -lcruntime
diff --git a/test/mlir/accelerators/nnpa/transform/zlow-stick-unstick-expansion.mlir b/test/mlir/accelerators/nnpa/transform/zlow-stick-unstick-expansion.mlir
index 23b6d5cd7d..48dd275710 100644
--- a/test/mlir/accelerators/nnpa/transform/zlow-stick-unstick-expansion.mlir
+++ b/test/mlir/accelerators/nnpa/transform/zlow-stick-unstick-expansion.mlir
@@ -28,10 +28,9 @@ func.func @test_stick_expansion_with_sat(%arg0: memref<16x8x128xf32>) -> memref<
// CHECK-DAG: [[CST_4_:%.+]] = arith.constant 4 : index
// CHECK-DAG: [[VAR_cst_:%.+]] = arith.constant dense<8.57315738E+9> : vector<4xf32>
// CHECK-DAG: [[VAR_cst_0_:%.+]] = arith.constant dense<-8.57315738E+9> : vector<4xf32>
-// CHECK-DAG: [[CST_0_:%.+]] = arith.constant 0 : index
// CHECK-DAG: [[RES_:%.+]] = memref.alloc() {{.*}}: memref<16x8x128xf16, #map>
// CHECK-DAG: [[LOOP_0_:%.+]]:3 = krnl.define_loops 3
-// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[RES_]] to offset: {{.}}[[CST_0_]]{{.}}, sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
+// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[RES_]] to offset: [0], sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 16, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 8, [[LOOP_0_]]#2 -> [[I_2_:%.+]] = 0 to 2){
// CHECK: [[VAR_1_:%.+]]:3 = krnl.get_induction_var_value([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) : (!krnl.loop, !krnl.loop, !krnl.loop) -> (index, index, index)
// CHECK: [[VAR_2_:%.+]] = affine.apply [[MAP_1_]]([[VAR_1_]]#2)
@@ -124,10 +123,9 @@ func.func @test_stick_expansion_without_sat(%arg0: memref<16x8x128xf32>) -> memr
// CHECK-DAG: [[CST_12_:%.+]] = arith.constant 12 : index
// CHECK-DAG: [[CST_8_:%.+]] = arith.constant 8 : index
// CHECK-DAG: [[CST_4_:%.+]] = arith.constant 4 : index
-// CHECK-DAG: [[CST_0_:%.+]] = arith.constant 0 : index
// CHECK-DAG: [[RES_:%.+]] = memref.alloc() {{.*}}: memref<16x8x128xf16, #map>
// CHECK-DAG: [[LOOP_0_:%.+]]:3 = krnl.define_loops 3
-// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[RES_]] to offset: {{.}}[[CST_0_]]{{.}}, sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
+// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[RES_]] to offset: [0], sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 16, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 8, [[LOOP_0_]]#2 -> [[I_2_:%.+]] = 0 to 2){
// CHECK: [[VAR_1_:%.+]]:3 = krnl.get_induction_var_value([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) : (!krnl.loop, !krnl.loop, !krnl.loop) -> (index, index, index)
// CHECK: [[VAR_2_:%.+]] = affine.apply [[MAP_1_]]([[VAR_1_]]#2)
@@ -208,7 +206,7 @@ func.func @test_unstick_expansion(%arg0: memref<16x8x128xf16, #map>) -> memref<1
// CHECK-DAG: [[CST_0_:%.+]] = arith.constant 0 : index
// CHECK-DAG: [[RES_:%.+]] = memref.alloc() {{.*}}: memref<16x8x128xf32>
// CHECK-DAG: [[LOOP_0_:%.+]]:3 = krnl.define_loops 3
-// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[PARAM_0_]] to offset: {{.}}[[CST_0_]]{{.}}, sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
+// CHECK-DAG: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[PARAM_0_]] to offset: [0], sizes: [2, 64], strides: [64, 1] : memref<16x8x128xf16, #map> to memref<2x64xf16>
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 16, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 8, [[LOOP_0_]]#2 -> [[I_2_:%.+]] = 0 to 2){
// CHECK: [[VAR_1_:%.+]]:3 = krnl.get_induction_var_value([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) : (!krnl.loop, !krnl.loop, !krnl.loop) -> (index, index, index)
// CHECK: [[VAR_2_:%.+]] = affine.apply [[MAP_1_]]([[VAR_1_]]#2)
@@ -292,7 +290,7 @@ func.func @test_unstick_expansion_127(%arg0: memref<16x8x127xf16, #map>) -> memr
// CHECK-DAG: [[CST_0_:%.+]] = arith.constant 0 : index
// CHECK-DAG: [[RES_:%.+]] = memref.alloc() {{.*}}: memref<16x8x127xf32>
// CHECK-DAG: [[LOOP_0_:%.+]]:3 = krnl.define_loops 3
-// CHECK: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[PARAM_0_]] to offset: {{.}}[[CST_0_]]{{.}}, sizes: [2, 64], strides: [64, 1] : memref<16x8x127xf16, #map> to memref<2x64xf16>
+// CHECK-DAG: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[PARAM_0_]] to offset: [0], sizes: [2, 64], strides: [64, 1] : memref<16x8x127xf16, #map> to memref<2x64xf16>
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 16, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 8, [[LOOP_0_]]#2 -> [[I_2_:%.+]] = 0 to 2){
// CHECK: [[VAR_1_:%.+]]:3 = krnl.get_induction_var_value([[LOOP_0_]]#0, [[LOOP_0_]]#1, [[LOOP_0_]]#2) : (!krnl.loop, !krnl.loop, !krnl.loop) -> (index, index, index)
// CHECK: [[VAR_2_:%.+]] = affine.apply [[MAP_1_]]([[VAR_1_]]#2)
@@ -360,5 +358,4 @@ func.func @test_unstick_expansion_127(%arg0: memref<16x8x127xf16, #map>) -> memr
// CHECK: }
// CHECK: return [[RES_]] : memref<16x8x127xf32>
// CHECK: }
-}
-
+}
\ No newline at end of file
diff --git a/test/mlir/parallel/krnl_parallel_clause_to_omp.mlir b/test/mlir/parallel/krnl_parallel_clause_to_omp.mlir
index dd88c9bd38..08a994db70 100644
--- a/test/mlir/parallel/krnl_parallel_clause_to_omp.mlir
+++ b/test/mlir/parallel/krnl_parallel_clause_to_omp.mlir
@@ -32,7 +32,6 @@ func.func @omp_threads_affinity(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -
}
omp.yield
}
- omp.terminator
}
omp.terminator
}
@@ -43,9 +42,7 @@ func.func @omp_threads_affinity(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -
// CHECK: [[CST_8_:%.+]] = arith.constant 8 : i32
// CHECK: omp.parallel num_threads([[CST_8_]] : i32) proc_bind(spread) {
}
-
// -----
-
func.func @omp_threads(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -> (memref<16x8x128xf32> {onnx.name = "y"}) {
%c32 = arith.constant 32 : index
%c0 = arith.constant 0 : index
@@ -76,7 +73,6 @@ func.func @omp_threads(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -> (memref
}
omp.yield
}
- omp.terminator
}
omp.terminator
}
@@ -120,7 +116,6 @@ func.func @omp_affinity(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -> (memre
}
omp.yield
}
- omp.terminator
}
omp.terminator
}
@@ -162,7 +157,6 @@ func.func @omp_normal(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -> (memref<
}
omp.yield
}
- omp.terminator
}
omp.terminator
}
@@ -171,5 +165,4 @@ func.func @omp_normal(%arg0: memref<16x8x128xf32> {onnx.name = "x"}) -> (memref<
// CHECK-LABEL: func.func @omp_normal
// CHECK-SAME: ([[PARAM_0_:%.+]]: memref<16x8x128xf32> {onnx.name = "x"}) -> (memref<16x8x128xf32> {onnx.name = "y"}) {
// CHECK: omp.parallel {
-}
-
+}
\ No newline at end of file
diff --git a/third_party/stablehlo b/third_party/stablehlo
index 8dd667a74e..37487a8ee0 160000
--- a/third_party/stablehlo
+++ b/third_party/stablehlo
@@ -1 +1 @@
-Subproject commit 8dd667a74ea1a7330390a0ba343d7c4c6f2d834d
+Subproject commit 37487a8ee0783f29eff64910702074ba52bf6c5c
diff --git a/utils/clone-mlir.sh b/utils/clone-mlir.sh
index 38b2320ce5..aea9f011a8 100644
--- a/utils/clone-mlir.sh
+++ b/utils/clone-mlir.sh
@@ -1,3 +1,3 @@
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
-cd llvm-project && git checkout 00128a20eec27246719d73ba427bf821883b00b4 && cd ..
+cd llvm-project && git checkout 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..