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

[transformer] Allow for skipping stream synch #1505

Merged
merged 9 commits into from
Oct 12, 2022

Conversation

crcrpar
Copy link
Collaborator

@crcrpar crcrpar commented Oct 6, 2022

Optionally disable stream synchronization after batched p2p communication

exported from nvcr.io/nvidia/pytorch:22.09-py3 container with some test cases

cc @eqy @Aidyn-A @ptrblck @Fuzzkatt

@crcrpar crcrpar marked this pull request as draft October 6, 2022 18:54
only when pytorch/pytorch#82450 is included in
pytorch.

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Copy link
Collaborator

@Aidyn-A Aidyn-A left a comment

Choose a reason for hiding this comment

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

Sorry, one of my latest PRs created a confusion is test naming. I prefer using test_learning and test_inference for more (subjectively) convenient usage when running the tests. So I made several suggestions for them. Everything else looks good to me 👍

crcrpar and others added 4 commits October 6, 2022 12:50
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
@crcrpar crcrpar marked this pull request as ready for review October 6, 2022 20:17
@crcrpar crcrpar requested a review from Aidyn-A October 6, 2022 20:17
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
@crcrpar
Copy link
Collaborator Author

crcrpar commented Oct 12, 2022

on DGX A100, python tests/L0/run_test.py --include run_transformer encountered out of memory error and interleaving cases failed, while (python|pytest) tests/L0/run_transformer/test_pipeline_parallel_fwd_bwd.py not. So this PR looks unrelated.

@crcrpar crcrpar merged commit 806f9b0 into NVIDIA:master Oct 12, 2022
@crcrpar crcrpar deleted the optionally_skip_sync_after_p2p branch October 12, 2022 00:31
@crcrpar crcrpar added this to the 22.09 milestone Oct 25, 2022
hubertlu-tw pushed a commit to ROCm/apex that referenced this pull request Dec 29, 2022
* Optionally disable stream synchronization after batched p2p communication

* Add test cases with `sync_batch_comm=False`

only when pytorch/pytorch#82450 is included in
pytorch.

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* utilize existing test methods

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* consistent naming

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>

* silly boy, to skip the sync, set False

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* cosmetic

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* Test with async_pipelinign w/o sync after batch_isend_irecv

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* again, set sync_batch_comm to False

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>

* Remove `torch.testing._internal.common_cuda`

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Sangkug Lym <slym@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>
yuanzhedong pushed a commit to yuanzhedong/apex that referenced this pull request Jul 14, 2023
* Optionally disable stream synchronization after batched p2p communication

* Add test cases with `sync_batch_comm=False`

only when pytorch/pytorch#82450 is included in
pytorch.

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* utilize existing test methods

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* consistent naming

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>

* silly boy, to skip the sync, set False

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* cosmetic

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* Test with async_pipelinign w/o sync after batch_isend_irecv

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

* again, set sync_batch_comm to False

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>

* Remove `torch.testing._internal.common_cuda`

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: Sangkug Lym <slym@nvidia.com>
Co-authored-by: Aidyn-A <Aidyn-A@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants