Skip to content

[CI]Main2Main 0814 - #13991

Closed
LQDLove wants to merge 19 commits into
vllm-project:mainfrom
LQDLove:main2main_0814
Closed

[CI]Main2Main 0814#13991
LQDLove wants to merge 19 commits into
vllm-project:mainfrom
LQDLove:main2main_0814

Conversation

@LQDLove

@LQDLove LQDLove commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it?

Upgrade baseline

  • Update the verified vLLM main anchor from a311916a to 827a2af. The full upstream range is available in this comparison.
  • Preserve the vLLM 0.27.1 compatibility lane while adapting the main lane to the new upstream contracts.
  • The changes are organized in the same order as the changed files in this PR. Each item identifies the upstream change, the downstream adaptation, and why the adaptation is required.

Changes by file

1. .github/vllm-main-verified.commit
Change Upstream change Downstream adaptation Why
Update anchor to 827a2af Upgrade window a311916a...827a2af. Set anchor. Source of truth for main2main workflow.
2. vllm_ascend/patch/platform/patch_vision.py (deleted) / vllm_ascend/patch/platform/__init__.py / vllm_ascend/patch/__init__.py
Change Upstream change Downstream adaptation Why
Remove the FusedInputNorm eps patch Delete patch_vision.py, its platform registration, and its patch-manifest documentation. The FusedInputNorm.forward eps=0.0 → eps=1e-5 workaround is no longer needed.
3. vllm_ascend/ops/triton/mamba/postprocess.py
Change Upstream change Downstream adaptation Why
Adapt to TEMPORAL_TILES tiling Upstream vLLM tiled the temporal state copy across TEMPORAL_TILES CTAs (3D grid) and passes the new constexpr from run_fused_postprocess/run_fused_postprocess_align. Port _memcpy_u64_tiled and accept TEMPORAL_TILES (default 1 keeps the 2D-grid v0.27.1 contract); temporal copies are tiled, conv copies run on tile 0 only, and the num_accepted store is guarded with tile_idx == 0. Without the new constexpr, Triton raised "Keyword argument TEMPORAL_TILES was specified but unrecognised" and the engine died.
4. vllm_ascend/worker/v2/input_batch.py
Change Upstream change Downstream adaptation Why
Fix AscendInputBatch dataclass field ordering Upstream added default-valued fields (e.g. max_query_len) at the end of InputBatch's field list. Give seq_lens_np a None default. Without it, AscendInputBatch.seq_lens_np (no default) followed a default-valued base field, so dataclass raised "non-default argument follows default argument" at import time, failing every test.
Accept max_query_len in AscendInputBatch.make_dummy Upstream vLLM main (after #51256) added max_query_len to InputBatch.make_dummy. Add max_query_len and forward it only on the main lane. v0.27.1's make_dummy has no such parameter; forwarding unconditionally raises TypeError.
5. vllm_ascend/worker/v2/model_runner.py / vllm_ascend/worker/v2/aclgraph_utils.py
Change Upstream change Downstream adaptation Why
Accept context_len in execute_model Upstream vLLM main (after #51256) passes context_len to execute_model for dummy-run context setup. Add context_len: int = 0 and forward it to super().execute_model only on the main lane. v0.27.1's execute_model has no context_len parameter, so forwarding it unconditionally raises TypeError on that lane.
Accept varlen_decode in the graph manager factory Upstream vLLM main (after #51256) passes varlen_decode to the graph manager factory and ModelCudaGraphManager. Add varlen_decode to graph_manager_wrapper.factory and ModelAclGraphManager.__init__, forwarding only on the main lane. v0.27.1 has no varlen_decode, so forwarding unconditionally raises TypeError ("unexpected keyword argument 'varlen_decode'").
Accept batch_req_state in prepare_inputs Upstream vLLM main (after #51256) passes an extra batch_req_state arg to prepare_inputs. Accept *args and parse batch_desc by lane. v0.27.1 passes only (scheduler_output, batch_desc); the main lane passes (scheduler_output, batch_req_state, batch_desc), otherwise TypeError ("takes 3 positional arguments but 4 were given").
6. vllm_ascend/worker/v2/spec_decode/autoregressive/speculator.py
Change Upstream change Downstream adaptation Why
Skip DSA in _ascend_update_seq_lens DSA metadata (AscendDSAMetadata) owns per-step state in its builder. Early-return for the DSA architecture, mirroring _update_decode_attn_metadata. AscendDSAMetadata has no seq_lens/seq_len_list, so the unconditional update raised AttributeError (seen on v0.27.1 DeepSeek-V4 MTP).
7. tests/ut/patch/worker/test_patch_mamba_utils_source.py
Change Upstream change Downstream adaptation Why
Expect _memcpy_u64_tiled in the postprocess module postprocess.py now also defines the _memcpy_u64_tiled helper. Update the source-level check to expect it and assert the kernel calls it. Keep the source check in sync with the kernel structure.
8. tests/ut/spec_decode/test_extract_hidden_states_proposer.py / tests/ut/ops/test_routed_experts.py / tests/ut/patch/platform/test_patch_structured_output.py
Change Upstream change Downstream adaptation Why
Adapt UT to upstream 2ac1f683 API changes Upstream removed extract_hidden_states.PIN_MEMORY; RoutedExperts.expert_map now probes quant_method.moe_kernel; StructuredOutputManager.compile_grammar gained a stop_token_ids arg and _create_grammar reads sampling_params.all_stop_token_ids. Drop the stale _no_pin_memory fixture; mock quant_method on the __new__ instance; add stop_token_ids/all_stop_token_ids to the fakes. Keep UT passing against the new upstream APIs.
9. tests/ut/spec_decode/test_extract_hidden_states_proposer.py
Change Upstream change Downstream adaptation Why
Force pin_memory=False for CPU-only tests Ascend reports pin_memory as available, so CpuGpuBuffer defaults it to True. Patch CpuGpuBuffer.__init__ to force pin_memory=False. On a pure CPU test device, pin_memory=True trips torch_npu's RegisterPrivateUse1HooksInterface check.
10. vllm_ascend/patch/platform/patch_kv_cache_coordinator.py
Change Upstream change Downstream adaptation Why
Accept num_prefill_lookahead in the KV cache coordinator Upstream vLLM main (after #50062) added num_prefill_lookahead to get_kv_cache_coordinator and the coordinator constructors; the scheduler now passes it to KVCacheManager. Add num_prefill_lookahead: int = 0 to the patched get_kv_cache_coordinator and AscendHybridKVCacheCoordinator.__init__; forward it to the original coordinator on the main lane only; set num_reprefillable_tokens = max(0, num_prefill_lookahead - 1). The scheduler passes num_prefill_lookahead, so without the param the patched coordinator raises TypeError (44 CPU UTs + 3 LoRA e2e failing with "Engine core initialization failed"). v0.27.1 has no such parameter, so it is forwarded only on the main lane.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI on the branch. See Buildkite workflow run for detailed results.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a routine synchronization of the CI verification commit hash. By updating this reference, the project ensures that continuous integration processes remain consistent with the current state of the main branch.

Highlights

  • CI Synchronization: Updated the vLLM main verified commit hash to align with the latest upstream HEAD.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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

Copy link
Copy Markdown
Contributor

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 updates the verified commit hash of the vLLM main branch in .github/vllm-main-verified.commit to a311916a291c1fed3dbfb72e60f74cd778c8419d. The reviewer pointed out that the PR title and description do not follow the repository's style guide and provided suggestions to format them correctly.

Comment thread .github/vllm-main-verified.commit Outdated
@@ -1 +1 @@
58d3918e3ea0a544ffedadad2ba84559e9c51d8f
a311916a291c1fed3dbfb72e60f74cd778c8419d

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The Pull Request title and description do not follow the repository's style guide. Please update them to adhere to the required format.

Suggested PR Title:

[CI][Misc] Update vllm-main-verified.commit to latest main HEAD

Suggested PR Summary:

### What this PR does / why we need it?

This PR updates the verified commit hash of the vLLM main branch in `.github/vllm-main-verified.commit` to the latest HEAD (`a311916a291c1fed3dbfb72e60f74cd778c8419d`). This ensures that CI workflows and downstream dependencies use the latest verified commit of vLLM.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

This is a configuration/commit hash update for CI. Testing is handled by the CI workflows that consume this commit hash.
References
  1. The PR title and summary must follow the specified format in the Repository Style Guide. (link)

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@LQDLove

LQDLove commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/rerun
[Bot]: rerun completed.

Rerun:

  • E2E

@LQDLove

LQDLove commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/rerun

[Bot]: rerun completed. No failed jobs found.

Sync .github/vllm-main-verified.commit to the latest vLLM main HEAD.

Signed-off-by: liaoqidan <1107297340@qq.com>
Remove vllm_ascend/patch/platform/patch_vision.py and its platform
registration/documentation. The FusedInputNorm eps=0.0 -> eps=1e-5
workaround is no longer needed; bundled PyTorch now accepts eps >= 0
for inference.

Signed-off-by: liaoqidan <1107297340@qq.com>
Sync .github/vllm-main-verified.commit to the latest vLLM main HEAD.

Signed-off-by: liaoqidan <1107297340@qq.com>
…S tiling

Upstream vLLM tiled the temporal state copy across TEMPORAL_TILES CTAs
(3D grid: num_reqs, total_states, TEMPORAL_TILES) and passes the new
constexpr from run_fused_postprocess / run_fused_postprocess_align. The
Ascend kernel did not accept TEMPORAL_TILES, so Triton raised
"Keyword argument TEMPORAL_TILES was specified but unrecognised" and the
engine died. Port _memcpy_u64_tiled and accept TEMPORAL_TILES (default 1
keeps the 2D-grid v0.26.0 contract): temporal copies are tiled, conv
copies run on tile 0 only, and the num_accepted store is guarded with
tile_idx == 0.

Signed-off-by: liaoqidan <1107297340@qq.com>
Ruff format collapses the SD conv copy_size expression to a single
line; without it the pre-commit job fails.

Signed-off-by: liaoqidan <1107297340@qq.com>
LQDLove added 14 commits August 14, 2026 10:05
Upstream vLLM added default-valued fields (e.g. max_query_len) at the
end of InputBatch's field list. AscendInputBatch declared seq_lens_np
without a default, so after inheritance it followed a default-valued
field and dataclass raised "non-default argument follows default
argument" at import time, failing every test in adapt_patch. Give
seq_lens_np a None default; make_dummy still passes it explicitly.

Signed-off-by: liaoqidan <1107297340@qq.com>
postprocess.py now also defines the _memcpy_u64_tiled helper (ported
from upstream for TEMPORAL_TILES tiling), so the source-level check
must expect it and assert the kernel calls it instead of the removed
src_ptr/dst_ptr pointer hoisting.

Signed-off-by: liaoqidan <1107297340@qq.com>
- test_extract_hidden_states_proposer: drop the _no_pin_memory fixture;
  upstream removed extract_hidden_states.PIN_MEMORY. Tests already set
  runner.pin_memory = False directly.
- test_routed_experts: mock quant_method so the v2 ascend_expert_map path
  (upstream expert_map now probes quant_method.moe_kernel) works on a
  __new__ instance.
- test_patch_structured_output: FakeBackend.compile_grammar accepts the
  new stop_token_ids arg and make_request provides all_stop_token_ids,
  matching upstream _create_grammar.

Signed-off-by: liaoqidan <1107297340@qq.com>
Ascend reports pin_memory as available, so CpuGpuBuffer defaults
pin_memory to True. On the CPU-only test device that trips torch_npu's
RegisterPrivateUse1HooksInterface check. Patch CpuGpuBuffer.__init__ to
force pin_memory=False for these tests (buffer contents are not
asserted).

Signed-off-by: liaoqidan <1107297340@qq.com>
…LM main

- v2 model_runner.execute_model: upstream vLLM main (after #51256) passes
  context_len for dummy-run context setup; v0.26.0 has no such parameter.
  Forward context_len only on the main lane.
- autoregressive speculator._ascend_update_seq_lens: skip the DSA
  architecture, whose AscendDSAMetadata has no seq_lens/seq_len_list
  (mirroring the existing DSA early-return in _update_decode_attn_metadata).

Signed-off-by: liaoqidan <1107297340@qq.com>
Upstream vLLM main (after #51256) added max_query_len to
InputBatch.make_dummy; v0.26.0 has no such parameter. Forward it only on
the main lane, otherwise AscendInputBatch.make_dummy raises TypeError
("unexpected keyword argument 'max_query_len'").

Signed-off-by: liaoqidan <1107297340@qq.com>
Upstream vLLM main (after #51256) passes varlen_decode to the graph
manager factory and ModelCudaGraphManager; v0.26.0 has no such
parameter. Forward it only on the main lane in graph_manager_wrapper and
ModelAclGraphManager.__init__, otherwise the factory raises TypeError
("unexpected keyword argument 'varlen_decode'").

Signed-off-by: liaoqidan <1107297340@qq.com>
v0.27.1's execute_model, InputBatch.make_dummy, and ModelCudaGraphManager
have no context_len/max_query_len/varlen_decode params, same as v0.26.0.
The earlier v0.26.0-only check forwarded these on v0.27.1 and raised
TypeError. Exclude both lanes so the new params are forwarded only on
main.

Signed-off-by: liaoqidan <1107297340@qq.com>
Upstream vLLM main (after #51256) passes an extra batch_req_state arg to
prepare_inputs; v0.26.0 / v0.27.1 pass only (scheduler_output,
batch_desc). Accept *args and parse batch_desc by lane, so the main lane
no longer raises TypeError ("prepare_inputs() takes 3 positional
arguments but 4 were given").

Signed-off-by: liaoqidan <1107297340@qq.com>
The PR no longer targets the v0.26.0 lane, so remove vllm_version_is("0.26.0")
from the main-lane-only forwarding checks in execute_model, prepare_inputs,
graph manager factory, ModelAclGraphManager, and AscendInputBatch.make_dummy;
keep only v0.27.1. Update the postprocess write-target comment to reference
v0.27.1 (which, like v0.26.0, passes None for the output buffer).

Signed-off-by: liaoqidan <1107297340@qq.com>
Sync .github/vllm-main-verified.commit to the latest vLLM main HEAD.

Signed-off-by: liaoqidan <1107297340@qq.com>
Upstream vllm-project/vllm#50062 added num_prefill_lookahead to
get_kv_cache_coordinator and the KV cache coordinator constructors.
Mirror the upstream contract in the patched get_kv_cache_coordinator and
AscendHybridKVCacheCoordinator: forward the value to the original
coordinator on the main lane only (v0.27.1 has no such parameter) and set
num_reprefillable_tokens so the inherited cache_blocks excludes the
re-prefillable tail during multi-module MTP.

Signed-off-by: liaoqidan <1107297340@qq.com>
ruff format collapses the multi-line condition in the multi-module MTP
guard since it fits within the 120-char line length. Fixes the pre-commit
ruff-format hook and the ci-gate it gates.

Signed-off-by: liaoqidan <1107297340@qq.com>
AscendHybridKVCacheCoordinator accepts scheduler_block_size as int | None,
so mypy rejects comparing it to num_prefill_lookahead in the multi-module
MTP guard. Assert it is not None first; the scheduler always supplies a
real block size, mirroring upstream's required scheduler_block_size.

Signed-off-by: liaoqidan <1107297340@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants