Skip to content

Commit d5ec4a3

Browse files
DenisVieriu97pytorchbot
authored andcommitted
Fix executor_runner_mps and mpsdelegate linking with pybind (#3222)
Summary: Summary of changes: - fixes mps_executor_runner build - previously it would fail to build previously due to incorrect linking with portable ops - fixes `mpsdelegate` linking with `pybind` lib - added tests to check correctness directly through pybind - added a helper file (`bench_utils.py`) to help measure models forward pass between PyTorch MPS and ExecuTorch MPS Testing (will run both AOT and runtime if MPS was built with pybind): - `./install_requirements.sh --pybind mps` - invoke a single unit test: `python3 -m unittest backends.apple.mps.test.test_mps_indexing_ops -v -k test_mps_indexing_get_1`. - invoke all tests from a file: `python3 -m unittest backends.apple.mps.test.test_mps_indexing_ops -v` cc cccclai , shoumikhin Pull Request resolved: #3222 Reviewed By: shoumikhin Differential Revision: D56447888 Pulled By: cccclai fbshipit-source-id: 5cbbcbf8df34f29e23a1854df72f764337a9df76 (cherry picked from commit 6c30eea)
1 parent 1ba292a commit d5ec4a3

File tree

9 files changed

+1011
-308
lines changed

9 files changed

+1011
-308
lines changed

backends/apple/mps/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ target_link_libraries(mpsdelegate
7777
${MPS_GRAPG_FRAMEWORK}
7878
)
7979

80+
target_link_options_shared_lib(mpsdelegate)
81+
target_compile_options(mpsdelegate PUBLIC ${_common_compile_options})
82+
8083
install(
8184
TARGETS mpsdelegate
8285
DESTINATION lib

0 commit comments

Comments
 (0)