Update docstring on return type of jvp and vjp#51035
Closed
niklasschmitz wants to merge 1 commit intopytorch:masterfrom
Closed
Update docstring on return type of jvp and vjp#51035niklasschmitz wants to merge 1 commit intopytorch:masterfrom
jvp and vjp#51035niklasschmitz wants to merge 1 commit intopytorch:masterfrom
Conversation
Adds the information that `jvp` and `vjp` both return the primal `func_output` first as part of the return tuple, in line with the docstrings of `hvp` and `vjp`.
albanD
approved these changes
Jan 25, 2021
Collaborator
albanD
left a comment
There was a problem hiding this comment.
Nice catch!
Thanks a lot for the fix!
Contributor
💊 CI failures summary and remediationsAs of commit c620572 (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Codecov Report
@@ Coverage Diff @@
## master #51035 +/- ##
==========================================
- Coverage 80.91% 80.91% -0.01%
==========================================
Files 1926 1926
Lines 210014 210014
==========================================
- Hits 169943 169941 -2
- Misses 40071 40073 +2 |
Contributor
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Updates the docstrings, that `jvp` and `vjp` both return the primal `func_output` first as part of the return tuple, in line with the docstrings of [hvp](https://github.com/niklasschmitz/pytorch/blob/c620572a3477143df33128318dc0d7d10fab811d/torch/autograd/functional.py#L671) and [vhp](https://github.com/niklasschmitz/pytorch/blob/c620572a3477143df33128318dc0d7d10fab811d/torch/autograd/functional.py#L583). Pull Request resolved: pytorch#51035 Reviewed By: bdhirsh Differential Revision: D26047693 Pulled By: albanD fbshipit-source-id: 5f2957a858826b4c1884590b6be7a8bed0791efd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the docstrings, that
jvpandvjpboth return the primalfunc_outputfirst as part of the return tuple,in line with the docstrings of hvp and vhp.