[go: nahoru, domu]

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

Different behaviors of raw_ops.Sigmoid can be observed when jitcompiled=true. #62212

Closed
zoux1a opened this issue Oct 24, 2023 · 7 comments
Closed
Assignees
Labels
comp:ops OPs related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF2.14 For issues related to Tensorflow 2.14.x type:bug Bug

Comments

@zoux1a
Copy link
zoux1a commented Oct 24, 2023

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

2.14.0

Custom code

Yes

OS platform and distribution

Ubuntu 22.04.3 LTS (x86_64)

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

11.8

GPU model and memory

GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070

Current behavior?

In TensorFlow, enabling jitcompiled results in inconsistent behavior of raw_ops.Sigmoid.

Standalone code to reproduce the issue

I can reproduce this issue on colab: https://colab.research.google.com/drive/16gZRKnhRtqUBJiUQEobXCrjt3B4-w8hS?usp=sharing

Relevant log output

InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b''
b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float32), atol = tf.Tensor(0.001, shape=(), dtype=float32)'
b'x (shape=(10, 9) dtype=complex64) = '
(nan+nanj), (1+0j), (nan+nanj), ...
b'y (shape=(10, 9) dtype=complex64) = '
(1+0j), (-0-0j), (1+0j), ...
@google-ml-butler google-ml-butler bot added the type:bug Bug label Oct 24, 2023
@Venkat6871 Venkat6871 added comp:ops OPs related issues TF2.14 For issues related to Tensorflow 2.14.x labels Nov 30, 2023
@Venkat6871
Copy link

Hi @zoux1a ,

I have replicated the reported behaviour with colab using TF v2.14, 2.15, and TF-nightly. Please find the gist here for reference.

Thank you!

@SuryanarayanaY
Copy link
Collaborator

Hi @zoux1a ,

The assertion is failing because here the inputs are complex dtypes and Sigmoid Op is converting this to Nans or 0 & 1 s which is inconsistent.

If we convert input from complex to float32 then the results are same. I have taken a simple input and attached my observations in the gist.

IMO, there is some inconsistency in Sigmoid Op with complex dtypes causing this behaviour. Escalating the issue to SME for their comments.

@SuryanarayanaY SuryanarayanaY added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Dec 5, 2023
@cantonios
Copy link
Contributor

Fix is now in Eigen: https://gitlab.com/libeigen/eigen/-/merge_requests/1431

Will take a few weeks to propagate to TF.

@tilakrayal
Copy link
Contributor

@zoux1a ,
The above PR which was raised in the eigen repo was merged and also tried to execute the code on tf-nightly and it was executed without any issue/error/fail. Kindly find the gist of it here. Thank you!

@tilakrayal tilakrayal added stat:awaiting response Status - Awaiting response from author and removed awaiting review Pull request awaiting review stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Jun 12, 2024
Copy link

This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Jun 20, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF2.14 For issues related to Tensorflow 2.14.x type:bug Bug
Projects
None yet
Development

No branches or pull requests

5 participants