From f4e0b5f8b2956713ee06f72cdefa6e03f6b64ed5 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Wed, 18 Oct 2023 01:47:49 -0700 Subject: [PATCH 1/3] bump llvm and torch-mlir --- deps.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 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, From c0495039f8e0e5809ab92ac0b4e581b6bc9f8dab Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Wed, 18 Oct 2023 01:51:34 -0700 Subject: [PATCH 2/3] arith::{Max|Min}FOp renamed to arith::{Maximum|Minimum}FOp in https://github.com/llvm/llvm-project/pull/65800 --- lib/Conversion/TcpToLinalg/Elementwise.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()) { From 1f76426569b686d49ee656d0759b3e56a23781fc Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Wed, 18 Oct 2023 02:07:43 -0700 Subject: [PATCH 3/3] arith.{max|min}f lit test fix --- test/Conversion/TcpToLinalg/unary.mlir | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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