@@ -29,19 +29,17 @@ include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
2929find_package_torch()
3030
3131# CUDA-specific AOTI functionality
32- set (_aoti_cuda_sources
33- runtime/cuda_backend.cpp
34- runtime/shims/memory.cpp
35- runtime/shims/tensor_attribute.cpp)
32+ set (_aoti_cuda_sources runtime/cuda_backend.cpp runtime/shims/memory.cpp
33+ runtime/shims/tensor_attribute.cpp
34+ )
3635add_library (aoti_cuda STATIC ${_aoti_cuda_sources} )
3736target_include_directories (
3837 aoti_cuda
39- PUBLIC
40- ${CUDAToolkit_INCLUDE_DIRS}
41- $<BUILD_INTERFACE:${EXECUTORCH_ROOT} >
42- $<INSTALL_INTERFACE:include >
43- # PyTorch AOTI headers from ExecutorTorch's torch detection
44- ${TORCH_INCLUDE_DIRS}
38+ PUBLIC ${CUDAToolkit_INCLUDE_DIRS}
39+ $<BUILD_INTERFACE:${EXECUTORCH_ROOT} >
40+ $<INSTALL_INTERFACE:include >
41+ # PyTorch AOTI headers from ExecutorTorch's torch detection
42+ ${TORCH_INCLUDE_DIRS}
4543)
4644target_compile_options (aoti_cuda PUBLIC -fexceptions -frtti -fPIC)
4745# Ensure symbols are exported properly
@@ -50,20 +48,20 @@ target_link_options(aoti_cuda PUBLIC -Wl,--export-dynamic)
5048# Link against CUDA::cudart, common AOTI library, and PyTorch CUDA libraries
5149target_link_libraries (
5250 aoti_cuda
53- PUBLIC
54- aoti_common
55- CUDA::cudart
56- ${CMAKE_DL_LIBS}
57- # Link PyTorch libraries for AOTI CUDA functions
58- ${TORCH_LIBRARIES}
51+ PUBLIC aoti_common CUDA::cudart ${CMAKE_DL_LIBS}
52+ # Link PyTorch libraries for AOTI CUDA functions
53+ ${TORCH_LIBRARIES}
5954)
6055# If you need other CUDA libraries, link them similarly:
6156# target_link_libraries(aoti_cuda PUBLIC CUDA::cublas CUDA::cufft ...)
6257executorch_target_link_options_shared_lib(aoti_cuda)
6358
6459# Add runtime
6560add_executable (voxtral_runner tests/voxtral_runner.cpp)
66- target_link_libraries (voxtral_runner PUBLIC aoti_cuda extension_module_static extension_flat_tensor portable_ops_lib)
61+ target_link_libraries (
62+ voxtral_runner PUBLIC aoti_cuda extension_module_static extension_flat_tensor
63+ portable_ops_lib
64+ )
6765
6866install (
6967 TARGETS aoti_cuda
0 commit comments