-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Enable standalone build of ATen #9377
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
|
cc @orionr |
|
Thanks for kicking off this conversation, @syed-ahmed! As you alluded to, we're looking to merge / refactor Caffe2 and ATen tensors, registry, and operators under a new c10 directory. Effectively aten/ will become c10/ (living at pytorch/c10/ or pytorch/caffe2/c10/ - still TBD) and support both PyTorch and Caffe2 frontends. @syed-ahmed, what is the use case where you need a separate ATen (and hopefully soon c10) build? We're definitely open to this (especially when c10 is mature), but I want to make sure what you're thinking is compatible with this new architectural split. In the meantime, we've stopped syncing to https://github.com/zdevito/ATen/ so it isn't impacted by the large changes coming. cc @dzhulgakov @ezyang and @smessmer as well. |
|
Thank you for the reply! I was just going by the readme and build ATen using cmake, since it mentioned of it being standalone. I like that ATen is standalone and I can build and test features without having to build from the root directory, but it's more of a personal choice. I don't currently have a use case for ATen/c10 to be standalone, but I have been poking around Tensor Comprehensions and it seems to have ATen as a dependency. |
facebook-github-bot
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.
@orionr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This PR changes the ATen `CMakeLists.txt` slightly, to enable standalone build of ATen inside PyTorch. Currently, the tests in ATen gets linked to `libcaffe.so libcaffe2.so`. As a result, ATen can't be built standalone without building from the root pytorch directory. I know that there is a big merge happening between caffe2 and pytorch and hence, the purpose of this PR is to really start a conversation on what would be the proper way of migrating the CMakeLists to enable clean builds. We should also follow up on this PR: pytorch/pytorch#7275. For your reference, that PR has the explanation for why `-Wl --no-as-need` is needed. Moreover, without `set(ATen_CUDA_SRCS ${all_cuda_cpp})`, the standalone build will throw unresolved references. Pull Request resolved: pytorch/pytorch#9377 Reviewed By: smessmer Differential Revision: D8825921 Pulled By: orionr fbshipit-source-id: c521159b4885639fc7990a9819202051455d07db
Summary: This PR changes the ATen `CMakeLists.txt` slightly, to enable standalone build of ATen inside PyTorch. Currently, the tests in ATen gets linked to `libcaffe.so libcaffe2.so`. As a result, ATen can't be built standalone without building from the root pytorch directory. I know that there is a big merge happening between caffe2 and pytorch and hence, the purpose of this PR is to really start a conversation on what would be the proper way of migrating the CMakeLists to enable clean builds. We should also follow up on this PR: pytorch/pytorch#7275. For your reference, that PR has the explanation for why `-Wl --no-as-need` is needed. Moreover, without `set(ATen_CUDA_SRCS ${all_cuda_cpp})`, the standalone build will throw unresolved references. Pull Request resolved: pytorch/pytorch#9377 Reviewed By: smessmer Differential Revision: D8825921 Pulled By: orionr fbshipit-source-id: c521159b4885639fc7990a9819202051455d07db
Summary: This PR changes the ATen `CMakeLists.txt` slightly, to enable standalone build of ATen inside PyTorch. Currently, the tests in ATen gets linked to `libcaffe.so libcaffe2.so`. As a result, ATen can't be built standalone without building from the root pytorch directory. I know that there is a big merge happening between caffe2 and pytorch and hence, the purpose of this PR is to really start a conversation on what would be the proper way of migrating the CMakeLists to enable clean builds. We should also follow up on this PR: pytorch#7275. For your reference, that PR has the explanation for why `-Wl --no-as-need` is needed. Moreover, without `set(ATen_CUDA_SRCS ${all_cuda_cpp})`, the standalone build will throw unresolved references. Pull Request resolved: pytorch#9377 Reviewed By: smessmer Differential Revision: D8825921 Pulled By: orionr fbshipit-source-id: c521159b4885639fc7990a9819202051455d07db
This PR changes the ATen
CMakeLists.txtslightly, to enable standalone build of ATen inside PyTorch. Currently, the tests in ATen gets linked tolibcaffe.so libcaffe2.so. As a result, ATen can't be built standalone without building from the root pytorch directory. I know that there is a big merge happening between caffe2 and pytorch and hence, the purpose of this PR is to really start a conversation on what would be the proper way of migrating the CMakeLists to enable clean builds. We should also follow up on this PR: #7275. For your reference, that PR has the explanation for why-Wl --no-as-needis needed. Moreover, withoutset(ATen_CUDA_SRCS ${all_cuda_cpp}), the standalone build will throw unresolved references.