When you call autograd.grad function with only_inputs=False, does it fill in the .grad member for all of the variables in the graph, or only the variables that are needed to do reach the inputs. Is this behavior well-defined ? Is there a way to have autograd compute the grad of everything that is not before a certain variables (for instance to implement lazy truncated BPTT in an RNN).