Skip to content

Commit 3e9629a

Browse files
Llm preset cuda win (#15253)
No quantized or llm custom ops on windows cuda, they dont build.
1 parent df32c36 commit 3e9629a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/cmake/preset/llm.cmake

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ set_overridable_option(EXECUTORCH_BUILD_EXTENSION_LLM_RUNNER ON)
1313
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
1414
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP ON)
1515
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
16-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM ON)
1716
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
18-
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
1917
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
2018

19+
# Turn on the quantized and LLM kernels unless on windows cuda build which
20+
# currently doesn't support this due to using msvc.
21+
if(NOT (EXECUTORCH_BUILD_CUDA AND (CMAKE_SYSTEM_NAME STREQUAL "Windows"
22+
OR CMAKE_SYSTEM_NAME STREQUAL "WIN32"))
23+
)
24+
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
25+
set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM ON)
26+
endif()
27+
2128
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
2229
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
2330
set_overridable_option(EXECUTORCH_BUILD_MPS ON)
@@ -29,7 +36,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
2936
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL
3037
"WIN32"
3138
)
32-
# Windows or other OS-specific code here
39+
3340
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
3441
# Android-specific code here
3542
else()

0 commit comments

Comments
 (0)