tensorflow / tensorflow

An Open Source Machine Learning Framework for Everyone
https://tensorflow.org
Apache License 2.0
186.58k stars 74.33k forks source link

Aborted (core dumped) in `ParameterizedTruncatedNormal` #80729

Open LongZE666 opened 3 days ago

LongZE666 commented 3 days ago

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

tf2.17.0 tf2.16.1

Custom code

Yes

OS platform and distribution

Linux Ubuntu 20.04

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Under specific inputs, ParameterizedTruncatedNormal triggered a crash.

Standalone code to reproduce the issue

import tensorflow as tf

shape = tf.constant([1610637938, 2], dtype=tf.int32)
means = tf.constant(7.89645e+16, shape=[], dtype=tf.float32)
stdevs = tf.constant(1.251e+12, shape=[], dtype=tf.float32)
minvals = tf.constant(1.23457e+13, shape=[], dtype=tf.float32)
maxvals = tf.constant(1.11111e+15, shape=[], dtype=tf.float32)
seed = 1618
seed2 = 0
tf.raw_ops.ParameterizedTruncatedNormal(shape=shape, means=means, stdevs=stdevs, minvals=minvals, maxvals=maxvals, seed=seed, seed2=seed2, name=None)

Relevant log output

2024-11-25 07:56:01.911210: F tensorflow/core/util/work_sharder.cc:59] Check failed: total >= 0 (0 vs. -10736913)
Aborted (core dumped)
Venkat6871 commented 2 days ago

Hi @LongZE666 , Thank you for raising your concern here. I tried running your code on Colab using TensorFlow 2.17.0 and faced the same issue. However, with TensorFlow 2.18.0 and the nightly versions, it works fine. We always recommend using the latest versions for better results. Please find the gist here for your reference. Thank you!