Home
last modified time | relevance | path

Searched refs:TorchDispatchModeKey (Results 1 – 7 of 7) sorted by relevance

/external/pytorch/c10/core/impl/
DTorchDispatchModeTLS.h8 enum class TorchDispatchModeKey : int8_t { enum
15 using PyObject_TorchDispatchMode = SafePyObjectT<TorchDispatchModeKey>;
31 tuple<std::shared_ptr<PyObject_TorchDispatchMode>, TorchDispatchModeKey>
39 get_mode(TorchDispatchModeKey mode_key);
41 unset_mode(TorchDispatchModeKey mode_key);
44 TorchDispatchModeKey mode_key);
59 static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS)>
65 C10_API std::string to_string(TorchDispatchModeKey mode_key);
DTorchDispatchModeTLS.cpp18 static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS))) { in any_modes_set()
45 static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS) - 1; in pop_stack()
65 tuple<std::shared_ptr<PyObject_TorchDispatchMode>, TorchDispatchModeKey>
67 for (int64_t i = static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS) - 1; in pop_highest_infra_mode()
80 std::move(out_mode), static_cast<TorchDispatchModeKey>(i)); in pop_highest_infra_mode()
99 c10::irange(static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS))) { in get_stack_at()
116 c10::irange(static_cast<size_t>(TorchDispatchModeKey::NUM_MODE_KEYS))) { in stack_len()
125 TorchDispatchModeTLS::get_mode(TorchDispatchModeKey mode_key) { in get_mode()
131 TorchDispatchModeKey mode_key) { in set_mode()
149 TorchDispatchModeTLS::unset_mode(TorchDispatchModeKey mode_key) { in unset_mode()
[all …]
/external/pytorch/torch/csrc/utils/
Ddevice_lazy_init.cpp31 c10::impl::TorchDispatchModeKey::FAKE); in device_lazy_init()
Dtorch_dispatch_mode.h37 std::optional<c10::impl::TorchDispatchModeKey> saved_mode_key_;
Dpython_dispatch.cpp984 using c10::impl::TorchDispatchModeKey; in initDispatchBindings()
985 py::enum_<TorchDispatchModeKey>(m, "_TorchDispatchModeKey") in initDispatchBindings()
986 .value("FUNCTIONAL", TorchDispatchModeKey::FUNCTIONAL) in initDispatchBindings()
987 .value("PROXY", TorchDispatchModeKey::PROXY) in initDispatchBindings()
988 .value("FAKE", TorchDispatchModeKey::FAKE); in initDispatchBindings()
Dpython_arg_parser.cpp287 std::optional<c10::impl::TorchDispatchModeKey> maybe_mode_key = in dispatch_on_subclass()
/external/pytorch/torch/csrc/autograd/
Dinit.cpp1135 using c10::impl::TorchDispatchModeKey; in push_on_torch_dispatch_stack()
1138 std::optional<c10::impl::TorchDispatchModeKey> mode_key = std::nullopt; in push_on_torch_dispatch_stack()
1142 mode_key = py::cast<c10::impl::TorchDispatchModeKey>(maybe_mode_key_obj); in push_on_torch_dispatch_stack()
1162 std::optional<c10::impl::TorchDispatchModeKey> mode_key = std::nullopt; in pop_torch_dispatch_stack()
1165 mode_key = py::cast<c10::impl::TorchDispatchModeKey>(maybe_mode_key); in pop_torch_dispatch_stack()
1210 auto mode_key = py::cast<c10::impl::TorchDispatchModeKey>(maybe_mode_key_obj); in set_dispatch_mode()
1225 auto mode_key = py::cast<c10::impl::TorchDispatchModeKey>(arg); in get_dispatch_mode()
1241 auto mode_key = py::cast<c10::impl::TorchDispatchModeKey>(arg); in unset_dispatch_mode()