Skip to content

Commit 44d9946

Browse files
committed
Fix remaining build issues on Windows, re-enable Windows pybind preset build CI job
ghstack-source-id: 1d47e65 ghstack-comment-id: 3225985999 Pull-Request: #13702
1 parent 08e6708 commit 44d9946

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/build-presets.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
strategy:
110110
fail-fast: false
111111
matrix:
112-
preset: [windows]
112+
preset: [pybind, windows]
113113
with:
114114
job-name: build
115115
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
@@ -122,14 +122,17 @@ jobs:
122122
Set-PSDebug -Trace 1
123123
\$ErrorActionPreference = 'Stop'
124124
\$PSNativeCommandUseErrorActionPreference = \$true
125+
125126
conda create --yes --quiet -n et python=3.12
126127
conda activate et
127128
python install_requirements.py
129+
128130
cmake --preset ${{ matrix.preset }} -T ClangCL
129131
if (\$LASTEXITCODE -ne 0) {
130132
Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE."
131133
exit \$LASTEXITCODE
132134
}
135+
133136
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
134137
cmake --build cmake-out -j \$numCores
135138
if (\$LASTEXITCODE -ne 0) {

backends/xnnpack/cmake/Dependencies.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ else()
5555
)
5656
endif()
5757

58+
if(WIN32)
59+
# These XNNPACK options don't currently build on Windows.
60+
set_overridable_option(XNNPACK_ENABLE_AVX256SKX OFF)
61+
set_overridable_option(XNNPACK_ENABLE_AVX256VNNI OFF)
62+
set_overridable_option(XNNPACK_ENABLE_AVX256VNNIGFNI OFF)
63+
set_overridable_option(XNNPACK_ENABLE_AVX512BF16 OFF)
64+
endif()
65+
5866
set(XNNPACK_BUILD_ALL_MICROKERNELS
5967
OFF
6068
CACHE BOOL ""

tools/cmake/preset/windows.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)
1414
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
1515
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
1616
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
17-
18-
# Below options are not yet buildable on Windows, but should be.
19-
# set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
17+
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)

0 commit comments

Comments
 (0)