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 1 commit 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.

❌ 2 New Failures

As of commit ff128f7 with merge base 52a3a9a (image):

NEW FAILURES - The following jobs have failed:

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
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@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)

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