-
Notifications
You must be signed in to change notification settings - Fork 626
Use CMake EXPORT #8954
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
base: main
Are you sure you want to change the base?
Use CMake EXPORT #8954
Conversation
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8954
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit db7c3cd with merge base 8d57c95 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
The CMake EXPORT feature seems like it's supposed to make target_compile_options etc. work nicely for both in-project builds and also projects that consume your project by installing it and finding it with find_package. Using EXPORT would make it easy to have similar behavior to Buck's exported_preprocessor_flags, for example. Unfortunately, I am currently stalled here by XNNPACK's lack of use of EXPORT. I tried working around dependencies that don't use EXPORT by re-installing them with EXPORT ourselves, but XNNPACK has rather a lot so I'm sending this out to highlight the problem and ask if there's another way. I found some similar issues in TFLite: tensorflow/tensorflow#57658 tensorflow/tensorflow#87172 ghstack-source-id: e3e5b36 ghstack-comment-id: 2699501745 Pull Request resolved: #8954
have an update cooking, need to make sure check whether warnings I'm seeing about macOS version mismatch during install_executorch.sh are new and if so problematic |
The CMake EXPORT feature seems like it's supposed to make target_compile_options etc. work nicely for both in-project builds and also projects that consume your project by installing it and finding it with find_package. Using EXPORT would make it easy to have similar behavior to Buck's exported_preprocessor_flags, for example. Unfortunately, I am currently stalled here by XNNPACK's lack of use of EXPORT. I tried working around dependencies that don't use EXPORT by re-installing them with EXPORT ourselves, but XNNPACK has rather a lot so I'm sending this out to highlight the problem and ask if there's another way. I found some similar issues in TFLite: tensorflow/tensorflow#57658 tensorflow/tensorflow#87172 ghstack-source-id: f1615a2 ghstack-comment-id: 2699501745 Pull Request resolved: #8954
…t failure for the EXPORT PR [ghstack-poisoned]
…t failure for the EXPORT PR [ghstack-poisoned]
…t failure for the EXPORT PR [ghstack-poisoned]
The CMake EXPORT feature seems like it's supposed to make target_compile_options etc. work nicely for both in-project builds and also projects that consume your project by installing it and finding it with find_package. Using EXPORT would make it easy to have similar behavior to Buck's exported_preprocessor_flags, for example. Unfortunately, I am currently stalled here by XNNPACK's lack of use of EXPORT. I tried working around dependencies that don't use EXPORT by re-installing them with EXPORT ourselves, but XNNPACK has rather a lot so I'm sending this out to highlight the problem and ask if there's another way. I found some similar issues in TFLite: tensorflow/tensorflow#57658 tensorflow/tensorflow#87172 ghstack-source-id: efb6f61 ghstack-comment-id: 2699501745 Pull Request resolved: #8954
This is getting very close to green CI if it's not there already, so marking ready for review. |
[ghstack-poisoned]
[ghstack-poisoned]
looks like ARM size tests need their bump increased and otherwise this looks very promising |
[ghstack-poisoned]
[ghstack-poisoned]
finally 100% green CI! |
The CMake EXPORT feature makes target_compile_options/target_link_libraries etc. work nicely for both in-project builds and also projects that consume your project by installing it and finding it with find_package. We are currently working around our lack of EXPORT by (incompletely and therefore incorrectly!) repeating our configuration in tools/cmake/executorch-config.cmake.
I was previously stalled here by XNNPACK's lack of use of EXPORT, but I discovered that I simply wasn't being thorough enough with installing/exporting the entire target graph.
Note that this diff raises the size test thresholds. This is because previously the size test wasn't including prim op registration, and this diff effectively fixes builds using find_package to always include that.