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

Use correct casts to get right dimensions on s390x #33111

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
7 changes: 6 additions & 1 deletion tensorflow/core/framework/common_shape_fns.cc
Expand Up @@ -1569,7 +1569,12 @@ Status ConcatShapeHelper(InferenceContext* c, int start_value_index,

// Merge all the non-concat dims, and sum the concat dim to make an output
// shape.
const int32 concat_dim = concat_dim_t->scalar<int32>()();
int64 concat_dim;
if (concat_dim_t->dtype() == DT_INT32) {
concat_dim = static_cast<int64>(concat_dim_t->flat<int32>()(0));
} else {
concat_dim = concat_dim_t->flat<int64>()(0);
}

// Minimum required number of dimensions.
const int min_rank = concat_dim < 0 ? -concat_dim : concat_dim + 1;
Expand Down