From 4588e6850ee63b1643cdfecc00bd4c9638732733 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Mon, 10 Nov 2025 17:24:03 -0800 Subject: [PATCH 1/4] Change aoti_cuda in executorch-config.cmake to aoti_cuda_backend As titled. --- tools/cmake/executorch-config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cmake/executorch-config.cmake b/tools/cmake/executorch-config.cmake index d6f8ded668b..fe4271e8dba 100644 --- a/tools/cmake/executorch-config.cmake +++ b/tools/cmake/executorch-config.cmake @@ -53,7 +53,7 @@ set(EXECUTORCH_FOUND ON) include("${CMAKE_CURRENT_LIST_DIR}/ExecuTorchTargets.cmake") set(optional_lib_list - aoti_cuda + aoti_cuda_backend flatccrt etdump bundled_program From 69d5fce1bd24287f3411fbd746de2a44195226b3 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Tue, 11 Nov 2025 09:25:25 -0800 Subject: [PATCH 2/4] More fixes --- backends/aoti/export.h | 2 +- examples/models/whisper/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/aoti/export.h b/backends/aoti/export.h index 879aa942035..213cef9ec17 100644 --- a/backends/aoti/export.h +++ b/backends/aoti/export.h @@ -9,7 +9,7 @@ #pragma once // Define export macro for Windows DLL -// When building the aoti_cuda library, EXPORT_AOTI_FUNCTIONS is defined by +// When building the aoti_cuda_backend library, EXPORT_AOTI_FUNCTIONS is defined by // CMake, which causes this macro to export symbols using __declspec(dllexport). // When consuming the library, the macro imports symbols using // __declspec(dllimport). On non-Windows platforms, the macro is empty and has diff --git a/examples/models/whisper/CMakeLists.txt b/examples/models/whisper/CMakeLists.txt index 70f5892baa7..295779fd626 100644 --- a/examples/models/whisper/CMakeLists.txt +++ b/examples/models/whisper/CMakeLists.txt @@ -69,8 +69,8 @@ list( # Link CUDA backend if(EXECUTORCH_BUILD_CUDA) find_package(CUDAToolkit REQUIRED) - list(APPEND _link_libraries aoti_cuda) - executorch_target_link_options_shared_lib(aoti_cuda) + list(APPEND _link_libraries aoti_cuda_backend) + executorch_target_link_options_shared_lib(aoti_cuda_backend) endif() if(EXECUTORCH_BUILD_METAL) From 216e067b05adea055d516b888a6fc46911721da8 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Tue, 11 Nov 2025 13:43:58 -0800 Subject: [PATCH 3/4] Lintrunner --- backends/aoti/export.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backends/aoti/export.h b/backends/aoti/export.h index 213cef9ec17..7c945f405b0 100644 --- a/backends/aoti/export.h +++ b/backends/aoti/export.h @@ -9,9 +9,10 @@ #pragma once // Define export macro for Windows DLL -// When building the aoti_cuda_backend library, EXPORT_AOTI_FUNCTIONS is defined by -// CMake, which causes this macro to export symbols using __declspec(dllexport). -// When consuming the library, the macro imports symbols using +// When building the aoti_cuda_backend library, EXPORT_AOTI_FUNCTIONS is defined +// by CMake, which causes this macro to export symbols using +// __declspec(dllexport). When consuming the library, the macro imports symbols +// using // __declspec(dllimport). On non-Windows platforms, the macro is empty and has // no effect. #ifdef _WIN32 From a0e94798fb7fa6d1bae34a9a8b33a251fdfb96e1 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Tue, 11 Nov 2025 15:34:18 -0800 Subject: [PATCH 4/4] Fix gemma3 --- examples/models/gemma3/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/models/gemma3/CMakeLists.txt b/examples/models/gemma3/CMakeLists.txt index 0be346d70f2..d228ca53c46 100644 --- a/examples/models/gemma3/CMakeLists.txt +++ b/examples/models/gemma3/CMakeLists.txt @@ -102,8 +102,8 @@ list( # Link CUDA backend if(EXECUTORCH_BUILD_CUDA) find_package(CUDAToolkit REQUIRED) - list(APPEND link_libraries aoti_cuda) - executorch_target_link_options_shared_lib(aoti_cuda) + list(APPEND link_libraries aoti_cuda_backend) + executorch_target_link_options_shared_lib(aoti_cuda_backend) endif() # Add tokenizers