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

Optimize preprocess for ragged batching #4942

Merged
merged 5 commits into from Jan 13, 2024
Merged

Conversation

tohtana
Copy link
Contributor

@tohtana tohtana commented Jan 12, 2024

This PR improves efficiency of preprocessing for ragged batching.

It is not efficient to iterate substituting values to tensor slices or copy/fill calls for small numbers of values. This PR records the values in python lists or primitives and copy them at once.

@mrwyattii mrwyattii merged commit d0b238a into master Jan 13, 2024
8 checks passed
@mrwyattii mrwyattii deleted the tohtana/optimize_form_batch branch January 13, 2024 01:59
mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Feb 17, 2024
This PR improves efficiency of preprocessing for ragged batching.

It is not efficient to iterate substituting values to tensor slices or
copy/fill calls for small numbers of values. This PR records the values
in python lists or primitives and copy them at once.

---------

Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.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.

None yet

2 participants