Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions extension/data_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ if(NOT ET_HAVE_SYS_MMAN_H AND NOT WIN32)
"extension/data_loader/mmap_data_loader.cpp"
)
endif()
if(WIN32)
list(APPEND _extension_data_loader__srcs
"extension/data_loader/mman_windows.cpp"
)
endif()
list(TRANSFORM _extension_data_loader__srcs PREPEND "${EXECUTORCH_ROOT}/")
add_library(extension_data_loader ${_extension_data_loader__srcs})
target_link_libraries(extension_data_loader executorch_core)
Expand Down
16 changes: 14 additions & 2 deletions tools/cmake/preset/pybind.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@ set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TRAINING ON)

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TRAINING ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TRAINING ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL
"WIN32"
)
# Windows or other OS-specific code here
if(NOT CMAKE_GENERATOR_TOOLSET MATCHES "ClangCL")
message(
FATAL_ERROR
"ExecuTorch requires the ClangCL toolset on Windows. Please configure with -T ClangCL."
)
endif()

# These XNNPACK options don't currently build on Windows with Clang.
set_overridable_option(XNNPACK_ENABLE_AVX256SKX OFF)
set_overridable_option(XNNPACK_ENABLE_AVX256VNNI OFF)
set_overridable_option(XNNPACK_ENABLE_AVX256VNNIGFNI OFF)
set_overridable_option(XNNPACK_ENABLE_AVX512BF16 OFF)
else()
message(
FATAL_ERROR "Unsupported CMAKE_SYSTEM_NAME for pybind: ${CMAKE_SYSTEM_NAME}"
Expand Down
Loading