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
[jit] torch.isfinite
is broken
#29340
Comments
This is an example of a general source of bugs in TorchScript, which is that if you register an operator that should be overloaded with both Scalar and Tensor for an argument for only the Scalar case it will lead to bad implicit casting and a runtime error. The fix is to just expose the op that has a Tensor input. See also: #27512 |
Thanks a lot for your reply, |
Hmm actually, looks like we're not correctly resolving A workaround is to call |
I've tried, it won't work. F.isfinite(x) is returning 'bool' while scripting and Tensor in Python
|
Hmm, actually you're right, all of the functions in |
How can we solve it, what type of changes could we propose to repository? |
FYI: #28918 |
This should be fixed now. |
results in
It crashes at runtime and the signature is wrong since the actual op is not bound in, it's instead done here
pytorch/torch/csrc/jit/register_prim_ops.cpp
Line 2941 in 0d9dc46
The text was updated successfully, but these errors were encountered: