Skip to content

[MPS] Fix executor_runner_mps and mpsdelegate linking with pybind #3248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

pytorchbot
Copy link
Collaborator

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

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)
Copy link

pytorch-bot bot commented Apr 23, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3248

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d5ec4a3 with merge base d3326a2 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 23, 2024
@guangy10
Copy link
Contributor

There are trunk failures you need to fix

@cccclai
Copy link
Contributor

cccclai commented Apr 23, 2024

There are trunk failures you need to fix

I think that's unrelated - rerun one job and that passes. Will rerun the other job

@cccclai
Copy link
Contributor

cccclai commented Apr 23, 2024

all jobs pass after rerun

@guangy10 guangy10 merged commit b045b3c into release/0.2 Apr 23, 2024
87 checks passed
@mergennachin mergennachin mentioned this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants