Skip to content

Commit c73b059

Browse files
committed
Update
1 parent a6ee575 commit c73b059

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

backends/cuda/CMakeLists.txt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,17 @@ include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
2929
find_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+
)
3635
add_library(aoti_cuda STATIC ${_aoti_cuda_sources})
3736
target_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
)
4644
target_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
5149
target_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 ...)
6257
executorch_target_link_options_shared_lib(aoti_cuda)
6358

6459
# Add runtime
6560
add_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

6866
install(
6967
TARGETS aoti_cuda

backends/cuda/cuda_backend.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
class COMPILE_SPEC_KEYS(Enum):
3737
METHOD_NAME = "method_name"
3838

39-
class COMPILE_SPEC_KEYS(Enum):
40-
METHOD_NAME = "method_name"
41-
42-
4339
# context manager for non-fallback guarantee
4440
# it will raise exception when generating fallback kernels during aoti compile
4541
@contextlib.contextmanager

0 commit comments

Comments
 (0)