pytorch
eb314f9b - Add setup_context staticmethod to autograd.Function (#89859)

Commit
2 years ago
Add setup_context staticmethod to autograd.Function (#89859) Adds a setup_context staticmethod to autograd.Function. If it exists, then the user splits the ctx-specific logic from the forward() and puts it in the setup_context staticmethod. Docs will come later when we remove the feature flag. Test Plan: - some light tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/89859 Approved by: https://github.com/soulitzer
Author
Committer
Parents
Loading