Integrate LLVM@7a10fc8d542 (#23264)
Reverts carried forward:
* Local revert of https://github.com/llvm/llvm-project/pull/169614 due
to https://github.com/iree-org/iree/issues/22649
Other changes:
* cast shard.all_gather result type to `ShapedType` due to its result
changing types to be `AnyTypeOf<[AnyMemRef, AnyRankedTensor]>` in
https://github.com/llvm/llvm-project/pull/177202
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Conversion/ShardToFlow/Patterns.cpp b/compiler/src/iree/compiler/Dialect/Flow/Conversion/ShardToFlow/Patterns.cpp
index 19b753e..a7ccdd7 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Conversion/ShardToFlow/Patterns.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Conversion/ShardToFlow/Patterns.cpp
@@ -241,7 +241,7 @@
LogicalResult matchAndRewrite(shard::AllGatherOp op,
PatternRewriter &rewriter) const override {
if (!cast<RankedTensorType>(op.getOperand().getType()).hasStaticShape() ||
- !op.getResult().getType().hasStaticShape()) {
+ !cast<ShapedType>(op.getResult().getType()).hasStaticShape()) {
// TODO: add dynamic support.
return rewriter.notifyMatchFailure(op->getLoc(),
"Dynamic tensor case is unsupported.");
@@ -260,9 +260,9 @@
RankedTensorType flowAllGatherResultType = transpose(
cast<RankedTensorType>(op.getResult().getType()), 0, gatherAxis);
- Value target =
- tensor::EmptyOp::create(builder, flowAllGatherResultType.getShape(),
- op.getResult().getType().getElementType());
+ Value target = tensor::EmptyOp::create(
+ builder, flowAllGatherResultType.getShape(),
+ cast<ShapedType>(op.getResult().getType()).getElementType());
auto flowAllGather = IREE::Flow::CollectiveAllGatherOp::create(
builder, getCollectiveElementTypeAttr(flowAllGatherResultType), target,
flowAllGatherOperand, channel);
diff --git a/third_party/llvm-project b/third_party/llvm-project
index a0d75a9..1839675 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit a0d75a96218ff238133e3a5d1e12b8d4c9509a47
+Subproject commit 1839675d168e357c3db1559446031d55833f0181