Skip to content

Commit

Permalink
Merge pull request #52863 from tensorflow/fix-build-3-on-r2.5
Browse files Browse the repository at this point in the history
Fix build on `tpu_cross_replica_ops.cc`
  • Loading branch information
mihaimaruseac committed Oct 29, 2021
2 parents a7ef5db + 9bd7e1e commit 2620d2c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tensorflow/core/ops/tpu_cross_replica_ops.cc
Expand Up @@ -33,10 +33,14 @@ REGISTER_OP("AllToAll")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle input = c->input(0);
ShapeHandle group_assignment = c->input(1);
if (!c->RankKnown(input)) {
c->set_output(0, c->UnknownShape());
return Status::OK();

int64 rank;
if (c->RankKnown(input)) {
rank = c->Rank(input);
} else {
return errors::InvalidArgument("input's rank is unknown.");
}

int concat_dimension;
int split_dimension;
int split_count;
Expand Down

0 comments on commit 2620d2c

Please sign in to comment.