Skip to content

Commit 2063432

Browse files
committed
Update
[ghstack-poisoned]
2 parents e411a1e + 9a1ddde commit 2063432

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

install_requirements.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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.
8083
TORCH_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

0 commit comments

Comments
 (0)