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) in TensorScatterOp #66768

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

Aborted (core dumped) in TensorScatterOp #66768

LongZE666 opened this issue May 1, 2024 · 1 comment
Assignees
Labels
comp:ops OPs related issues TF 2.16 type:bug Bug

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?

The dimensions of indices and updates must be equal.If not equal,tf.raw _ops.TensorScatterSub,tf.raw _ops.TensorScatterAdd,tf.raw _ops.TensorScatterMin,tf.raw _ops.TensorScatterMax,tf.raw _ops.TensorScatterUpdate will crash.

Standalone code to reproduce the issue

import tensorflow as tf

tensor = tf.constant(0, shape=[101,32], dtype=tf.float32)
indices = tf.constant([], shape=[0,0,0,6], dtype=tf.int32)
updates = tf.constant([], shape=[0,0], dtype=tf.float32)
tf.raw_ops.TensorScatterAdd(tensor=tensor, indices=indices, updates=updates)
import tensorflow as tf

tensor = tf.constant(0, shape=[101,32], dtype=tf.float32)
indices = tf.constant([], shape=[0,0,0,6], dtype=tf.int32)
updates = tf.constant([], shape=[0,0], dtype=tf.float32)
tf.raw_ops.TensorScatterMax(tensor=tensor, indices=indices, updates=updates)
import tensorflow as tf

tensor = tf.constant(0, shape=[101,32], dtype=tf.float32)
indices = tf.constant([], shape=[0,0,0,6], dtype=tf.int32)
updates = tf.constant([], shape=[0,0], dtype=tf.float32)
tf.raw_ops.TensorScatterMin(tensor=tensor, indices=indices, updates=updates)
import tensorflow as tf

tensor = tf.constant(0, shape=[101,32], dtype=tf.float32)
indices = tf.constant([], shape=[0,0,0,6], dtype=tf.int32)
updates = tf.constant([], shape=[0,0], dtype=tf.float32)
tf.raw_ops.TensorScatterSub(tensor=tensor, indices=indices, updates=updates)
import tensorflow as tf

tensor = tf.constant(0, shape=[101,32], dtype=tf.float32)
indices = tf.constant([], shape=[0,0,0,6], dtype=tf.int32)
updates = tf.constant([], shape=[0,0], dtype=tf.float32)
tf.raw_ops.TensorScatterUpdate(tensor=tensor, indices=indices, updates=updates)


### Relevant log output

```shell
2024-05-01 04:00:48.333921: F tensorflow/core/framework/tensor_shape.cc:357] Check failed: d < dims() (2 vs. 2)
Aborted (core dumped)
@SuryanarayanaY
Copy link
Collaborator

Hi @LongZE666 ,

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

The checkfail happening with empty inputs for indices and updates .

Attaching snapshot of same below.

Screenshot 2024-05-02 at 9 28 41 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues TF 2.16 type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants