From d4a7901284e237bde08647d3fe7a9ed4d7deeeb1 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 17 Jun 2021 17:28:04 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@366df11a3539 Updates LLVM usage to match [366df11a3539](https://github.com/llvm/llvm-project/commit/366df11a3539) PiperOrigin-RevId: 380081103 --- WORKSPACE | 4 ++-- build_tools/llvm_version.txt | 2 +- .../Dialect/mhlo/IR/infer_fusibility_op_interface.td | 6 +++--- lib/Dialect/mhlo/transforms/legalize_to_linalg.cc | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 831adc4..d5ea0b8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,9 +15,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -LLVM_COMMIT = "854ef875b929da544d285436b00df74ee77323b1" +LLVM_COMMIT = "366df11a35392c946678f1af94038945c23f06c8" -LLVM_SHA256 = "558d81d01e82ff150306ec99ab16cf775860ccd3bab96cac6cb4b6db08556325" +LLVM_SHA256 = "cd720387229e8ee74cc9d7d685a298c709fb2bdb2063301e509f40dacbdbaaea" LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index 8144d3a..65032aa 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -854ef875b929da544d285436b00df74ee77323b1 +366df11a35392c946678f1af94038945c23f06c8 diff --git a/include/mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td b/include/mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td index 280c0a1..8c68fbb 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td @@ -66,7 +66,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> { Operation *op = this->getOperation(); assert(lhs >= 0 && rhs >= 0); if (lhs == rhs) return true; - return inferShapeEquality(op->getOperand(lhs), op->getOperand(rhs)); + return InferFusibilityOpInterface::inferShapeEquality(op->getOperand(lhs), op->getOperand(rhs)); }] >, InterfaceMethod< @@ -81,7 +81,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> { Operation *op = this->getOperation(); assert(lhs >= 0 && rhs >= 0); if (lhs == rhs) return true; - return inferShapeEquality(op->getResult(lhs), op->getResult(rhs)); + return InferFusibilityOpInterface::inferShapeEquality(op->getResult(lhs), op->getResult(rhs)); }] >, InterfaceMethod< @@ -95,7 +95,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> { /// Return whether the input and the output have the same shape. Operation *op = this->getOperation(); assert(input >= 0 && output >= 0); - return inferShapeEquality(op->getOperand(input), op->getResult(output)); + return InferFusibilityOpInterface::inferShapeEquality(op->getOperand(input), op->getResult(output)); }] >, InterfaceMethod< diff --git a/lib/Dialect/mhlo/transforms/legalize_to_linalg.cc b/lib/Dialect/mhlo/transforms/legalize_to_linalg.cc index 0c24d5e..bf2eca1 100644 --- a/lib/Dialect/mhlo/transforms/legalize_to_linalg.cc +++ b/lib/Dialect/mhlo/transforms/legalize_to_linalg.cc @@ -1583,8 +1583,7 @@ struct ReduceRegionXLAOpConversion : public OpConversionPattern { ConversionPatternRewriter& rewriter) const final { // Only convert the body of reduction ops to std ops. auto parent_op = op.getOperation()->getParentRegion()->getParentOp(); - if (!isa( - parent_op)) { + if (!isa(parent_op)) { return failure(); } if (!op.getResult().getType().template isa()) return failure(); @@ -2105,7 +2104,7 @@ struct ReduceWindowOpOnTensorsConversion } }; -/// Converts xla-hlo.torch_index_select op to a linalg.indexed_generic op. +/// Converts xla-hlo.torch_index_select op to a linalg.generic op. struct TorchIndexSelectOpOnTensorsConversion : public OpConversionPattern { using OpConversionPattern::OpConversionPattern;