File tree Expand file tree Collapse file tree 3 files changed +16
-19
lines changed Expand file tree Collapse file tree 3 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -65,30 +65,24 @@ jobs:
65
65
66
66
./install_requirements.sh > /dev/null
67
67
cmake --preset ${{ matrix.preset }}
68
+ cmake --build cmake-out -j$(( $(nproc) - 1 ))
68
69
69
70
windows :
70
71
uses : pytorch/test-infra/.github/workflows/windows_job.yml@main
71
72
strategy :
72
73
fail-fast : false
73
74
matrix :
74
- preset : [pybind]
75
+ preset : [pybind, llm ]
75
76
with :
76
77
job-name : build
77
78
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
78
79
submodules : recursive
79
80
timeout : 90
80
81
script : |
81
82
set -eux
82
- conda init powershell
83
- powershell -Command "& {
84
- \$ErrorActionPreference = 'Stop'
85
- Set-PSDebug -Trace 1
83
+ conda create --yes --quiet -n et python=3.12
84
+ conda activate et
86
85
87
- conda create --yes --quiet -n et python=3.12
88
- conda activate et
89
-
90
- python install_requirements.py
91
- cmake --preset ${{ matrix.preset }}
92
- \$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
93
- cmake --build cmake-out -j \$numCores
94
- }"
86
+ python install_requirements.py
87
+ cmake --preset ${{ matrix.preset }}
88
+ cmake --build cmake-out -j$(( $(nproc) - 1 ))
Original file line number Diff line number Diff line change @@ -72,7 +72,16 @@ if(NOT PYTHON_EXECUTABLE)
72
72
endif ()
73
73
announce_configured_options(PYTHON_EXECUTABLE)
74
74
75
+ # Check if we are on Windows
76
+ if (WIN32 )
77
+ if (DEFINED CMAKE_CXX_COMPILER_ID AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
78
+ message (FATAL_ERROR "Windows builds require Clang compiler. Current compiler: ${CMAKE_CXX_COMPILER_ID} " )
79
+ elseif (NOT DEFINED CMAKE_CXX_COMPILER_ID)
80
+ set (CMAKE_CXX_COMPILER_ID "ClangCL" )
81
+ endif ()
82
+ endif ()
75
83
announce_configured_options(CMAKE_CXX_COMPILER_ID)
84
+
76
85
announce_configured_options(CMAKE_TOOLCHAIN_FILE)
77
86
announce_configured_options(BUCK2)
78
87
Original file line number Diff line number Diff line change @@ -221,12 +221,6 @@ def main(args):
221
221
# latest PT commit otherwise
222
222
use_pytorch_nightly = False
223
223
224
- # Use ClangCL on Windows.
225
- # ClangCL is an alias to Clang that configures it to work in an MSVC-compatible
226
- # mode. Using it on Windows to avoid compiler compatibility issues for MSVC.
227
- if os .name == "nt" :
228
- cmake_args .append ("-T ClangCL" )
229
-
230
224
#
231
225
# Install executorch pip package. This also makes `flatc` available on the path.
232
226
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a
You can’t perform that action at this time.
0 commit comments