pytorch/test/cpp
soulitzer f3aca45a16 [BE][autograd Function] Raise an error if input is returned as-is and saved for forward or backward in setup_context (#97212)
Fixes https://github.com/pytorch/pytorch/issues/96887

We error out in BOTH the case when graph is created and when it is not created.

Still bc-breaking, but not as severe because we are limiting to the case where someone uses setup_context.

This makes setup_context and non-setup_context versions diverge in their behavior
- With the non-setup_context version, saved variables are assumed to have the grad_fn of the inputs.
- But now with the setup_context version, we produce an error for this case.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97212
Approved by: https://github.com/zou3519
2023-03-28 03:14:32 +00:00
..
api [BE][autograd Function] Raise an error if input is returned as-is and saved for forward or backward in setup_context (#97212) 2023-03-28 03:14:32 +00:00
c10d Rewrite NCCL watchdog to more reliably throw timeout (#97066) 2023-03-25 04:30:20 +00:00
common
dist_autograd set -Wsuggest-override for builds (#89852) 2022-12-19 22:08:47 +00:00
jit [BE] Cleanup CMake flag suppressions (#97584) 2023-03-27 18:46:09 +00:00
lazy std/var: support floating point correction value (#94073) 2023-02-23 05:50:45 +00:00
lite_interpreter_runtime [BE] [3/3] Rewrite super() calls in test (#94592) 2023-02-12 22:20:53 +00:00
monitor
profiler [Profiler] Fix SOFT_ASSERT test to not raise on debug builds (#91464) 2022-12-30 05:31:03 +00:00
rpc
tensorexpr code is clean enough that some warnings can be enabled (#95139) 2023-02-21 07:24:20 +00:00
__init__.py