-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Move at::{Refcounted,}MapAllocator to c10 #109881
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
libshm.so depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109881
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 2e1530c with merge base 625a3b1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
|
||
C10_API std::string NewProcessWideShmHandle(); | ||
|
||
class C10_API MapAllocator { |
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.
These diffs are a mess, but it's mostly just a copy paste of the aten files with aten
changed to c10
. However, with the linter changes, it's too big of a diff for git to recognize as a simple rename. This is clearer in the commit-level diffs.
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.
Ho very nice cleanup!
I'll verify that all build are good and then merge this.
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
Successfully rebased |
libshm.so depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. ghstack-source-id: 198c9ee Pull Request resolved: #109881
I can't import this so yolo @pytorchbot merge -r |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
Successfully rebased |
libshm.so depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. ghstack-source-id: 7b78056 Pull Request resolved: #109881
@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 |
@pytorchbot revert -m "breaking internal builds, undefined symbol: _ZN3c1022RefcountedMapAllocator6decrefEv" -c ghfirst |
@peterbell10 You probably need someone from Meta to help re-landing this. |
@pytorchbot successfully started a revert job. Check the current status here. |
@peterbell10 your PR has been successfully reverted. |
This reverts commit 68a1219. Reverted #109881 on behalf of https://github.com/kit1980 due to breaking internal builds, undefined symbol: _ZN3c1022RefcountedMapAllocator6decrefEv ([comment](#109881 (comment)))
preprocessor_flags = ['-DC10_BUILD_MAIN_LIB'], | ||
preprocessor_flags = [ | ||
'-DC10_BUILD_MAIN_LIB', | ||
'-DHAVE_MMAP=1', |
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.
undefined symbol: _ZN3c1022RefcountedMapAllocator6decrefEv"
I had the same error in the bazel build when HAVE_MMAP
wasn't being defined. Is it possible there is another build definition that needs the flag added?
If so, does that mean we have 4 completely unrelated build definitions: CMake, bazel, buck (oss), buck (internal)?
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.
@peterbell10 unfortunately it's even more than 4: more than 1 internal buck.
But they are not completely unrelated: all of them are supposed to use build.bzl files (like https://github.com/pytorch/pytorch/blob/main/c10/build.bzl), but it's only implemented for some things so far.
For this particular case, likely https://github.com/pytorch/pytorch/blob/main/c10/ovrsource_defs.bzl needs to be updated. But someone from Meta should work with you on this.
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
libshm.so depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. ghstack-source-id: 96dea8e Pull Request resolved: #109881
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. [ghstack-poisoned]
deps = select({ | ||
deps = [ | ||
"//third-party/rt", | ||
] + select({ |
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.
@kit1980 would you be able to help on the meta-internal side? I think this might fix it but not idea if it works.
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.
I can try but not today.
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.
@kit1980 any updates on this?
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.
ping @kit1980
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.
I'll look today.
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Rebase failed due to Command
Raised by https://github.com/pytorch/pytorch/actions/runs/7279909983 |
@peterbell10 May I ask you to fix the conflicts? |
Okay, rebased and resubmitted as #116204 |
Stack from ghstack (oldest at bottom):
libshm.so
depends on the torch library exclusively forat::RefcountedMapAllocator
,so it makes sense to move it to c10 along with the other memory allocators.
This means
libshm.so
only depends onc10
and we don't need to relinklibshm.so
for every ATen change.