Skip to content
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

Bypass find_package(torch) for find_package_torch_headers to help out cross compilation #8629

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Feb 21, 2025

To be honest, I don't understand how the Android demo compiles currently. Indeed, it doesn't work on my Mac without this change, but with this change it does.

Should fix #8556

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Feb 21, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8629

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Unrelated Failure

As of commit 71ef8af with merge base f3fc096 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Feb 21, 2025
swolchok added a commit that referenced this pull request Feb 21, 2025
… cross compilation

To be honest, I don't understand how the Android demo compiles currently. This should make it more robust, but I'm submitting this as a draft and will wait until I have a concrete need for this.

ghstack-source-id: a984326e9f174405787f99ac1138afa710f8758e
ghstack-comment-id: 2675755240
Pull Request resolved: #8629
@swolchok swolchok marked this pull request as draft February 21, 2025 22:36
@swolchok
Copy link
Contributor Author

error message I was getting for posterity:

CMake Error at .etvenv/lib/python3.12/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Torch (missing: TORCH_LIBRARY)
Call Stack (most recent call first):
  .etvenv/lib/python3.12/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  .etvenv/lib/python3.12/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:175 (find_package_handle_standard_args)
  build/Utils.cmake:386 (find_package)
  build/Utils.cmake:344 (find_package_torch)
  CMakeLists.txt:628 (find_package_torch_headers)

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
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. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake Error missing TORCH_LIBRARY in Android Llama XNNPACK Demo Build
2 participants