From 278c41e9388c6b20a92c8a7dc735578424b395a1 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Tue, 19 Sep 2023 10:50:53 -0700 Subject: [PATCH] Bump llvm-project to f66cd9e9556a53142a26a5c21a72e21f1579217c. (#2466) Picks up DenseResourceElementsAttr python support and fixes minf/maxf C++ rename. --- .gitmodules | 2 +- .../lib/Dialect/TMTensor/IR/TMTensorOps.cpp | 2 +- externals/llvm-project | 2 +- lib/Conversion/TorchToLinalg/Reduction.cpp | 8 ++++---- lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8b46098d9..3c50187b6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = https://github.com/llvm/llvm-project.git [submodule "externals/stablehlo"] path = externals/stablehlo - url = https://github.com/openxla/stablehlo.git + url = https://github.com/shark-infra/stablehlo.git diff --git a/externals/llvm-external-projects/torch-mlir-dialects/lib/Dialect/TMTensor/IR/TMTensorOps.cpp b/externals/llvm-external-projects/torch-mlir-dialects/lib/Dialect/TMTensor/IR/TMTensorOps.cpp index ba7ed76c8..dcb2f4215 100644 --- a/externals/llvm-external-projects/torch-mlir-dialects/lib/Dialect/TMTensor/IR/TMTensorOps.cpp +++ b/externals/llvm-external-projects/torch-mlir-dialects/lib/Dialect/TMTensor/IR/TMTensorOps.cpp @@ -233,7 +233,7 @@ LogicalResult AttentionOp::generateScalarImplementation(OpBuilder &b, loc, init, [&](OpBuilder &b, Location loc, Value elem, Value acc) { Value x = b.create(loc, weight, localIVs); - Value max = b.create(loc, x, acc); + Value max = b.create(loc, x, acc); b.create(loc, max); }); }) diff --git a/externals/llvm-project b/externals/llvm-project index 4acc3ffbb..f66cd9e95 160000 --- a/externals/llvm-project +++ b/externals/llvm-project @@ -1 +1 @@ -Subproject commit 4acc3ffbb0af5631bc7916aeff3570f448899647 +Subproject commit f66cd9e9556a53142a26a5c21a72e21f1579217c diff --git a/lib/Conversion/TorchToLinalg/Reduction.cpp b/lib/Conversion/TorchToLinalg/Reduction.cpp index 4078fbaa3..641f1ef8c 100644 --- a/lib/Conversion/TorchToLinalg/Reduction.cpp +++ b/lib/Conversion/TorchToLinalg/Reduction.cpp @@ -176,8 +176,8 @@ public: Value resultMax, predicate; if (inElementType.isa()) { - resultMax = - rewriter.create(nestedLoc, newValue, oldValue); + resultMax = rewriter.create(nestedLoc, newValue, + oldValue); predicate = rewriter.create( nestedLoc, arith::CmpFPredicate::OGT, newValue, oldValue); } else { @@ -280,7 +280,7 @@ static Value createLinalgPayloadForReduceOp(OpBuilder &b, Location loc, convertScalarToDtype(b, loc, payloadArgs[0], resultElementType); Value result = payloadArgs[1]; if (resultElementType.isa()) - return b.create(loc, self, result); + return b.create(loc, self, result); else if (resultElementType.isa()) { IntegerType intType = max.getSelf() .getType() @@ -297,7 +297,7 @@ static Value createLinalgPayloadForReduceOp(OpBuilder &b, Location loc, convertScalarToDtype(b, loc, payloadArgs[0], resultElementType); Value result = payloadArgs[1]; if (resultElementType.isa()) - return b.create(loc, self, result); + return b.create(loc, self, result); else if (resultElementType.isa()) { IntegerType intType = min.getSelf() .getType() diff --git a/lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp b/lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp index ff2728764..d11a5524a 100644 --- a/lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp +++ b/lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp @@ -1332,7 +1332,7 @@ public: if (update.getType().isa()) { result = b.create(loc, update, current); } else if (update.getType().isa()) { - result = b.create(loc, update, current); + result = b.create(loc, update, current); } else { llvm_unreachable("Only integer/float types supported!"); } @@ -1340,7 +1340,7 @@ public: if (update.getType().isa()) { result = b.create(loc, update, current); } else if (update.getType().isa()) { - result = b.create(loc, update, current); + result = b.create(loc, update, current); } else { llvm_unreachable("Only integer/float types supported!"); }