[EC Connector] Added Build Connector Worker Meta for EC Connector (#49585)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: omerpaz95 <omerpaz95@gmail.com>
Signed-off-by: omerpaz95 <73347585+omerpaz95@users.noreply.github.com>
Co-authored-by: yewentao256 <zhyanwentao@126.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
omerpaz95
2026-08-15 15:40:38 -07:00
committed by GitHub
co-authored by yewentao256 Wentao Ye
parent c94cdd0ae0
commit fa9d67f782
16 changed files with 430 additions and 16 deletions
+18 -1
View File
@@ -6,7 +6,13 @@ import numpy as np
import torch
from vllm.platforms import current_platform
from vllm.v1.outputs import LogprobsLists, LogprobsTensors
from vllm.v1.outputs import (
EMPTY_MODEL_RUNNER_OUTPUT,
ECConnectorOutput,
LogprobsLists,
LogprobsTensors,
ModelRunnerOutput,
)
from vllm.v1.sample.ops.topk_topp_sampler import apply_top_k_top_p
from vllm.v1.worker.gpu.sample.output import SamplingMaskTensors
@@ -200,3 +206,14 @@ class TestLogprobsLists(TestCase):
assert len(sliced.logprob_token_ids) == 9 # All tokens
assert sliced.logprob_token_ids == self.logprobsLists.logprob_token_ids
assert sliced.cu_num_generated_tokens is None
def test_with_ec_conn_output_copies_shared_empty_output():
"""The shared empty output is copied, never written to."""
ec_output = ECConnectorOutput(finished_sending={"mm_hash"})
result = ModelRunnerOutput.with_ec_conn_output(EMPTY_MODEL_RUNNER_OUTPUT, ec_output)
assert result is not EMPTY_MODEL_RUNNER_OUTPUT
assert result.ec_connector_output is ec_output
assert EMPTY_MODEL_RUNNER_OUTPUT.ec_connector_output is None