Skip to content

Commit

Permalink
Bump LLVM and Torch-MLIR (#10)
Browse files Browse the repository at this point in the history
Bumps LLVM to
llvm/llvm-project@28b27c1
and Torch-MLIR to
llvm/torch-mlir@52abae1.
  • Loading branch information
sjain-stanford authored Oct 18, 2023
1 parent 44bc907 commit cb22a7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions deps.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def third_party_deps():
LLVM_COMMIT = "4acc3ffbb0af5631bc7916aeff3570f448899647"
LLVM_SHA256 = "7c5a640383e220dcf16e41a717b5e7d589c29598d31ae304ebc81b73b3be5fd2"
LLVM_COMMIT = "28b27c1b10ae8d1f5b4fb9df691e8cf0da9be3f6"
LLVM_SHA256 = "1f7a7ca5983801d671901644659c32d028e5e7316418fabcb6159454249aefa3"
http_archive(
name = "llvm-raw",
build_file_content = "# empty",
Expand All @@ -11,8 +11,8 @@ def third_party_deps():
urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)],
)

TORCH_MLIR_COMMIT = "3d974ed9883eac4c3651ac7799a49da5ad9c597b"
TORCH_MLIR_SHA256 = "71aec7c30d72604325ffe275f36bef8df2476dd11d7bf502aaf14f72011ea7f9"
TORCH_MLIR_COMMIT = "52abae1526e51ae8c415ca98ce4a56b00782b68b"
TORCH_MLIR_SHA256 = "f9973f3519b4ba98475917eb700f447b65fee88e9dd60c61f174ce38335ccb3b"
http_archive(
name = "torch-mlir-raw",
sha256 = TORCH_MLIR_SHA256,
Expand Down
4 changes: 2 additions & 2 deletions lib/Conversion/TcpToLinalg/Elementwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ createLinalgPayloadForElementwiseOp(Operation *op,
auto minFloat = clampOp.getMinFloat();
auto maxFloat = clampOp.getMaxFloat();
if (minFloat)
result = b.create<arith::MaxFOp>(
result = b.create<arith::MaximumFOp>(
loc, result,
b.create<arith::ConstantFloatOp>(loc, *minFloat, b.getF32Type()));
if (maxFloat)
result = b.create<arith::MinFOp>(
result = b.create<arith::MinimumFOp>(
loc, result,
b.create<arith::ConstantFloatOp>(loc, *maxFloat, b.getF32Type()));
} else if (elemType.isa<mlir::IntegerType>()) {
Expand Down
4 changes: 2 additions & 2 deletions test/Conversion/TcpToLinalg/unary.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ func.func @tanh(%arg0 : tensor<?x?xf32>) -> tensor<?x?xf32> {
// CHECK-SAME: outs(%[[EMPTY_TENSOR]] : tensor<?x?xf32>) {
// CHECK: ^bb0(%[[BBARG0:.*]]: f32, %{{.*}}: f32):
// CHECK: %[[CST0:.*]] = arith.constant 1.000000e-01 : f32
// CHECK: %[[MAX:.*]] = arith.maxf %[[BBARG0]], %[[CST0]] : f32
// CHECK: %[[MAX:.*]] = arith.maximumf %[[BBARG0]], %[[CST0]] : f32
// CHECK: %[[CST1:.*]] = arith.constant 1.024000e+03 : f32
// CHECK: %[[MIN:.*]] = arith.minf %[[MAX]], %[[CST1]] : f32
// CHECK: %[[MIN:.*]] = arith.minimumf %[[MAX]], %[[CST1]] : f32
// CHECK: linalg.yield %[[MIN]] : f32
// CHECK: } -> tensor<?x?xf32>
// CHECK: return %[[GENERIC]] : tensor<?x?xf32>
Expand Down

0 comments on commit cb22a7c

Please sign in to comment.