Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aborted (core dumped) with tf.raw_ops.FakeQuantWithMinMaxVarsPerChannelGradient #66759

Open
LongZE666 opened this issue May 1, 2024 · 1 comment
Assignees
Labels

Comments

@LongZE666
Copy link

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

tf 2.16.1

Custom code

Yes

OS platform and distribution

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?

Check Failed in tf.raw_ops.FakeQuantWithMinMaxVarsPerChannelGradient when the input of inputs is scalar, which causes the program to crash.

Standalone code to reproduce the issue

# FakeQuantWithMinMaxVarsPerChannelGradientOp

import tensorflow as tf

num_bits = 8
narrow_range = False
gradients = tf.constant(0, shape=[], dtype=tf.float32)
inputs = tf.constant(0, shape=[], dtype=tf.float32)
min = tf.constant(124, shape=[3,1], dtype=tf.float32)
max = tf.constant(124, shape=[3,1], dtype=tf.float32)
tf.raw_ops.FakeQuantWithMinMaxVarsPerChannelGradient(gradients=gradients, inputs=inputs, min=min, max=max, num_bits=num_bits, narrow_range=narrow_range)

Relevant log output

2024-05-01 03:10:46.669162: F tensorflow/core/framework/tensor_shape.cc:356] Check failed: d >= 0 (0 vs. -1)
Aborted (core dumped)
@SuryanarayanaY
Copy link
Collaborator

Hi @LongZE666 ,

Thanks for reporting. I have reproduced the reported behaviour and attached gist here.

The check fail observed when the inputs arg shape is empty.

Attaching also snapshot of same below.

Screenshot 2024-05-02 at 9 44 04 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants