You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on this PR #225, and am having some trouble fixing one of the tests which complains of
FAILED test/test_ops.py::TestOperatorsCPU::test_vmapvjp_clamp_cpu_float32 - RuntimeError: vmap: aten::logical_or_(self, *extra_args) is not possible because there exists a Tensor `other` in extra_args that has more elements than `self`. This happened due to `other` being vmapped over but `...
So I understand this error now, and where is it coming from: The backwards function for clamp ends up using logical_or_ in the way described. But, I don't understand what the ideal fix would be.
Some thoughts:
Change the backwards function for clamp so that it doesn't use the in place operation of logical_or?
Completely rewrite the batching rule for the backwards clamp so that it doesn't fallback into this path?
The second seems like a bad precedent, and the first seems a bit overkill.
So, any advice on how this kind of situation should be handled? Or is already handled by other parts of the codebase? (please feel free to point me to code rather than explaining)
The text was updated successfully, but these errors were encountered:
@Padarn I think there is an internal development on "functionalization" of ops to replace inplace ops with non-inplace ones. Please check out : #241 , #235
Hi all,
I'm working on this PR #225, and am having some trouble fixing one of the tests which complains of
So I understand this error now, and where is it coming from: The backwards function for
clamp
ends up usinglogical_or_
in the way described. But, I don't understand what the ideal fix would be.Some thoughts:
clamp
so that it doesn't use the in place operation oflogical_or
?The second seems like a bad precedent, and the first seems a bit overkill.
So, any advice on how this kind of situation should be handled? Or is already handled by other parts of the codebase? (please feel free to point me to code rather than explaining)
The text was updated successfully, but these errors were encountered: