https://github.com/NVIDIA/apex/pull/1282/files/01802f623c9b54199566871b49f94b2d07c3f047

 

Handle len(cached_x.grad_fn.next_functions) == 1 in cached_cast by jiafatom · Pull Request #1282 · NVIDIA/apex

Using apex for mix precision training, and find one case when if x.requires_grad and cached_x.requires_grad:, the tuple cached_x.grad_fn.next_functions contains only one element. In this case, we s...

github.com

 

,