Skip to content

Make exec_aten::optional and string_view direct aliases for std versions #11321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions runtime/core/exec_aten/exec_aten.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
using ArrayRef = c10::ArrayRef<T>;
template <typename T>
using optional = std::optional<T>;
using nullopt_t = std::nullopt_t;
using std::nullopt;
using ScalarType = at::ScalarType;
using Scalar = c10::Scalar;
using MemoryFormat = c10::MemoryFormat;
Expand Down Expand Up @@ -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 <typename T>
using ArrayRef = torch::executor::ArrayRef<T>;
template <typename T>
using optional = torch::executor::optional<T>;
using nullopt_t = torch::executor::nullopt_t;
// NOLINTNEXTLINE(facebook-hte-NamespaceScopedStaticDeclaration)
using std::nullopt;
using ScalarType = torch::executor::ScalarType;
using TensorList = ArrayRef<Tensor>;
using Scalar = torch::executor::Scalar;
Expand Down
Loading