File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
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
@@ -204,8 +207,10 @@ def main(args):
204207 EXECUTORCH_BUILD_PYBIND = "OFF"
205208 else :
206209 for pybind_arg in args .pybind :
207- if pybind_arg not in ["coreml" , "mps" , "xnnpack" ]:
208- continue
210+ if pybind_arg not in VALID_PYBINDS :
211+ raise Exception (
212+ f"Unrecognized pybind argument { pybind_arg } ; valid options are: { ", " .join (VALID_PYBINDS )} "
213+ )
209214 EXECUTORCH_BUILD_PYBIND = "ON"
210215 CMAKE_ARGS += f" -DEXECUTORCH_BUILD_{ pybind_arg .upper ()} =ON"
211216
You can’t perform that action at this time.
0 commit comments