Home
last modified time | relevance | path

Searched refs:TorchFunctionDisabledState (Results 1 – 4 of 4) sorted by relevance

/external/pytorch/aten/src/ATen/
DPythonTorchFunctionTLS.h8 enum TorchFunctionDisabledState { ENABLED, SUBCLASSES_DISABLED, ALL_DISABLED }; enum
11 static void set_disabled_state(TorchFunctionDisabledState disabled_state_);
12 static TorchFunctionDisabledState get_disabled_state();
27 TorchFunctionDisabledState disabled_state_ =
28 TorchFunctionDisabledState::ENABLED;
DPythonTorchFunctionTLS.cpp28 void PythonTorchFunctionTLS::set_disabled_state(TorchFunctionDisabledState disabled_state) { in set_disabled_state()
32 TorchFunctionDisabledState PythonTorchFunctionTLS::get_disabled_state() { in get_disabled_state()
45 return PythonTorchFunctionTLS::get_disabled_state() != TorchFunctionDisabledState::ALL_DISABLED && in torch_function_mode_enabled()
51 return PythonTorchFunctionTLS::get_disabled_state() == TorchFunctionDisabledState::ALL_DISABLED; in torch_function_all_disabled()
/external/pytorch/torch/csrc/utils/
Ddisable_torch_function.cpp15 at::impl::TorchFunctionDisabledState::ENABLED; in torch_function_enabled()
38 at::impl::TorchFunctionDisabledState old_state;
46 if (old_state == at::impl::TorchFunctionDisabledState::ENABLED) { in DisableTorchFunctionSubclass__enter()
48 at::impl::TorchFunctionDisabledState::SUBCLASSES_DISABLED); in DisableTorchFunctionSubclass__enter()
135 at::impl::TorchFunctionDisabledState old_state;
142 at::impl::TorchFunctionDisabledState::ALL_DISABLED); in DisableTorchFunction__enter()
230 if (old_value == at::impl::TorchFunctionDisabledState::ENABLED) { in THPModule_disable_torch_function()
232 at::impl::TorchFunctionDisabledState::SUBCLASSES_DISABLED); in THPModule_disable_torch_function()
/external/pytorch/torch/csrc/autograd/
Dinit.cpp64 at::impl::TorchFunctionDisabledState::ENABLED); in EnableTorchFunction()
69 at::impl::TorchFunctionDisabledState old_;