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
14 changes: 12 additions & 2 deletions .github/workflows/build-presets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
strategy:
fail-fast: false
matrix:
preset: [pybind]
preset: [windows] # TODO (gjcomer) Re-enable pybind once functional
with:
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
Expand All @@ -119,14 +119,24 @@ jobs:
set -eux
conda init powershell
powershell -Command "& {
\$ErrorActionPreference = 'Stop'
Set-PSDebug -Trace 1
\$ErrorActionPreference = 'Stop'
\$PSNativeCommandUseErrorActionPreference = \$true

conda create --yes --quiet -n et python=3.12
conda activate et

python install_requirements.py
cmake --preset ${{ matrix.preset }}
if (\$LASTEXITCODE -ne 0) {
Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE."
exit \$LASTEXITCODE
}

\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
cmake --build cmake-out -j \$numCores
if (\$LASTEXITCODE -ne 0) {
Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE."
exit \$LASTEXITCODE
}
}"
15 changes: 15 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@
]
}
},
{
"name": "windows",
"displayName": "Build ExecuTorch for Windows",
"inherits": ["common"],
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "Windows",
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/windows.cmake"
},
"toolset": "ClangCL",
"condition": {
"lhs": "${hostSystemName}",
"type": "equals",
"rhs": "Windows"
}
},
{
"name": "zephyr",
"displayName": "Build ExecuTorch for Zephyr RTOS",
Expand Down
5 changes: 4 additions & 1 deletion devtools/bundled_program/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ foreach(schema_file ${_schema_files})
)
endforeach()

file(MAKE_DIRECTORY ${DEVTOOLS_INCLUDE_DIR}/executorch/devtools/bundled_program)
file(
MAKE_DIRECTORY
${DEVTOOLS_INCLUDE_DIR_NO_BUILD_INTERFACE}/executorch/devtools/bundled_program
)
add_custom_command(
OUTPUT ${_schema_outputs}
COMMAND
Expand Down
23 changes: 23 additions & 0 deletions tools/cmake/preset/windows.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# keep sorted
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_EVALUE_UTIL ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)

# Below options are not yet buildable on Windows, but should be.
set(EXECUTORCH_BUILD_PORTABLE_OPS
OFF
CACHE BOOL ""
)
# set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
# set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
# set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
# set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
Loading