clarify implementation of check_grad_usage (#64439)
authorMichael Dagitses <mikeyd@fb.com>
Sat, 18 Sep 2021 13:47:20 +0000 (06:47 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 18 Sep 2021 14:30:30 +0000 (07:30 -0700)
commit926a3d2e85d51179eb2bc9ae6927b9139fd4409d
treee5bd98288a69c48c23037ae253440f5988c9aa5f
parentd3e36fade24eb38097c6f9dd8f90bcdadf077ade
clarify implementation of check_grad_usage (#64439)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64439

1) remove unused fully_implemented
2) rename used_grad to uses_grad and make it a boolean
3) rename used_grads to num_grads_uses
4) add comments explaining what some of the checks mean

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D30733904

Pulled By: dagitses

fbshipit-source-id: dccbbef8a4be8713215ef91aa97a34124f06a7a1
tools/autograd/load_derivatives.py