Skip to content

Add EXECUTORCH_SEPARATE_FLATCC_HOST_PROJECT cmake option #3356

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

Closed
wants to merge 1 commit into from

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Apr 25, 2024

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/.

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/`.
Copy link

pytorch-bot bot commented Apr 25, 2024

🔗 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 Failures

As of commit 15aadf1 with merge base 8fcba36 (image):
💚 Looks good so far! There are no failures yet. 💚

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 25, 2024
@dbort dbort requested review from larryliu0820 and tarun292 April 25, 2024 17:19
@dbort dbort mentioned this pull request Apr 25, 2024
@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@larryliu0820 larryliu0820 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for now. I'm curious if there's a smarter way to determine the option without user providing a value.

@dbort
Copy link
Contributor Author

dbort commented Apr 25, 2024

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.

@dbort
Copy link
Contributor Author

dbort commented Apr 25, 2024

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

@facebook-github-bot
Copy link
Contributor

@dbort merged this pull request in 80d72f2.

@dbort dbort deleted the flatcc-host branch April 25, 2024 17:54
dbort added a commit to dbort/executorch that referenced this pull request Apr 25, 2024
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
dbort added a commit that referenced this pull request Apr 25, 2024
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
@mergennachin mergennachin mentioned this pull request Apr 26, 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.

5 participants