Files
pytorch/c10/core/AutogradState.cpp
Pierre Moulon 01885cea43 [Typo] mulithreading_enabled => multithreading_enabled (#97054)
Summary: Fix typo

Test Plan: Continuous integration - Expected NoOp since it is just a variable renaming

Differential Revision: D44118850

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97054
Approved by: https://github.com/Skylion007
2023-03-21 20:11:59 +00:00

24 lines
549 B
C++

#include <c10/core/AutogradState.h>
namespace c10 {
namespace {
// By default, grad mode and multithreading are enabled, inference mode is
// disabled,
thread_local AutogradState autograd_state_tls = AutogradState(
/* grad_mode */ true,
/* inference_mode */ false,
/* fw_grad_mode */ true,
/* multithreading_enabled */ true);
} // namespace
AutogradState& AutogradState::get_tls_state() {
return autograd_state_tls;
}
void AutogradState::set_tls_state(AutogradState state) {
autograd_state_tls = state;
}
} // namespace c10