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

Add rpath to libcustom_ops_aot_lib.dylib and libquantized_ops_aot_lib… #6499

Merged
merged 3 commits into from
Oct 26, 2024

Conversation

larryliu0820
Copy link
Contributor

@larryliu0820 larryliu0820 commented Oct 25, 2024

….dylib

Summary: As titled. This issue is from https://github.com/pytorch/torchchat/actions/runs/11523122333/job/32080481174?pr=1312

In that job when we try to load libcustom_ops_aot_lib.dylib into python, it complains that it can't find _portable_lib.cpython-310-darwin.so. This PR is trying to fix it by adding the relative path to _portable_lib.cpython-310-darwin.so into LC_RPATH.

Test Plan:

EXECUTORCH_BUILD_PYBIND=ON python setup.py bdist_wheel
rm -rf pip-out/
pip install dist/executorch-0.5.0a0+8222c24-cp310-cp310-macosx_11_0_arm64.whl
python -c "from executorch.extension.llm.custom_ops import sdpa_with_kv_cache"

Also see otool -l /executorch/extension/llm/custom_ops/libcustom_ops_aot_lib.dylib gives:

Load command 17
          cmd LC_RPATH
      cmdsize 48
         path @loader_path/../../pybindings (offset 12)

Reviewers:

Subscribers:

Tasks:

Tags:

….dylib

Summary: As titled. This issue is from https://github.com/pytorch/torchchat/actions/runs/11523122333/job/32080481174?pr=1312

In that job when we try to load `libcustom_ops_aot_lib.dylib` into python,
it complains that it can't find `_portable_lib.cpython-310-darwin.so`.
This PR is trying to fix it by adding the relative path to
`_portable_lib.cpython-310-darwin.so` into `LC_RPATH`.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented Oct 25, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Unrelated Failures

As of commit 9113c47 with merge base 5889cc3 (image):

NEW FAILURE - The following job has failed:

UNSTABLE - The following jobs failed but were likely due to flakiness present on trunk and has been marked as unstable:

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 Oct 25, 2024
@larryliu0820 larryliu0820 merged commit dc2e02a into main Oct 26, 2024
47 of 51 checks passed
@larryliu0820 larryliu0820 deleted the fix_pip_so branch October 26, 2024 00:39
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants