-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Export libtorch_cuda.so to be public #137693
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137693
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ab3b81d with merge base 5c3ba6f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@malfet could you help review this PR? |
|
@malfet Sorry for this. Just a reminder in case this series PR is ignored. |
|
@malfet May I know if this code change is reasonable to you? |
I still don't understand, what problem this PR is trying to solve? Can you please add a regression test or something? TORCH_LIBRARY should only contain reference to libtorch, which is a proxy library for both |
|
I go through the CMake code again. In my understanding, these pieces of code seem to find all libs related to torch such as |
There are two use-cases in my mind:
|
|
Do you mean if C++ user would like to use some APIs provided by |
Stack from ghstack (oldest at bottom):
Motivation
fix #137694,
libtroch_cuda.sois missing inTORCH_LIBRARIESandTORCH_CUDA_LIBRARIESin PyTorch CMakeIf build flag
BUILD_SHARED_LIBSis disabled,libtorch_cuda.sowill be added intoTORCH_LIBRARIEShereIf build flag
BUILD_SHARED_LIBSis enabled,libtorch_cuda,sois missing hereAdditional Context
find_library(TORCH_CUDA_LIBRARYintends to exportlibtorch_cuda.sotoTORCH_LIBRARIES.Why do we prefer
find_library(TORCH_CUDA_LIBRARYinstead ofappend_torchlib_if_found?append_torchlib_if_founddoesn't updateTORCH_CUDA_LIBRARIES. And we expectlibtorch_cuda.soto be added to bothTORCH_CUDA_LIBRARIESandTORCH_LIBRARIESto facilitate user experience.cc @malfet @seemethere @ptrblck @msaroufim