From cb22a7cb4aba0f5e02e014ca6a18826f8adf00f0 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Wed, 18 Oct 2023 11:00:47 -0700 Subject: [PATCH] Bump LLVM and Torch-MLIR (#10) Bumps LLVM to https://github.com/llvm/llvm-project/commit/28b27c1b10ae8d1f5b4fb9df691e8cf0da9be3f6 and Torch-MLIR to https://github.com/llvm/torch-mlir/commit/52abae1526e51ae8c415ca98ce4a56b00782b68b. --- deps.bzl | 8 ++++---- lib/Conversion/TcpToLinalg/Elementwise.cpp | 4 ++-- test/Conversion/TcpToLinalg/unary.mlir | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deps.bzl b/deps.bzl index 19f96575..66aea289 100644 --- a/deps.bzl +++ b/deps.bzl @@ -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", @@ -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, diff --git a/lib/Conversion/TcpToLinalg/Elementwise.cpp b/lib/Conversion/TcpToLinalg/Elementwise.cpp index fc8f4cf5..02871e4b 100644 --- a/lib/Conversion/TcpToLinalg/Elementwise.cpp +++ b/lib/Conversion/TcpToLinalg/Elementwise.cpp @@ -72,11 +72,11 @@ createLinalgPayloadForElementwiseOp(Operation *op, auto minFloat = clampOp.getMinFloat(); auto maxFloat = clampOp.getMaxFloat(); if (minFloat) - result = b.create( + result = b.create( loc, result, b.create(loc, *minFloat, b.getF32Type())); if (maxFloat) - result = b.create( + result = b.create( loc, result, b.create(loc, *maxFloat, b.getF32Type())); } else if (elemType.isa()) { diff --git a/test/Conversion/TcpToLinalg/unary.mlir b/test/Conversion/TcpToLinalg/unary.mlir index 3911cb15..57fa4fe1 100644 --- a/test/Conversion/TcpToLinalg/unary.mlir +++ b/test/Conversion/TcpToLinalg/unary.mlir @@ -43,9 +43,9 @@ func.func @tanh(%arg0 : tensor) -> tensor { // CHECK-SAME: outs(%[[EMPTY_TENSOR]] : tensor) { // 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 // CHECK: return %[[GENERIC]] : tensor