Skip to content
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

Have FutureNCCL record streams w/ allocator in addCallback #48496

Closed
wants to merge 8 commits into from

Conversation

lw
Copy link
Contributor

@lw lw commented Nov 26, 2020

Stack from ghstack:

This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).


There are two ways to add a callback to a Future: then and addCallback (with the former deferring to the latter). FutureNCCL only "patched" then, which caused addCallback to be unsupported. By patching addCallback, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from then, and move it to either markCompleted or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: D25177558

This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
Copy link
Contributor

@mrshenli mrshenli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
@lw lw mentioned this pull request Nov 29, 2020
This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Nov 29, 2020

💊 CI failures summary and remediations

As of commit b4bd461 (more details on the Dr. CI page):


  • 2/2 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_bazel_build (1/1)

Step: "Bazel Build" (full log | diagnosis details | 🔁 rerun)

Dec 09 15:30:16 sccache: error: couldn't connect to server
Dec 09 15:30:16 +++ eval 'extract_trap_cmd ' 
Dec 09 15:30:16 ++++ extract_trap_cmd 
Dec 09 15:30:16 ++++ printf '%s\n' '' 
Dec 09 15:30:16 +++ printf '%s\n' cleanup 
Dec 09 15:30:16 ++ trap -- ' 
Dec 09 15:30:16 cleanup' EXIT 
Dec 09 15:30:16 ++ [[ pytorch-linux-xenial-py3.6-gcc7-bazel-build != *pytorch-win-* ]] 
Dec 09 15:30:16 ++ which sccache 
Dec 09 15:30:16 ++ sccache --stop-server 
Dec 09 15:30:16 Stopping sccache server... 
Dec 09 15:30:16 sccache: error: couldn't connect to server 
Dec 09 15:30:16 sccache: caused by: Connection refused (os error 111) 
Dec 09 15:30:16 ++ true 
Dec 09 15:30:16 ++ rm /var/lib/jenkins/sccache_error.log 
Dec 09 15:30:16 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Dec 09 15:30:16 ++ true 
Dec 09 15:30:16 ++ [[ pytorch-linux-xenial-py3.6-gcc7-bazel-build == *rocm* ]] 
Dec 09 15:30:16 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Dec 09 15:30:16 ++ SCCACHE_IDLE_TIMEOUT=1200 
Dec 09 15:30:16 ++ RUST_LOG=sccache::server=error 
Dec 09 15:30:16 ++ sccache --start-server 

1 failure not recognized by patterns:

Job Step Action
CircleCI docker-pytorch-linux-bionic-cuda10.2-cudnn7-py3.6-clang9 Check if image should be built 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 15 times.

This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
This commit is part of a stack that reworks FutureNCCL in order to extract a generic CUDA-aware Future subclass. The stack deliberately breaks up this transition into elementary changes, to make it easier to verify that the behavior is preserved (or to highlight how it gets changed).

---

There are two ways to add a callback to a Future: `then` and `addCallback` (with the former deferring to the latter). FutureNCCL only "patched" `then`, which caused `addCallback` to be unsupported. By patching `addCallback`, on the other hand, we cover both.

The high-level goal of this change though is to remove all CUDA-specific stuff from `then`, and move it to either `markCompleted` or to a wrapper around the callback. This will take a few more steps to achieve.

Differential Revision: [D25177558](https://our.internmc.facebook.com/intern/diff/D25177558/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in e4267eb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants