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
After consulting the LLMs, it looks like PyTorch autograd will discard any gradient we return from the backwards() if that tensor is not supposed to require gradients (we should write a test for this). That's why this logic "works". The fix here is that requires_grad should be True unless the tensor is not a floating point one. Also we should return None for any input tensors that do not require gradient to be clean.
The snippet
xla/torch_xla/experimental/scan.py
Lines 217 to 226 in 00fac78
require_grads=True
on all carry inputs and that won't work if one of the carry is aLongTensor
.The most obvious example is that if one of the input is an integer, then it can't possibly have gradients.
The text was updated successfully, but these errors were encountered: