-
Notifications
You must be signed in to change notification settings - Fork 26k
cmake: allow to build pytorch as a CMake subproject #110373
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
cmake: allow to build pytorch as a CMake subproject #110373
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110373
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 58408c2 with merge base 06464a3 ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "topic: not user facing" |
|
@pytorchbot drci |
|
cc @albanD who helped me get my last PyTorch contribution in |
|
It would be nice to add some trivial unittest (that just runs cmake on a project that lists pytorch as a subproject) |
|
@pytorchbot rebase |
@anthonyalayo your branch is 3000 commits behind |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
677dab7 to
58408c2
Compare
Nice catch, didn't realize I didn't update my fork.
I'll do that next, thanks @malfet |
|
@pytorchbot drci |
|
@malfet I started writing the test, but it takes a pretty long time to fetch and build since it pulls in PyTorch itself. Is that alright to have as something that runs on CI? I'm basing the test off of this one: Unlike that one though, since we are testing that ExternalProject_Add() works, we can't leverage the build that gets generated through the python test script. |
|
@malfet any thoughts on that last comment? |
malfet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to the 3 CMakeLists.txt and Codegen.cmake looks fine to me
|
@anthonyalayo thank you for the updates, looks good to me if trunk and binary builds are passing. |
|
Looks like everything test clean, good to merge? |
|
@malfet can we start the merge? thanks! |
|
@malfet any thoughts? |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |

This is a re-attempt of fixing #53980, first submitted in #54978.
Quoting @SpaceIm
cc @mcarilli @ptrblck @leslie-fang-intel @jgong5