Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on tpu_cross_replica_ops.cc #52863

Merged
merged 1 commit into from Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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