Skip to content

refactor: remove negative condition when choosing decode or prefill#1475

Open
rauletorresc wants to merge 1 commit into
jd-opensource:mainfrom
rauletorresc:rauletorresc-patch-002
Open

refactor: remove negative condition when choosing decode or prefill#1475
rauletorresc wants to merge 1 commit into
jd-opensource:mainfrom
rauletorresc:rauletorresc-patch-002

Conversation

@rauletorresc
Copy link
Copy Markdown
Contributor

Improve readability by:

  • Removing the negative condition when choosing between decode or prefill steps.
  • Removing the else block when returning from inside the if block.

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

The changes in xllm/core/runtime/speculative_worker_impl.cpp refactor the step function to improve readability by removing the else block and the negation in the conditional check. The logic now explicitly handles the decode case first and returns, falling through to the prefill case otherwise. As there were no review comments provided for this pull request, I have no feedback to provide.

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.

1 participant