You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tf.reshape with two -1 dimensions is correctly rejected by eager and jit_compile=True, but autoclustering silently returns a result instead of raising [Recent/StarCoder] #124877
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
2.20.0-dev0 (self-built, 20250806 snapshot)
Custom code
Yes
OS platform and distribution
Ubuntu 24.04.4 LTS (x86_64)
Mobile device
No response
Python version
3.12.3
Bazel version
No response
GCC/compiler version
gcc 13.3.0
CUDA/cuDNN version
N/A, CPU-only environment
GPU model and memory
N/A, CPU-only environment
Current behavior?
tf.reshape only allows one component of shape to be -1. Calling tf.reshape(x, [-1, -1]) on a (4, 12) input correctly raises in both eager execution and explicit jit_compile=True:
InvalidArgumentError: Only one input size may be -1, not both 0 and 1 [Op:Reshape]
(eager), and the equivalent tf2xla conversion failed error during compilation (jit_compile=True).
Under TF_XLA_FLAGS=--tf_xla_auto_jit=2 (autoclustering), no error is raised — the same call returns a (48, 1) tensor of computed values instead of failing.
I haven't traced why autoclustering's shape-inference path accepts input that both eager and the explicit XLA path reject — flagging the observed divergence, not the exact mechanism.
Activity
google-ml-butler commentedon Aug 13, 2026
Are you satisfied with the resolution of your issue?
Yes
No