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 shard args in decentralized runtime #321

Merged
merged 4 commits into from
Feb 4, 2022
Merged

Conversation

ZYHowell
Copy link
Collaborator

@ZYHowell ZYHowell commented Feb 2, 2022

  • When using benchmark with dummy input, we now create and shard nonzero buffers on mesh workers instead of drivers. This makes 3x speedup, because eval_shape is surprisingly costly;
  • When an arg is a batch_arg and is split into microbatches, we now shard it to workers first and split it into microbatches on workers then. This makes #microbatchx speedup in most cases (the tensor is small but the number of microbatches is large).

@ZYHowell ZYHowell merged commit 4cc3083 into main Feb 4, 2022
@ZYHowell ZYHowell deleted the fix-attention-mask branch February 4, 2022 01:46
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.

None yet

1 participant