From ecadbd9d2123a5ab36a133e7a16dfddd7cd821f7 Mon Sep 17 00:00:00 2001 From: Joel Schlosser Date: Wed, 20 May 2026 10:32:31 -0700 Subject: [PATCH] Remove named tensor handling from executorch (#19642) Summary: The PyTorch team is dropping the named tensor feature entirely to reduce overhead and cleanup code bloat. This diff removes usage of all named tensor APIs in advance of this removal to avoid breakage. Reviewed By: larryliu0820 Differential Revision: D105195535 --- codegen/api/et_cpp.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/codegen/api/et_cpp.py b/codegen/api/et_cpp.py index 88f1eb83fe0..a2d86c32c7f 100644 --- a/codegen/api/et_cpp.py +++ b/codegen/api/et_cpp.py @@ -55,8 +55,6 @@ - Executorch doesn't support TensorOptions, however in this file we still keep the logic here to be compatible with torchgen.api.cpp, so that we can do stuff like ATen mode (running ATen kernels in Executorch). - - Executorch doesn't support Dimname. - - Executorch runtime doesn't support SymInt, will treat it as int. """ @@ -141,8 +139,6 @@ def argumenttype_type( # TODO: keeping these special cases for Tensor[] and Tensor?[] so that we can hookup with ATen kernels. if str(t.elem) == "Tensor": return NamedCType(binds, BaseCType(tensorListT)) - elif str(t.elem) == "Dimname": - raise NotImplementedError("Executorch doesn't support Dimname") elif str(t.elem) == "Tensor?": return NamedCType(binds, ArrayRefCType(OptionalCType(BaseCType(tensorT)))) elem = argumenttype_type(t.elem, mutable=mutable, binds=binds)