- Notifications
You must be signed in to change notification settings - Fork26.3k
Optimize register_full_backward_hook description when all input no grad#151785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Optimize register_full_backward_hook description when all input no grad#151785
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pytorch-botbot commentedApr 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🔗 Helpful Links🧪 See artifacts and rendered test results athud.pytorch.org/pr/151785
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commitcfc2c1a with merge baseeb1f85a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
soulitzer left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks!
But to change up the ordering/wording, maybe I prefer the following structure:
- Ordinarily, the hook fires when the gradients are computed with respect to the module inputs.
- If none of the module inputs require gradients, the hook will fire when the gradients are computed with respect to module outputs
- If none of the module outputs require gradients, then the hooks will not fire.
zeshengzong commentedApr 22, 2025
soulitzer left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the update!
soulitzer commentedApr 22, 2025
@pytorchbot merge |
pytorchmergebot commentedApr 22, 2025
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in thewiki. Questions? Feedback? Please reach out to thePyTorch DevX Team |

Fixes#100528
Test Result
Before
After