Skip to content

Commit 82e2b86

Browse files
cccclaifacebook-github-bot
authored andcommitted
Enable pybind with mps
Summary: install executorch with mps ``` ./install_executorch.sh --pybind mps ``` test the mps .pte file can run with ``` executorch_module = _load_for_executorch(filename) out = executorch_module.forward(list(inputs)) print("output: ", out) ``` Differential Revision: D69497059
1 parent ee7d388 commit 82e2b86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

install_executorch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def main(args):
165165
if pybind_arg == "training":
166166
CMAKE_ARGS += " -DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON"
167167
os.environ["EXECUTORCH_BUILD_TRAINING"] = "ON"
168+
elif pybind_arg == "mps":
169+
CMAKE_ARGS += " -DEXECUTORCH_BUILD_MPS=ON"
168170
else:
169171
CMAKE_ARGS += f" -DEXECUTORCH_BUILD_{pybind_arg.upper()}=ON"
170172
EXECUTORCH_BUILD_PYBIND = "ON"

0 commit comments

Comments
 (0)