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

Make the order of outputs the same as the order of inputs when using mii.pipeline #384

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

s-jse
Copy link
Contributor

@s-jse s-jse commented Jan 22, 2024

When doing batch inference using the "Non-Persistent Pipeline" method, i.e. using mii.pipeline, the order of outputs is arbitrary, and has no correlation with the order of inputs. This becomes especially obvious when the generated outputs are of varying lengths and therefore finish at different times.

In fact, printing the output if this line of code uids_complete_order.append(uids_running.index(uid)) would make it clear that it is incorrect, given that it outputs the same index multiple times.

I have tested this PR on a single GPU.

@mrwyattii
Copy link
Contributor

Thank you @s-jse for this fix!

@mrwyattii mrwyattii merged commit 1d2654d into deepspeedai:main Jan 24, 2024
2 checks passed
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