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
bug in rsqrt #51043
Comments
We see that the issue template has not been filled, could you please do so as it helps us analyse the issue.Thanks! |
System information
Describe the current behavior get the wrong results: Describe the expected behavior
Standalone code to reproduce the issue
Other info / logs Include any logs or source code that would be helpful to |
|
@Saduf2019 , |
@Saduf2019 ,@tensorflowbutler, |
@BlueSkyyyyyy |
@Saduf2019 as i use float32 in numpy or python, can get the right ans:
run get the ans:
so i think float32 is enough for this case . |
@BlueSkyyyyyy |
@Saduf2019 |
I tested in colab both cpu and gpu implementation results match and I get tf.Tensor(
[1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19
1.383168e+19 1.383168e+19 1.383168e+19 9.223372e+18], shape=(9,), dtype=float32) I wonder why you are seeing different results. You may try test with google colab. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
this result is not right, that is the key point. |
This is likely due to an Eigen approximation. If If compiling TF from source, you can try explicitly disabling this (adding If not building TF from source, the work-around is to use |
@cantonios |
If your issue is resolved, could you please close the issue. Thanks! |
---------------------------------------------------------------------------part 1-----------------------------------------------------------------
my code:
expect the right result:
[9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18, 9.223371843921341e+18]
in the env: tensorflow== 1.14.0 python=3.6.8
get the wrong result:
[1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19
1.383168e+19 1.383168e+19 1.383168e+19 9.223372e+18]
in the env: tensorflow== 1.14.0 python=3.6.8
get the wrong result:
[1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19
1.383168e+19 1.383168e+19 1.383168e+19 9.223372e+18]
in the env: tensorflow== 1.14.0 python=2.7.18
get the wrong result:
[ inf inf inf inf inf
inf inf inf 9.223372e+18]
note:if I use the gpu device, also get the wrong result
----------------------------------------------------------------------part 2-----------------------------------------------------------------
my code2:
in the env: tensorflow== 2.4.0 python=3.8.5
get the wrong result:
[1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19 1.383168e+19
1.383168e+19 1.383168e+19 1.383168e+19 9.223372e+18]
in the same env tensorflow== 2.4.0 python=3.8.5 if I use GPU, I mean os.environ["CUDA_VISIBLE_DEVICES"] = "1"
get the right result:
[9.223372e+18 9.223372e+18 9.223372e+18 9.223372e+18 9.223372e+18
9.223372e+18 9.223372e+18 9.223372e+18 9.223372e+18]
----------------------------------------------------------------------part 3-----------------------------------------------------------------
note:
1、the small shape tend to get the right result
2、similarity bug also in tf.floor
The text was updated successfully, but these errors were encountered: