-
Notifications
You must be signed in to change notification settings - Fork 130
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
Some fix for invalid broadcasting #1637
base: master
Are you sure you want to change the base?
Conversation
Note: Before this fix, broadcasting was just always allowed!
It turns out, in the RF native code, the broadcasting check was buggy and always allowed broadcasting. (It checked whether a.dims is a subset of all dims, and b.dims is a subset of all dims, which is obviously always true...) This is problematic now. There is code out there which would break now when we fix this. So it means, we should introduce a new behavior version when we want to do the broadcasting check properly. |
And there is another thing where the RF native code was different: This time, I think it's not really a bug but just less strict. Without the native code, this RF code here is not allowed: a = ... # some int
b = ... # some int
c = a / b This gives:
But when the RF native code is used, this is allowed. The question is, what to follow here now. We could just remove the check in the pure Python RF code, and then both are consistent. Otherwise this also needs a new behavior version. |
@NeoLegends What do you think?
|
Yes.
Does the truediv result in a floating point tensor? Then I think we can remove the check and just keep "normal" python semantics on the tensors (i.e. |
Yes. Or maybe it depends on the backend. For PyTorch it does. E.g. In the native RF code, I think it just ignores the RF Tensor |
No description provided.