From 26eeac56cf1901c66b2356eeaab21c3c593f102d Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 10 Jun 2026 07:50:29 -0700 Subject: [PATCH 1/2] Guard extension_cuda compile options to CXX to fix Windows CUDA build extension/cuda/CMakeLists.txt applied ${_common_compile_options} PUBLIC without a $ guard. After #20158 wired extension_cuda into slimtensor's INTERFACE (backends/aoti/CMakeLists.txt), that option (/wd4996 on MSVC) propagates transitively into the aoti_cuda_shims .cu compile. nvcc receives a bare /wd4996 and treats it as a second input, failing with 'nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified'. That breaks the Windows CUDA build and install, so executorchConfig.cmake is never produced and the e2e model runners fail at find_package(executorch). Guard the options with $, matching every other target in the CUDA stack (backends/cuda, backends/aoti). --- extension/cuda/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/cuda/CMakeLists.txt b/extension/cuda/CMakeLists.txt index dbd74ec7596..0003691ac8b 100644 --- a/extension/cuda/CMakeLists.txt +++ b/extension/cuda/CMakeLists.txt @@ -25,7 +25,9 @@ find_package(CUDAToolkit REQUIRED) add_library(extension_cuda SHARED caller_stream.cpp) target_link_libraries(extension_cuda PUBLIC CUDA::cudart) target_include_directories(extension_cuda PUBLIC ${_common_include_directories}) -target_compile_options(extension_cuda PUBLIC ${_common_compile_options}) +target_compile_options( + extension_cuda PUBLIC "$<$:${_common_compile_options}>" +) target_compile_definitions( extension_cuda PRIVATE EXECUTORCH_EXTENSION_CUDA_BUILDING ) From 0d1780c97dd4198d96dd9a922860dffff04c4276 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 10 Jun 2026 07:51:49 -0700 Subject: [PATCH 2/2] Run cuda-windows CI on extension/cuda changes extension/cuda feeds the CUDA build (it is linked into slimtensor / aoti_cuda_backend), so changes there can break the Windows CUDA build (as #20158 did) but were not triggering this workflow. Add extension/cuda to the pull_request paths and the per-job changed-files conditions. --- .github/workflows/cuda-windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cuda-windows.yml b/.github/workflows/cuda-windows.yml index b998cdff514..1af6fdac0ca 100644 --- a/.github/workflows/cuda-windows.yml +++ b/.github/workflows/cuda-windows.yml @@ -16,6 +16,7 @@ on: - .github/workflows/cuda-windows.yml - backends/cuda/** - backends/aoti/** + - extension/cuda/** workflow_dispatch: concurrency: @@ -49,6 +50,7 @@ jobs: ( contains(needs.changed-files.outputs.changed-files, 'backends/cuda') || contains(needs.changed-files.outputs.changed-files, 'backends/aoti') || + contains(needs.changed-files.outputs.changed-files, 'extension/cuda') || contains(needs.changed-files.outputs.changed-files, '.github/workflows/cuda-windows.yml') || needs.run-decision.outputs.is-full-run == 'true' ) @@ -150,6 +152,7 @@ jobs: ( contains(needs.changed-files.outputs.changed-files, 'backends/cuda') || contains(needs.changed-files.outputs.changed-files, 'backends/aoti') || + contains(needs.changed-files.outputs.changed-files, 'extension/cuda') || contains(needs.changed-files.outputs.changed-files, '.github/workflows/cuda-windows.yml') || needs.run-decision.outputs.is-full-run == 'true' )