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:
|
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_ARGSandCMAKE_BUILD_ARGSinto setup.py, throughinstall_requirements.sh.After this change, user can do:
Then we should be able to find
libxnnpack.aliboptimized_ops_lib.aetc under install dir.Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: