Add EXECUTORCH_SEPARATE_FLATCC_HOST_PROJECT cmake option#3356
Add EXECUTORCH_SEPARATE_FLATCC_HOST_PROJECT cmake option#3356dbort wants to merge 1 commit intopytorch:mainfrom
Conversation
Currently, we always build two copies of the flatcc targets, just in case we happen to be cross-compiling. But because the flatcc project puts its binaries in the source directory, those two copies can interfere with each other. We don't need to build two copies when not cross-compiling, so add a new option to avoid the second "host" build. Eventually we should only enable this when cross-compiling, but for now disable it when building the pip package (which is never cross-compiled). Test Plan: `rm -rf pip-out && ./install_requirements.sh` succeeded. Looking in the `pip-out/temp.*/cmake-out` directory, there is no `_host_build` directory, but the etdump headers were successfully generated under `pip-out/temp.*/cmake-out/sdk/include/executorch/sdk/etdump/`.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3356
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 15aadf1 with merge base 8fcba36 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
larryliu0820
left a comment
There was a problem hiding this comment.
ok for now. I'm curious if there's a smarter way to determine the option without user providing a value.
That's the "TODO(dbort): Only enable this when cross-compiling." part. We should be able to detect whether or not we're cross-compiling. |
|
@pytorchbot cherry-pick --onto release/0.2 -c release |
Summary: Currently, we always build two copies of the flatcc targets, just in case we happen to be cross-compiling. But because the flatcc project puts its binaries in the source directory, those two copies can interfere with each other. We don't need to build two copies when not cross-compiling, so add a new option to avoid the second "host" build. Eventually we should only enable this when cross-compiling, but for now disable it when building the pip package (which is never cross-compiled). Pull Request resolved: pytorch#3356 Test Plan: `rm -rf pip-out && ./install_requirements.sh` succeeded. Looking in the `pip-out/temp.*/cmake-out` directory, there is no `_host_build` directory, but the etdump headers were successfully generated under `pip-out/temp.*/cmake-out/sdk/include/executorch/sdk/etdump/`. Reviewed By: malfet, larryliu0820 Differential Revision: D56582507 Pulled By: dbort fbshipit-source-id: 4ce6c680657bc57cfcf016826364a3f46c4c953e
Summary: Currently, we always build two copies of the flatcc targets, just in case we happen to be cross-compiling. But because the flatcc project puts its binaries in the source directory, those two copies can interfere with each other. We don't need to build two copies when not cross-compiling, so add a new option to avoid the second "host" build. Eventually we should only enable this when cross-compiling, but for now disable it when building the pip package (which is never cross-compiled). Pull Request resolved: #3356 Test Plan: `rm -rf pip-out && ./install_requirements.sh` succeeded. Looking in the `pip-out/temp.*/cmake-out` directory, there is no `_host_build` directory, but the etdump headers were successfully generated under `pip-out/temp.*/cmake-out/sdk/include/executorch/sdk/etdump/`. Reviewed By: malfet, larryliu0820 Differential Revision: D56582507 Pulled By: dbort fbshipit-source-id: 4ce6c680657bc57cfcf016826364a3f46c4c953e
Currently, we always build two copies of the flatcc targets, just in case we happen to be cross-compiling. But because the flatcc project puts its binaries in the source directory, those two copies can interfere with each other.
We don't need to build two copies when not cross-compiling, so add a new option to avoid the second "host" build.
Eventually we should only enable this when cross-compiling, but for now disable it when building the pip package (which is never cross-compiled).
Test Plan:
rm -rf pip-out && ./install_requirements.shsucceeded. Looking in thepip-out/temp.*/cmake-outdirectory, there is no_host_builddirectory, but the etdump headers were successfully generated underpip-out/temp.*/cmake-out/sdk/include/executorch/sdk/etdump/.