|
6 | 6 | platform: |
7 | 7 | type: string |
8 | 8 | required: true |
9 | | - description: "Platform: linux-x64, linux-aarch64, windows, macos" |
| 9 | + description: "Platform: linux-x64, linux-aarch64, windows, windows-arm64, macos" |
10 | 10 | backend: |
11 | 11 | type: string |
12 | 12 | required: true |
|
42 | 42 | inputs.platform == 'linux-x64' && 'ubuntu-22.04' || |
43 | 43 | inputs.platform == 'linux-aarch64' && 'ubuntu-22.04-arm' || |
44 | 44 | inputs.platform == 'macos' && 'macos-15' || |
| 45 | + inputs.platform == 'windows-arm64' && 'windows-11-arm' || |
45 | 46 | 'windows-2025' |
46 | 47 | }} |
47 | 48 | outputs: |
@@ -112,6 +113,11 @@ jobs: |
112 | 113 | TEST_RUNNER="windows-2025" |
113 | 114 | fi |
114 | 115 | ;; |
| 116 | + windows-arm64) |
| 117 | + BUILD_OS="windows-11-arm" |
| 118 | + ARCH="arm64" |
| 119 | + TEST_RUNNER="windows-11-arm" |
| 120 | + ;; |
115 | 121 | *) |
116 | 122 | echo "::error::Unsupported platform: ${{ inputs.platform }}" |
117 | 123 | exit 1 |
@@ -152,8 +158,10 @@ jobs: |
152 | 158 |
|
153 | 159 | # Windows: Setup MSVC (needed for both CPU and CUDA builds) |
154 | 160 | - name: Setup MSVC |
155 | | - if: inputs.platform == 'windows' |
| 161 | + if: startsWith(inputs.platform, 'windows') |
156 | 162 | uses: ilammy/msvc-dev-cmd@v1.13.0 |
| 163 | + with: |
| 164 | + arch: ${{ inputs.platform == 'windows-arm64' && 'arm64' || 'x64' }} |
157 | 165 |
|
158 | 166 | # Build CPU backend |
159 | 167 | - name: Build C++ |
@@ -198,12 +206,15 @@ jobs: |
198 | 206 | - name: Setup Python |
199 | 207 | uses: actions/setup-python@v5 |
200 | 208 | with: |
201 | | - python-version: '3.10' |
| 209 | + # Python for Windows ARM64 is only available from 3.12+ |
| 210 | + python-version: ${{ inputs.platform == 'windows-arm64' && '3.12' || '3.10' }} |
202 | 211 |
|
203 | 212 | # Windows: Setup MSVC for torch.compile |
204 | 213 | - name: Setup MSVC |
205 | | - if: inputs.platform == 'windows' |
| 214 | + if: startsWith(inputs.platform, 'windows') |
206 | 215 | uses: ilammy/msvc-dev-cmd@v1.13.0 |
| 216 | + with: |
| 217 | + arch: ${{ inputs.platform == 'windows-arm64' && 'arm64' || 'x64' }} |
207 | 218 |
|
208 | 219 | - name: Install torch (nightly) |
209 | 220 | if: inputs.torch_version == 'nightly' |
|
0 commit comments