pytorch/docs
Richard Zou 98b78aa11c [autograd.Function] setup_context always appears on the Function (#92312)
Previously, we used the existence of setup_context to switch between if
forward should take a ctx object or not.

To be consistent with all other staticmethod (which always exist on the
autograd.Function), this PR change it so that we use IF setup_context
gets overriden by the user to switch between if forward should take a
ctx object or not.

Fixes https://github.com/pytorch/pytorch/issues/91451

Test Plan:
- existing tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92312
Approved by: https://github.com/albanD, https://github.com/soulitzer
2023-01-18 02:55:42 +00:00
..
caffe2 Fix typos under docs directory (#88033) 2022-10-31 19:31:56 +00:00
cpp Fix typos under docs directory (#88033) 2022-10-31 19:31:56 +00:00
source [autograd.Function] setup_context always appears on the Function (#92312) 2023-01-18 02:55:42 +00:00
.gitignore
libtorch.rst
make.bat
Makefile Doc for Canonical Aten and Prims IR (#90644) 2022-12-13 21:30:47 +00:00
README.md
requirements.txt [ONNX] Document ONNX diagnostics (#88371) 2022-11-16 19:21:46 +00:00

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.