We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 926700d commit 7e3efc5Copy full SHA for 7e3efc5
torch_xla/csrc/cross_replica_reduces.cpp
@@ -309,8 +309,9 @@ AllGatherResultCoalesced BuildAllGatherCoalesced(
309
xla::AllGather(xla::Tuple(inputs[0].builder(), type_ctx.second.ops),
310
dim, shard_count, cc_groups);
311
}
312
- if (ShapeHelper::ShapeOfXlaOp(all_gather_result).tuple_shapes().size() !=
313
- 0) {
+ if (ShapeHelper::ShapeOfXlaOp(all_gather_result).IsTuple() &&
+ ShapeHelper::ShapeOfXlaOp(all_gather_result).tuple_shapes().size() !=
314
+ 0) {
315
for (size_t i = 0; i < type_ctx.second.indices.size(); ++i) {
316
size_t op_idx = type_ctx.second.indices[i];
317
result[op_idx] = xla::GetTupleElement(all_gather_result, i);
0 commit comments