File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ def clean():
7676 print ("Done cleaning build artifacts." )
7777
7878
79+ VALID_PYBINDS = ["coreml" , "mps" , "xnnpack" ]
80+
81+
7982# The pip repository that hosts nightly torch packages.
8083TORCH_NIGHTLY_URL = "https://download.pytorch.org/whl/nightly/cpu"
8184
@@ -120,8 +123,6 @@ def install_requirements(use_pytorch_nightly):
120123 "pip" ,
121124 "install" ,
122125 "-r" ,
123- "requirements-dev.txt" ,
124- "-r" ,
125126 "requirements-examples.txt" ,
126127 * REQUIREMENTS_TO_INSTALL ,
127128 "--extra-index-url" ,
@@ -190,8 +191,10 @@ def main(args):
190191 EXECUTORCH_BUILD_PYBIND = "OFF"
191192 else :
192193 for pybind_arg in args .pybind :
193- if pybind_arg not in ["coreml" , "mps" , "xnnpack" ]:
194- continue
194+ if pybind_arg not in VALID_PYBINDS :
195+ raise Exception (
196+ f"Unrecognized pybind argument { pybind_arg } ; valid options are: { ", " .join (VALID_PYBINDS )} "
197+ )
195198 EXECUTORCH_BUILD_PYBIND = "ON"
196199 CMAKE_ARGS += f" -DEXECUTORCH_BUILD_{ pybind_arg .upper ()} =ON"
197200
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments