Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on "Refactor get numerical jacobian to calculate wrt all outpu…
…ts at once" This PR addresses the comment here #53857 (comment), to reduce the run-time of old gradcheck's get numerical jacobian by a factor of num_outputs. However, because very few ops actually return multiple outputs, there is not too much real speed up here. The main benefit of doing this change as part of the refactor is that it helps us isolate the possible bugs that are specific to switching `get numerical jacobian` to run in a per output way vs all outputs at once. Much of the logic implemented here will be the same for the fast gradcheck case, so knowing for certain that everything should pass after this stage will make the next step much simpler. The get_numerical_jacobian api is also being used in common_nn. So we update the callsite there as well. [ghstack-poisoned]
- Loading branch information