From a4a1f24efeb7377eb3ead02c08cd9515951eafbe Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Sat, 18 Oct 2025 11:05:05 -0700 Subject: [PATCH 1/3] no custom or quantized ops on win cuda --- tools/cmake/preset/llm.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/cmake/preset/llm.cmake b/tools/cmake/preset/llm.cmake index 6cd2482f717..c35ba2f633a 100644 --- a/tools/cmake/preset/llm.cmake +++ b/tools/cmake/preset/llm.cmake @@ -26,9 +26,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Linux-specific code here elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL - "WIN32" + "WIN32" ) - # Windows or other OS-specific code here + # Windows-specific code: disable quantized and custom ops when building with CUDA + if(EXECUTORCH_BUILD_CUDA) + set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF) + set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM OFF) + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") # Android-specific code here else() From 8bbe392e6c81591385a2fd65ff5ba75810fb6cb6 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Sat, 18 Oct 2025 11:06:04 -0700 Subject: [PATCH 2/3] lint --- tools/cmake/preset/llm.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/cmake/preset/llm.cmake b/tools/cmake/preset/llm.cmake index c35ba2f633a..650443b69fd 100644 --- a/tools/cmake/preset/llm.cmake +++ b/tools/cmake/preset/llm.cmake @@ -26,9 +26,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Linux-specific code here elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL - "WIN32" + "WIN32" ) - # Windows-specific code: disable quantized and custom ops when building with CUDA + # Windows-specific code: disable quantized and custom ops when building with + # CUDA if(EXECUTORCH_BUILD_CUDA) set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF) set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM OFF) From 505536d188268ee2f79062ca66200217eb3b8e32 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Sat, 18 Oct 2025 11:33:17 -0700 Subject: [PATCH 3/3] just force them off --- tools/cmake/preset/llm.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cmake/preset/llm.cmake b/tools/cmake/preset/llm.cmake index 650443b69fd..eb642d716bc 100644 --- a/tools/cmake/preset/llm.cmake +++ b/tools/cmake/preset/llm.cmake @@ -31,8 +31,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL # Windows-specific code: disable quantized and custom ops when building with # CUDA if(EXECUTORCH_BUILD_CUDA) - set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF) - set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM OFF) + set(EXECUTORCH_BUILD_KERNELS_QUANTIZED OFF) + set(EXECUTORCH_BUILD_KERNELS_LLM OFF) endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") # Android-specific code here