cmake: introduce USE_SYSTEM_* flags#1859
Conversation
✅ Deploy Preview for pytorch-fbgemm-docs canceled.
|
|
@q10 I see that you've worked with the CMake in this repo before, would you have the bandwidth to review this? |
0fd8f32 to
a78f826
Compare
Yes I can. Let me run it through the OSS CI system before reviewing this more thoroughly on Monday. |
|
Much appreciated! And any insight on changes I'd need to make for the GPU variant would be awesome :) |
a78f826 to
465f924
Compare
|
@q10 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
b08bac7 to
2a0fb67
Compare
|
@q10 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
As a followup, any thoughts on offering an I know that Although, I'm not very proficient in writing or interpreting CMake, so that may be working as intended or a best practice. |
I think it's a good idea to offer an I'm looking at the CI builds, and it appears that the CMake changes made in this PR have broken all the CMake-based builds of FBGEMM (see here)... |
ff1ed83 to
93cdf9b
Compare
|
@q10 would you mind triggering CI again to see if it's fixed? |
Looks to be broken still :( |
9f635c8 to
eea5f2a
Compare
87b615c to
8dc96b9
Compare
|
Alrighty, @q10 would you mind running the CI again? |
|
bumping this thread. |
|
Hi @ConnorBaker, if there is still desire to land this PR, could you rebase it onto latest main? |
|
Im happy to help if @ConnorBaker is no longer interested. |
|
@ConnorBaker I have rebased and fixed merge conflicts if you can give me access to push to your repo |
|
@BwL1289 you should have access now, thank you! |
8dc96b9 to
4c2ea7b
Compare
✅ Deploy Preview for pytorch-fbgemm-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@ConnorBaker thanks! Just pushed and synced the last few commits. @q10 let us know if you can run CI again. |
|
@q10 bump |
|
@q10 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Ths diff appears to break linux and macos builds - see https://github.com/pytorch/FBGEMM/actions/runs/14775835150/job/41508826517?pr=1859 for example |
|
@ConnorBaker hate to ask, but any idea? Possibly something in this block but not 100% # Ensure that we can include header files from the root directory.
target_include_directories(${TESTNAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..) |
|
I probably won’t have a chance to look at this again until next week :( |
|
No worries! Thanks Connor. |
|
@ConnorBaker FYI I opened a PR on your branch to attempt to fix the |
Similar to the work done in pytorch/pytorch#37137, this adds the following CMake options:
USE_SYSTEM_LIBSUSE_SYSTEM_ASMJITUSE_SYSTEM_CPUINFOUSE_SYSTEM_GOOGLETESTThis is particularly useful in the context of Nix, where we can build these libraries once and then re-use them elsewhere to avoid rebuilding vendors dependencies.
I'm unsure of how to best enable this for
fbgemm_gpu.What's the relationship between FBGEMM and
libtorch? Doeslibtorchrequirefbgemm,fbgemm_gpu, or both?