Skip to content

[ROCm] improve concurrency between compute and nccl streams - #31481

Merged
tensorflow-copybara merged 1 commit into
tensorflow:masterfrom
ROCm:google_upstream_nccl_event
Aug 12, 2019
Merged

tensorflow-copybara merged 1 commit into
tensorflow:masterfrom
ROCm:google_upstream_nccl_event

Conversation

@jeffdaily

Copy link
Copy Markdown
Contributor

The NcclManager records and waits on an Event as each Participant is added,
rather than synchronizing with the compute stream only after all Participants
have been added. Otherwise, most compute kernels are added to the compute
stream prior to the NCCL sync Event, delaying the start of the collective.

The NcclManager records and waits on an Event as each Participant is added,
rather than synchronizing with the compute stream only after all Participants
have been added. Otherwise, most compute kernels are added to the compute
stream prior to the NCCL sync Event, delaying the start of the collective.
@jeffdaily
jeffdaily requested a review from chsigg as a code owner August 9, 2019 15:51
@tensorflow-bot tensorflow-bot Bot added the size:S CL Change Size: Small label Aug 9, 2019
@jeffdaily jeffdaily changed the title improve concurrency between compute and nccl streams [ROCm] improve concurrency between compute and nccl streams Aug 9, 2019
@whchung whchung added the kokoro:force-run Tests on submitted change label Aug 9, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Aug 9, 2019
@rthadur rthadur self-assigned this Aug 9, 2019
@rthadur rthadur added the comp:gpu GPU related issues label Aug 9, 2019
@tensorflow-bot tensorflow-bot Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Aug 12, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Aug 12, 2019
@rthadur rthadur added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Aug 12, 2019
@tensorflow-copybara
tensorflow-copybara merged commit 7dbb5dd into tensorflow:master Aug 12, 2019
tensorflow-copybara pushed a commit that referenced this pull request Aug 12, 2019
@jeffdaily
jeffdaily deleted the google_upstream_nccl_event branch December 20, 2019 17:37
@ppwwyyxx

ppwwyyxx commented Jul 13, 2020 •

Copy link
Copy Markdown
Contributor

I can reliably reproduce a training failure (network produces NaNs after 5~20min of training) with this PR and the failure does not appear when using the commit before this PR.
My training setup is quite complicated so before working with someone to reproduce it, I'm looking for some ideas on why this PR may affect my training and how I may do some debugging myself.

The way my training use nccl is:

  • I'm on a DGX with 8 V100s
  • NcclAllReduce is the only nccl op I'm using (and I do it with the python API nccl_ops.all_sum. This is different from the other op "CollectiveReduce" which also ends up using nccl.
  • If I rewrite nccl_ops.all_sum in my code by using collective_ops.all_reduce (with the ring algorithm but not nccl), the failure seems to disappear (I'll run more tests to verify)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes comp:gpu GPU related issues ready to pull PR ready for merge process size:S CL Change Size: Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants