-
Notifications
You must be signed in to change notification settings - Fork 355
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
Extend setup cmake ability #3349
Conversation
Summary: For executorch users, we see a common pattern that they have to: ```bash bash install_requirements.sh --pybind xnnpack cmake -S . -Bcmake-out ... cmake --build ... ``` This is repeating cmake build twice, the first one is inside setup.py. Here I'm adding a way to allow setup.py to install the libraries seperately, by passing `CMAKE_ARGS` and `CMAKE_BUILD_ARGS` into setup.py, through `install_requirements.sh`. After this change, user can do: ```bash export CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=<install dir> \ -DEXECUTORCH_BUILD_OPTIMIZED=ON \ ..." export CMAKE_BUILD_ARGS="--target install" bash install_requirements.sh --pybind xnnpack ``` Then we should be able to find `libxnnpack.a` `liboptimized_ops_lib.a` etc under install dir. Test Plan: Reviewers: Subscribers: Tasks: Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3349
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b9500e2 with merge base 590cbce (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
It seems ok to add the BUILD_ARGS to setup.py, but setup.oy should only be used to build the pip package. The comments in the PR seem to use it as a driver for installing files in other locations We should not depend on setup.py for that |
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@larryliu0820 merged this pull request in 8ec0af9. |
Summary:
For executorch users, we see a common pattern that they have to:
bash install_requirements.sh --pybind xnnpack cmake -S . -Bcmake-out ... cmake --build ...
This is repeating cmake build twice, the first one is inside setup.py.
Here I'm adding a way to allow setup.py to install the libraries seperately, by passing
CMAKE_ARGS
andCMAKE_BUILD_ARGS
into setup.py, throughinstall_requirements.sh
.After this change, user can do:
Then we should be able to find
libxnnpack.a
liboptimized_ops_lib.a
etc under install dir.Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: