AutoDispatchBelowAutograd takes no arguments. (#56424)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56424

Test Plan: Imported from OSS

Reviewed By: nikithamalgifb

Differential Revision: D27866607

Pulled By: ailzhang

fbshipit-source-id: b82cfb90af5bc7b4129266083fe31f8b335a5b41
This commit is contained in:
Ailing Zhang
2021-04-21 14:41:03 -07:00
committed by Facebook GitHub Bot
parent 3ec6bf5d26
commit 27a0d6f1df
17 changed files with 37 additions and 41 deletions

View File

@ -81,7 +81,7 @@ void get_autograd_operator_from_registry_and_execute() {
}
void get_autograd_operator_from_registry_and_execute_in_nograd_mode() {
at::AutoDispatchBelowAutograd _var_guard(true);
at::AutoDispatchBelowAutograd guard;
torch::Tensor x = torch::randn({5,5}, torch::requires_grad());
torch::Tensor y = torch::randn({5,5}, torch::requires_grad());