|
17 | 17 | from contextlib import contextmanager |
18 | 18 | from typing import List, Tuple |
19 | 19 |
|
20 | | -from install_requirements import install_requirements, python_is_compatible, TORCH_URL |
| 20 | +from install_requirements import ( |
| 21 | + install_requirements, |
| 22 | + python_is_compatible, |
| 23 | + TORCH_NIGHTLY_URL, |
| 24 | +) |
21 | 25 |
|
22 | 26 | # Set up logging |
23 | 27 | logging.basicConfig( |
@@ -49,7 +53,7 @@ def clean(): |
49 | 53 |
|
50 | 54 |
|
51 | 55 | # Please keep this insync with `ShouldBuild.pybindings` in setup.py. |
52 | | -VALID_PYBINDS = ["coreml", "mps", "xnnpack", "training"] |
| 56 | +VALID_PYBINDS = ["coreml", "mps", "xnnpack", "training", "openvino"] |
53 | 57 |
|
54 | 58 |
|
55 | 59 | ################################################################################ |
@@ -198,14 +202,10 @@ def main(args): |
198 | 202 | use_pytorch_nightly = True |
199 | 203 |
|
200 | 204 | wants_pybindings_off, pybind_defines = _list_pybind_defines(args) |
201 | | - if not wants_pybindings_off: |
202 | | - if len(pybind_defines) > 0: |
203 | | - # If the user explicitly provides a list of bindings, just use them |
204 | | - cmake_args += pybind_defines |
205 | | - else: |
206 | | - # If the user has not set pybindings off but also has not provided |
207 | | - # a list, then turn on xnnpack by default |
208 | | - cmake_args.append("-DEXECUTORCH_BUILD_XNNPACK=ON") |
| 205 | + if wants_pybindings_off: |
| 206 | + cmake_args.append("-DEXECUTORCH_BUILD_PYBIND=OFF") |
| 207 | + else: |
| 208 | + cmake_args += pybind_defines |
209 | 209 |
|
210 | 210 | if args.clean: |
211 | 211 | clean() |
@@ -251,7 +251,7 @@ def main(args): |
251 | 251 | "--no-build-isolation", |
252 | 252 | "-v", |
253 | 253 | "--extra-index-url", |
254 | | - TORCH_URL, |
| 254 | + TORCH_NIGHTLY_URL, |
255 | 255 | ], |
256 | 256 | check=True, |
257 | 257 | ) |
|
0 commit comments