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

Improve performance of sequence parallel gather, scatter, and reduce #1263

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

bclyang
Copy link
Contributor

@bclyang bclyang commented Aug 22, 2024

Improve the performance of sequence parallel gather, scatter, and reduce by using reduce_scatter_tensor and all_gather_into_tensor when possible.

WandB before: https://wandb.ai/brandony/neox/runs/wcim8pf6?nw=nwuserbrandony
WandB after: https://wandb.ai/brandony/neox/runs/gkaoomq5?nw=nwuserbrandony

From the plot, goes from 15.7e12 flops to 17.3e12 flops, with baseline at 18e12 flops.
image

@haileyschoelkopf haileyschoelkopf merged commit 1661db6 into 812-megatron-seq-parallel Aug 22, 2024
2 checks passed
@haileyschoelkopf haileyschoelkopf deleted the improve-seq-parallel-perf branch August 22, 2024 11:58
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.

2 participants