File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ if(NOT EXECUTORCH_ROOT)
2121 set (EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../..)
2222endif ()
2323
24- # Use ExecuTorch's standard way to find PyTorch libraries for AOTI
24+ # Use ExecuTorch's standard way to find PyTorch headers for AOTI
2525include (${EXECUTORCH_ROOT} /tools/cmake/Utils.cmake)
2626find_package_torch()
2727
@@ -40,11 +40,8 @@ target_compile_options(aoti_common PUBLIC -fexceptions -frtti -fPIC)
4040# Ensure symbols are exported properly
4141target_link_options (aoti_common PUBLIC -Wl,--export-dynamic)
4242
43- # Link against PyTorch libraries and standard libraries
44- target_link_libraries (
45- aoti_common
46- PUBLIC extension_tensor ${CMAKE_DL_LIBS}
47- )
43+ # Link against standard libraries
44+ target_link_libraries (aoti_common PUBLIC extension_tensor ${CMAKE_DL_LIBS} )
4845executorch_target_link_options_shared_lib(aoti_common)
4946
5047install (
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ endif()
3030
3131find_package (CUDAToolkit REQUIRED)
3232
33- # Use ExecutorTorch's standard way to find PyTorch libraries for AOTI
33+ # Use ExecutorTorch's standard way to find PyTorch headers for AOTI
3434include (${EXECUTORCH_ROOT} /tools/cmake/Utils.cmake)
3535find_package_torch()
3636
@@ -51,10 +51,9 @@ target_compile_options(aoti_cuda PUBLIC -fexceptions -frtti -fPIC)
5151# Ensure symbols are exported properly
5252target_link_options (aoti_cuda PUBLIC -Wl,--export-dynamic)
5353
54- # Link against CUDA::cudart, common AOTI library, and PyTorch CUDA libraries
54+ # Link against CUDA::cudart, common AOTI library and standard libraries
5555target_link_libraries (
56- aoti_cuda
57- PUBLIC aoti_common CUDA::cudart ${CMAKE_DL_LIBS}
56+ aoti_cuda PUBLIC aoti_common CUDA::cudart ${CMAKE_DL_LIBS}
5857)
5958# If you need other CUDA libraries, link them similarly:
6059# target_link_libraries(aoti_cuda PUBLIC CUDA::cublas CUDA::cufft ...)
You can’t perform that action at this time.
0 commit comments