Skip to content

Commit

Permalink
Merge pull request #54159 from tensorflow/cherrypick-b1756cf206fc4db8…
Browse files Browse the repository at this point in the history
…6f05c420a2838bd2099546df-on-r2.8

Bump the maximum threshold before erroring
  • Loading branch information
mihaimaruseac committed Jan 27, 2022
2 parents e542736 + b7ecb36 commit 0a20763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/core/framework/shape_inference.cc
Expand Up @@ -796,7 +796,7 @@ Status InferenceContext::InternalMakeShapeFromTensor(
// `tf.range`/`tf.ones`, etc. where the shape is not really materialized,
// only used during the inference. Hence, just prevent doing a `reserve`
// with a very large argument.
const int64_t max_dimensions = 1 << 20;
const int64_t max_dimensions = 1 << 25;
if (num_dims >= max_dimensions) {
return errors::Internal(
"Cannot create a tensor with ", num_dims,
Expand Down

0 comments on commit 0a20763

Please sign in to comment.