Skip to content

bugfix: fix mtp worker empty run issue for deepseek dp.#1008

Merged
phantomlei3 merged 1 commit intojd-opensource:mainfrom
phantomlei3:bugfix/mtp-dp-empty-run
Mar 7, 2026
Merged

bugfix: fix mtp worker empty run issue for deepseek dp.#1008
phantomlei3 merged 1 commit intojd-opensource:mainfrom
phantomlei3:bugfix/mtp-dp-empty-run

Conversation

@phantomlei3
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a bug related to handling empty runs in a data-parallel setup for MTP workers. The changes introduce necessary checks to gracefully handle cases where a worker receives no sequences to process. In mtp_worker_impl.cpp, a guard is added to update_input_by_last_step_output to exit early if there are no sequences or embedding IDs. Similarly, in worker_impl.cpp, step_async is updated to verify that there are tokens to process before attempting to update the input. These changes appear to be a correct and robust solution for the issue. I have reviewed the changes and found no issues of high or critical severity.

@phantomlei3 phantomlei3 merged commit 47f87a5 into jd-opensource:main Mar 7, 2026
18 of 45 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.

4 participants