mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Using `include-what-you-use` tool to find out and remove some unused includes Pull Request resolved: https://github.com/pytorch/pytorch/pull/93359 Approved by: https://github.com/malfet
13 lines
260 B
C++
13 lines
260 B
C++
#include <c10/core/GradMode.h>
|
|
|
|
namespace c10 {
|
|
|
|
bool GradMode::is_enabled() {
|
|
return AutogradState::get_tls_state().get_grad_mode();
|
|
}
|
|
|
|
void GradMode::set_enabled(bool enabled) {
|
|
AutogradState::get_tls_state().set_grad_mode(enabled);
|
|
}
|
|
} // namespace c10
|