Updates LLVM usage to match
[366df11a3539](https://github.com/llvm/llvm-project/commit/366df11a3539)

PiperOrigin-RevId: 380081103
This commit is contained in:
A. Unique TensorFlower 2021-06-17 17:28:04 -07:00 committed by TensorFlow MLIR Team
parent da6593e960
commit d4a7901284
4 changed files with 8 additions and 9 deletions

View File

@ -15,9 +15,9 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 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) LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT)

View File

@ -1,2 +1,2 @@
854ef875b929da544d285436b00df74ee77323b1 366df11a35392c946678f1af94038945c23f06c8

View File

@ -66,7 +66,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> {
Operation *op = this->getOperation(); Operation *op = this->getOperation();
assert(lhs >= 0 && rhs >= 0); assert(lhs >= 0 && rhs >= 0);
if (lhs == rhs) return true; if (lhs == rhs) return true;
return inferShapeEquality(op->getOperand(lhs), op->getOperand(rhs)); return InferFusibilityOpInterface::inferShapeEquality(op->getOperand(lhs), op->getOperand(rhs));
}] }]
>, >,
InterfaceMethod< InterfaceMethod<
@ -81,7 +81,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> {
Operation *op = this->getOperation(); Operation *op = this->getOperation();
assert(lhs >= 0 && rhs >= 0); assert(lhs >= 0 && rhs >= 0);
if (lhs == rhs) return true; if (lhs == rhs) return true;
return inferShapeEquality(op->getResult(lhs), op->getResult(rhs)); return InferFusibilityOpInterface::inferShapeEquality(op->getResult(lhs), op->getResult(rhs));
}] }]
>, >,
InterfaceMethod< InterfaceMethod<
@ -95,7 +95,7 @@ def InferFusibilityOpInterface : OpInterface<"InferFusibilityOpInterface"> {
/// Return whether the input and the output have the same shape. /// Return whether the input and the output have the same shape.
Operation *op = this->getOperation(); Operation *op = this->getOperation();
assert(input >= 0 && output >= 0); assert(input >= 0 && output >= 0);
return inferShapeEquality(op->getOperand(input), op->getResult(output)); return InferFusibilityOpInterface::inferShapeEquality(op->getOperand(input), op->getResult(output));
}] }]
>, >,
InterfaceMethod< InterfaceMethod<

View File

@ -1583,8 +1583,7 @@ struct ReduceRegionXLAOpConversion : public OpConversionPattern<OpTy> {
ConversionPatternRewriter& rewriter) const final { ConversionPatternRewriter& rewriter) const final {
// Only convert the body of reduction ops to std ops. // Only convert the body of reduction ops to std ops.
auto parent_op = op.getOperation()->getParentRegion()->getParentOp(); auto parent_op = op.getOperation()->getParentRegion()->getParentOp();
if (!isa<mhlo::ReduceOp, linalg::GenericOp, linalg::IndexedGenericOp>( if (!isa<mhlo::ReduceOp, linalg::GenericOp>(parent_op)) {
parent_op)) {
return failure(); return failure();
} }
if (!op.getResult().getType().template isa<TensorType>()) return failure(); if (!op.getResult().getType().template isa<TensorType>()) 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 struct TorchIndexSelectOpOnTensorsConversion
: public OpConversionPattern<mhlo::TorchIndexSelectOp> { : public OpConversionPattern<mhlo::TorchIndexSelectOp> {
using OpConversionPattern<mhlo::TorchIndexSelectOp>::OpConversionPattern; using OpConversionPattern<mhlo::TorchIndexSelectOp>::OpConversionPattern;