xref: /aosp_15_r20/external/pytorch/aten/src/ATen/core/TorchDispatchUtils.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <ATen/core/dispatch/Dispatcher.h>
4 #include <c10/core/impl/TorchDispatchModeTLS.h>
5 #include <c10/util/ArrayRef.h>
6 #include <torch/library.h>
7 #include <optional>
8 
9 namespace at::impl {
10 
11 TORCH_API bool tensor_has_dispatch(const at::Tensor& t);
12 TORCH_API bool tensorlist_has_dispatch(at::ITensorListRef li);
13 TORCH_API bool tensorlist_has_dispatch(
14     const c10::List<std::optional<at::Tensor>>& li);
15 using c10::impl::dispatch_mode_enabled;
16 
17 } // namespace at::impl
18