tensorflow / tensorflow

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

Aborted (core dumped) due to Overflow : `tf.raw_ops.IRFFT2D` #77823

Open LongZE666 opened 1 month ago

LongZE666 commented 1 month 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

3.11

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Since the value in fft_length is a maximum value, it will cause abort

Standalone code to reproduce the issue

import tensorflow as tf

input = tf.constant(0, shape=[1,4,10,0,0] ,dtype=tf.complex64)
fft_length = tf.constant(2147483647, shape=[2], dtype=tf.int32)

tf.raw_ops.IRFFT2D(input=input, fft_length=fft_length)

Relevant log output

2024-10-13 12:59:11.295197: F tensorflow/core/framework/tensor_shape.cc:607] Non-OK-status: RecomputeNumElements()
Status: INVALID_ARGUMENT: Shape [1,4,10,2147483647,2147483647] results in overflow when computing number of elements
Aborted (core dumped)
Venkat6871 commented 1 month ago

I tried running your code on Colab using TensorFlow v2.17.0 and the nightly version. I faced the same issue. Please find gist here for reference. Thank you!