Skip to content
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

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

Closed

Conversation

DenisVieriu97
Copy link
Collaborator

@DenisVieriu97 DenisVieriu97 commented Apr 22, 2024

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

Copy link

pytorch-bot bot commented Apr 22, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 36c474a with merge base 9d2af4c (image):

NEW FAILURE - The following job has failed:

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 22, 2024
@DenisVieriu97 DenisVieriu97 changed the title Fix executor_runner_mps and mpsdelegate linking with pybind; add mult… [MPS] Fix executor_runner_mps and mpsdelegate linking with pybind Apr 22, 2024
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cccclai merged this pull request in 6c30eea.

@cccclai
Copy link
Contributor

cccclai commented Apr 23, 2024

@pytorchbot cherry-pick --onto release/0.2 -c regression

pytorchbot pushed a commit that referenced this pull request Apr 23, 2024
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)
@pytorchbot
Copy link
Collaborator

Cherry picking #3222

The cherry pick PR is at #3248 and it is recommended to link a regression cherry pick PR with an issue

Details for Dev Infra team Raised by workflow job

guangy10 pushed a commit that referenced this pull request Apr 23, 2024
…3248)

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)

Co-authored-by: Denis Vieriu <dvieriu@apple.com>
This was referenced Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants