From 23143f3c818f01300700feb57a769d20c8d5f6af Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Wed, 3 Jul 2024 16:01:36 -0700 Subject: [PATCH] Link MPS and CoreML delegate library into portable_lib (#4040) Summary: As titled. MPS and CoreML should be linked into portable_lib on mac. Pull Request resolved: https://github.com/pytorch/executorch/pull/4040 Test Plan: See CI job works? Reviewed By: dbort Differential Revision: D59351891 Pulled By: larryliu0820 fbshipit-source-id: 2d551b84b1fd09995ef3cbf0594b2e1b46854276 --- README-wheel.md | 1 + build/packaging/env_var_script_m1.sh | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README-wheel.md b/README-wheel.md index 1ba8c6fa0df..e04e6dfa6d9 100644 --- a/README-wheel.md +++ b/README-wheel.md @@ -17,6 +17,7 @@ restrictions: * Only the [XNNPACK backend delegate](https://pytorch.org/executorch/main/native-delegates-executorch-xnnpack-delegate.html) is linked into the prebuilt module +* [macOS only] [Core ML](https://pytorch.org/executorch/main/build-run-coreml.html) and [MPS](https://pytorch.org/executorch/main/build-run-mps.html) backend delegates are linked into the prebuilt module. Please visit the [ExecuTorch website](https://pytorch.org/executorch/) for tutorials and documentation. Here are some starting points: diff --git a/build/packaging/env_var_script_m1.sh b/build/packaging/env_var_script_m1.sh index 44ebd93ec9c..da1192455f6 100644 --- a/build/packaging/env_var_script_m1.sh +++ b/build/packaging/env_var_script_m1.sh @@ -20,7 +20,5 @@ export CMAKE_ARGS="${CMAKE_ARGS:-}" CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_XNNPACK=ON" # When building for macOS, link additional backends into the pybindings runtime. - -# TODO(dbort): Make these build properly in the CI environment. -# CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_COREML=ON" -# CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_MPS=ON" +CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_COREML=ON" +CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_MPS=ON"