Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions tools/cmake/preset/llm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)

# Turn on the quantized and LLM kernels unless on windows cuda build which
# currently doesn't support this due to using msvc.
if(NOT (EXECUTORCH_BUILD_CUDA AND (CMAKE_SYSTEM_NAME STREQUAL "Windows"
OR CMAKE_SYSTEM_NAME STREQUAL "WIN32"))
# Turn on the quantized and LLM kernels unless on Windows with MSVC build since
# they don't currently compile.
if(NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL
"WIN32") AND MSVC)
)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM ON)
else()
if(NOT EXECUTORCH_BUILD_CUDA)
message(
WARNING
"The llm custom kernels and the quantized kernels will not be built when using MSVC on Windows. "
"If you need them (since you appear to be building for CPU) try building with -T ClangCL"
)
endif()
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
Expand Down
Loading