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
[XLA] Far-tail truncated normal sampling collapses to the lower bound #128959
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
TensorFlow: 2.23.0-dev20261011
Custom code
Yes
OS platform and distribution
Ubuntu24.04
Mobile device
No response
Python version
3.11.15
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
12.0.140
GPU model and memory
No response
Current behavior?
XLA incorrectly collapses tf.random.stateless_parameterized_truncated_normal to a constant when sampling from the far tail of a normal distribution.
For a standard normal distribution truncated to [6, 7], CPU eager execution produces diverse samples with a mean around 6.16, while XLA returns only 6.0.
The same issue is reproducible on XLA GPU, where all 65,536 samples also equal 6.0.
Thank you for reporting this issue and for providing the clear standalone code to reproduce the behavior across eager and XLA execution, wheretf.random.stateless_parameterized_truncated_normal incorrect to a constant lower bound when sampling from the far tail of a normal distribution under XLA (both CPU and GPU), whereas eager execution produces diverse samples as expected.
We will investigate the issue and provide an update.
Hi @xyt66665000 ,
Thank you for raising your concern here.
A fix for this issue has been proposed in this PR. Once it is merged, this issue will be resolved.
Hi @adi-IL ,
Thank you for raising the PR to address this issue. We truly appreciate your initiative and the effort in contributing the fix.
Activity
nileshau-afk commentedon Oct 13, 2026
Hi @xyt66665000,
Thank you for reporting this issue and for providing the clear standalone code to reproduce the behavior across eager and XLA execution, where
tf.random.stateless_parameterized_truncated_normalincorrect to a constant lower bound when sampling from the far tail of a normal distribution under XLA (both CPU and GPU), whereas eager execution produces diverse samples as expected.We will investigate the issue and provide an update.
Venkat6871 commentedon Nov 8, 2026
Hi @xyt66665000 ,
Thank you for raising your concern here.
A fix for this issue has been proposed in this PR. Once it is merged, this issue will be resolved.
Hi @adi-IL ,
Thank you for raising the PR to address this issue. We truly appreciate your initiative and the effort in contributing the fix.
Fix XLA truncated normal sampling in far one-sided tails
google-ml-butler commentedon Nov 9, 2026
Are you satisfied with the resolution of your issue?
Yes
No