@@ -78,35 +78,6 @@ endif()
7878include (${EXECUTORCH_ROOT} /tools/cmake/Utils.cmake )
7979find_package_torch ()
8080
81- # CUDA tensor maker for backends that support incontiguous tensors
82- set (_tensor_maker_sources runtime/tensor/tensor_maker.cpp)
83- add_library (cuda_tensor_maker STATIC ${_tensor_maker_sources} )
84- target_include_directories (
85- cuda_tensor_maker
86- PUBLIC $<BUILD_INTERFACE :${EXECUTORCH_ROOT} > $<INSTALL_INTERFACE :include >
87- $<BUILD_INTERFACE :${EXECUTORCH_ROOT} /..>
88- )
89- target_compile_options (
90- cuda_tensor_maker
91- PUBLIC "$<$<COMPILE_LANGUAGE :CXX >:${_cuda_cxx_compile_options} >"
92- )
93- # Ensure symbols are exported properly
94- if (_cuda_export_dynamic_option)
95- target_link_options (cuda_tensor_maker PUBLIC ${_cuda_export_dynamic_option} )
96- endif ()
97-
98- # Link against ExecuTorch core libraries
99- target_link_libraries (
100- cuda_tensor_maker PRIVATE executorch_core ${CMAKE_DL_LIBS }
101- )
102- executorch_target_link_options_shared_lib (cuda_tensor_maker )
103-
104- install (
105- TARGETS cuda_tensor_maker
106- EXPORT ExecuTorchTargets
107- DESTINATION lib
108- )
109-
11081# Platform utilities (load_library, close_library, etc.)
11182set (_cuda_platform_sources runtime/platform/platform.cpp)
11283add_library (cuda_platform STATIC ${_cuda_platform_sources} )
@@ -174,13 +145,12 @@ if(_cuda_export_dynamic_option)
174145 target_link_options (aoti_cuda_shims PUBLIC ${_cuda_export_dynamic_option} )
175146endif ()
176147
177- # Link against CUDA::cudart, common AOTI library, cuda_tensor_maker, and
178- # platform utilities. On non-MSVC, use --whole-archive for
179- # aoti_common_shims_slim to force shim symbol retention.
148+ # Link against CUDA::cudart, common AOTI library, and platform utilities. On
149+ # non-MSVC, use --whole-archive for aoti_common_shims_slim to force shim symbol
150+ # retention.
180151if (_cuda_is_msvc_toolchain)
181152 target_link_libraries (
182- aoti_cuda_shims PRIVATE cuda_platform cuda_tensor_maker CUDA::cudart
183- ${CMAKE_DL_LIBS }
153+ aoti_cuda_shims PRIVATE cuda_platform CUDA::cudart ${CMAKE_DL_LIBS }
184154 )
185155 # Link object library directly so symbols are pulled exactly once while
186156 # avoiding duplicate static/object inclusion and interface leakage.
@@ -190,7 +160,7 @@ else()
190160 aoti_cuda_shims
191161 PRIVATE cuda_platform
192162 PUBLIC -Wl,--whole-archive aoti_common_shims_slim -Wl,--no-whole-archive
193- cuda_tensor_maker CUDA::cudart ${CMAKE_DL_LIBS }
163+ CUDA::cudart ${CMAKE_DL_LIBS }
194164 )
195165endif ()
196166
@@ -229,8 +199,8 @@ endif()
229199# directory. On other platforms, use PUBLIC so the dependency propagates to
230200# consumers.
231201target_link_libraries (
232- aoti_cuda_backend PUBLIC cuda_platform extension_tensor cuda_tensor_maker
233- CUDA::cudart ${CMAKE_DL_LIBS }
202+ aoti_cuda_backend PUBLIC cuda_platform extension_tensor CUDA::cudart
203+ ${CMAKE_DL_LIBS }
234204)
235205
236206if (_cuda_is_msvc_toolchain)
0 commit comments