-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
llmd+vllm+mori-ep(intra node wide-ep)+mori-io(write) for 1p1d with dp=ep=8 tp=1 #44355
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
base: main
Are you sure you want to change the base?
Changes from all commits
e04d056
99ce0f2
e8a42ce
52b634f
6863d2f
ca48ff4
015e2c5
f4fd067
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |
| ) | ||
| from vllm.multimodal import MULTIMODAL_REGISTRY, MultiModalRegistry | ||
| from vllm.multimodal.encoder_budget import MultiModalBudget | ||
| from vllm.platforms import current_platform | ||
| from vllm.v1.core.encoder_cache_manager import ( | ||
| EncoderCacheManager, | ||
| EncoderDecoderCacheManager, | ||
|
|
@@ -2175,8 +2176,17 @@ def _update_from_kv_xfer_finished(self, kv_connector_output: KVConnectorOutput): | |
| self._free_blocks(self.requests[req_id]) | ||
| for req_id in kv_connector_output.finished_sending or (): | ||
| logger.debug("Finished sending KV transfer for request %s", req_id) | ||
| assert req_id in self.requests | ||
| self._free_blocks(self.requests[req_id]) | ||
| if current_platform.is_rocm(): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure you can't pass some metadata and have the prefill worker or decode worker help to do this task?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the feedback @rasmith . Checking this out |
||
| # ROCm/MoRI-IO skip-if-missing: WRITE-mode connectors like | ||
| # MoRI-IO can report ``finished_sending`` out-of-band from a | ||
| # deferred-write task, racing with the scheduler's normal | ||
| # lifecycle removal. Tolerate the race by skipping the free | ||
| # if the request is already gone. | ||
| if req_id in self.requests: | ||
| self._free_blocks(self.requests[req_id]) | ||
| else: | ||
| assert req_id in self.requests | ||
| self._free_blocks(self.requests[req_id]) | ||
|
|
||
| def _update_requests_with_invalid_blocks( | ||
| self, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| from vllm.logging_utils.dump_input import dump_engine_exception | ||
| from vllm.lora.request import LoRARequest | ||
| from vllm.multimodal import MULTIMODAL_REGISTRY | ||
| from vllm.platforms import current_platform | ||
| from vllm.tasks import POOLING_TASKS, SupportedTask | ||
| from vllm.tracing import instrument, maybe_init_worker_tracer | ||
| from vllm.transformers_utils.config import maybe_register_config_serialize_by_value | ||
|
|
@@ -1760,19 +1761,40 @@ def _pause_complete(self) -> bool: | |
|
|
||
| def add_request(self, request: Request, request_wave: int = 0): | ||
| super().add_request(request, request_wave) | ||
| if self.has_coordinator and request_wave != self.current_wave: | ||
| if request_wave > self.current_wave: | ||
| self.current_wave = request_wave | ||
| elif ( | ||
| not self.engines_running | ||
| and self.scheduler.pause_state == PauseState.UNPAUSED | ||
| ): | ||
| # Request received for an already-completed wave, notify | ||
| # front-end that we need to start the next one. | ||
| self.engines_running = True | ||
| self.output_queue.put_nowait( | ||
| (-1, EngineCoreOutputs(start_wave=self.current_wave)) | ||
| ) | ||
| if current_platform.is_rocm(): | ||
| # ROCm/Wide-EP first-wave wake fix: drop the | ||
| # ``request_wave != self.current_wave`` outer gate so the very | ||
| # first request after engine init also broadcasts | ||
| # ``start_wave`` (otherwise ``0 != 0`` skips the broadcast and | ||
| # the first DP rank hangs forever on the EP all2all collective | ||
| # because the other ranks never call ``execute_dummy_batch``). | ||
| # Steady-state remains correct because ``engines_running`` is | ||
| # already True so the inner branch short-circuits. | ||
| if self.has_coordinator: | ||
| if request_wave > self.current_wave: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like outer |
||
| self.current_wave = request_wave | ||
| if ( | ||
| not self.engines_running | ||
| and self.scheduler.pause_state == PauseState.UNPAUSED | ||
| ): | ||
| self.engines_running = True | ||
| self.output_queue.put_nowait( | ||
| (-1, EngineCoreOutputs(start_wave=self.current_wave)) | ||
| ) | ||
| else: | ||
| if self.has_coordinator and request_wave != self.current_wave: | ||
| if request_wave > self.current_wave: | ||
| self.current_wave = request_wave | ||
| elif ( | ||
| not self.engines_running | ||
| and self.scheduler.pause_state == PauseState.UNPAUSED | ||
| ): | ||
| # Request received for an already-completed wave, notify | ||
| # front-end that we need to start the next one. | ||
| self.engines_running = True | ||
| self.output_queue.put_nowait( | ||
| (-1, EngineCoreOutputs(start_wave=self.current_wave)) | ||
| ) | ||
|
|
||
| def resume_scheduler(self): | ||
| if self.pending_pause or (self.engines_running and self.ignore_start_dp_wave): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The engine adds the suffix here here. It was introduced by this PR. The issue was addressed in this PR. Could you share an example of the request id's you were seeing?