[TF FE]: Support complex tensors for Rsqrt operations
build_jenkins
Hey @rkazants, I encountered some issues described here. Could you give me a hint?
@rkazants This one really got me sweating but I was able to fix issues. However, tests cannot compare infinite values even though the outcome is correct.
build_jenkins
Let us see CI results for now. I will take a look more deeply tomorrow.
Thanks, Roman
All checks passed and I addressed code changes.
build_jenkins
@rkazants Previous PR #26475 seems to cause failure on ARM and the same happened PR #26512. Should I make separate PR to mark some test cases as xfail or it can be done here?
@rkazants Previous PR #26475 seems to cause failure on ARM and the same happened PR #26512. Should I make separate PR to mark some test cases as xfail or it can be done here?
Hi @hub-bla, do you know the reason? It is strange to me that this is sporadic since the input data should be the same run-to-run.
I do not know the reason yet but I viewed failed test cases and the output for the failed test is the same.
Rsqrt PR
MO Python Test PR
However, the test on Rsqrt PR failed only on 1 test but in MO Python Test PR it failed on 3.
Here in Rsqrt I had a problem with an unstable formula at first (It passed tests for small sizes but was really close on bigger ones). I'll try to increase test case size for Prod with bigger shapes to see if the formula itself is stable and then get back to you with the results if that's the issue.
@rkazants I think my assumption about numerically unstable formula is true. For example with shape [1, 3, 20, 150] I'm getting an AssertionError that's quite close to the acceptable range. However, with shape [1, 3, 20, 224] it does not throw anything.
But that doesn't explain why sometimes the tests were successful.
The only other option I found for this operation is iterative multiplication according to the formula for multiplying two complex numbers but I'm not sure how to do it in the translator.
Formula: (a + ib) (c + id) = (ac – bd) + i(ad + bc)
@rkazants Previous PR #26475 seems to cause failure on ARM and the same happened PR #26512. Should I make separate PR to mark some test cases as xfail or it can be done here?
Hi @hub-bla, do you know the reason? It is strange to me that this is sporadic since the input data should be the same run-to-run.
But that doesn't explain why sometimes the tests were successful.
I also once found that catboost implementation on gpu is non-deterministic. Maybe it's also the case here.
@rkazants Does it require any action from me now?
build_jenkins