diff --git a/runtime/core/exec_aten/exec_aten.h b/runtime/core/exec_aten/exec_aten.h index 10075ab5920..8c06045927e 100644 --- a/runtime/core/exec_aten/exec_aten.h +++ b/runtime/core/exec_aten/exec_aten.h @@ -67,18 +67,18 @@ namespace aten { using TensorShapeDynamism = executorch::runtime::TensorShapeDynamism; +using std::nullopt; +using std::nullopt_t; +using std::optional; +using std::string_view; + #ifdef USE_ATEN_LIB using Tensor = at::Tensor; using TensorList = at::TensorList; using TensorImpl = at::TensorImpl; -using string_view = std::string_view; template using ArrayRef = c10::ArrayRef; -template -using optional = std::optional; -using nullopt_t = std::nullopt_t; -using std::nullopt; using ScalarType = at::ScalarType; using Scalar = c10::Scalar; using MemoryFormat = c10::MemoryFormat; @@ -126,14 +126,8 @@ inline ssize_t compute_numel(const SizesType* sizes, ssize_t dim) { using Tensor = torch::executor::Tensor; using TensorImpl = torch::executor::TensorImpl; -using string_view = torch::executor::string_view; template using ArrayRef = torch::executor::ArrayRef; -template -using optional = torch::executor::optional; -using nullopt_t = torch::executor::nullopt_t; -// NOLINTNEXTLINE(facebook-hte-NamespaceScopedStaticDeclaration) -using std::nullopt; using ScalarType = torch::executor::ScalarType; using TensorList = ArrayRef; using Scalar = torch::executor::Scalar;