The backward pass running on this thread.
A barrier keeps the gradients delivered to it until its own turn comes. A
pass can deliver to a barrier and never give it that turn — autograd.grad
skips a node that leads to no requested input — and the next pass over the
same graph (retain_graph=True) must not add onto what that one left.
Engine::backward and Engine::grad each open a pass; a barrier
holding gradients from a different pass discards them first.
A pass opened inside another — a hook that calls autograd.grad — gets
its own id and hands the outer one back when it closes. The outer pass is
still open meanwhile, and what it delivered to a barrier the inner pass
crosses is set aside rather than discarded (PassSlots).
Constructors
1ctor
BackwardPass
void BackwardPass()Destructor
1dtor
~BackwardPass
void ~BackwardPass()