Skip to content

Commit e169af3

Browse files
committed
merge: resolve conflicts with main (planes data-plane refactor)
Merge origin/main into refactor/ascend-store-metadata. Conflict resolutions: - backend/mooncake_layerwise.py, layerwise/pool_worker.py: follow main's move of save/load session preparation into layerwise/planes/ (data-plane strategies from #21314); keep the modular imports from pool_keys and request_state. - layerwise/metadata.py, layerwise/pool_scheduler.py: keep modularized imports; deduplicate get_sharded_mamba_group_ids (sourced from cache_config). - test_pool_worker.py: main's data-plane call paths and the pinned-GVA duplicate-key semantics, asserted through request.transfer state. - planes/block_key.py, planes/gva.py: migrate 58 legacy request/view field accesses to the consolidated request.transfer state. Also sync the benchmark fixture with the current scheduler contract (async loading ids, cached new_block_ids, decode-save flags) and the worker's data-plane selection, so the harness runs on the merged tree. Verified: full ascend_store + kv_offload UT suite under an identical mock environment shows zero regressions against the origin/main baseline; the 7 new metadata tests all pass; ruff clean. Signed-off-by: zhaosusu <zhaosusu1@h-partners.com>
2 parents 04dcd8f + 1142926 commit e169af3

1,252 files changed

Lines changed: 100238 additions & 24784 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gemini/config.yaml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github
2-
have_fun: false # Just review the code
2+
have_fun: false
33
memory_config:
44
disabled: false
55
code_review:
66
comment_severity_threshold: HIGH # Reduce quantity of comments
7+
max_review_comments: 10 # Avoid comment flooding on large PRs
78
pull_request_opened:
8-
summary: true # Summarize the PR in a separate comment
9+
summary: false # PR descriptions are agent-generated and follow the template already
10+
ignore_patterns:
11+
- "tests/e2e/**" # Requires NPU hardware; CI validates

‎.gemini/styleguide.md‎

Lines changed: 59 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,59 @@
1-
# Pull Request Summary Style Guide
2-
3-
## Output Instructions
4-
5-
**IMPORTANT**: When doing PR review, you MUST output them in markdown code blocks so users can easily copy them:
6-
7-
1. **PR Title**: Output the generated title in a code block with triple backticks
8-
2. **PR Summary**: Output the generated summary in a markdown code block with triple backticks
9-
10-
This allows users to directly copy the content without manual formatting.
11-
12-
## Pull Request Summary Format
13-
14-
The summary should follow the format:
15-
16-
```markdown
17-
### What this PR does / why we need it?
18-
<!--
19-
- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
20-
If possible, please consider writing useful notes for better and faster reviews in your PR.
21-
22-
- Please clarify why the changes are needed. For instance, the use case and bug description.
23-
24-
- Fixes #
25-
-->
26-
27-
### Does this PR introduce _any_ user-facing change?
28-
<!--
29-
Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes.
30-
Documentation-only updates are not considered user-facing changes.
31-
-->
32-
33-
### How was this patch tested?
34-
<!--
35-
CI passed with new added/existing test.
36-
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
37-
If tests were not added, please describe why they were not added and/or why it was difficult to add.
38-
-->
39-
```
40-
41-
## Pull Request Title Format
42-
43-
The summary should also refresh the Pull Request Title to follow the format:
44-
45-
```txt
46-
[Branch][Module][Action] Pull Request Title
47-
```
48-
49-
- Branch: The branch name where the PR is based. If the base branch is main, this prefix can be omitted.
50-
- Module: The module or component being changed. It includes but is not limited to the following:
51-
- [Attention]
52-
- [Ops]
53-
- [Doc]
54-
- [Test]
55-
- [CI]
56-
- [Benchmark]
57-
- Action: The action being performed. It includes but is not limited to the following:
58-
- [BugFix]
59-
- [Feature]
60-
- [Misc]
61-
62-
## Example Output Format
63-
64-
When providing a PR review, format your response like this:
65-
66-
**Suggested PR Title:**
67-
68-
```markdown
69-
[Branch][Module][Action] Your generated title here
70-
```
71-
72-
**Suggested PR Summary:**
73-
74-
```markdown
75-
### What this PR does / why we need it?
76-
77-
Your analysis of what the PR does and why it's needed.
78-
79-
Fixes #issue_number
80-
81-
### Does this PR introduce _any_ user-facing change?
82-
83-
Your assessment of user-facing changes.
84-
85-
### How was this patch tested?
86-
87-
Your description of testing approach.
88-
```
89-
90-
And please print your review suggestion in markdown format no matter the pull request description is empty or not.
1+
# Review Guidance for vllm-ascend
2+
3+
vLLM Ascend is a hardware plugin integrating Ascend NPUs into vLLM. Formatting,
4+
PR title tags, and PR description templates are enforced by CI (`format.sh ci`,
5+
check gates) and by the coding agents developers already use — do NOT comment
6+
on them.
7+
8+
Focus your review on issues that automated tooling cannot catch:
9+
10+
## NPU-specific correctness and performance
11+
- `tensor.item()`, `.cpu()`, `.tolist()`, or data-dependent control flow on
12+
device tensors in hot paths: each forces a host-device synchronization and
13+
can stall AsyncScheduler. Suggest device-side alternatives
14+
(`torch.argmax`, `torch.sum`, keeping values on device, batching).
15+
- Unnecessary CPU↔NPU transfers or avoidable copies in hot paths.
16+
- Long-running-process memory concerns: fragmentation, tensors that should be
17+
freed, per-step allocations that could be reused.
18+
19+
## Architecture rules (see AGENTS.md at repo root)
20+
- New environment variables need strong justification; user-facing config
21+
belongs in `--additional-config` via a typed sub-config in
22+
`vllm_ascend/ascend_config.py` (follow `EplbConfig`/`RlConfig` patterns).
23+
Flag scattered/hardcoded env var access instead of `vllm_ascend.envs`.
24+
- New patches under `vllm_ascend/patch/`: check the patch is minimal, targets
25+
the right layer (`platform/` vs `worker/`), and is a candidate for upstream
26+
contribution to vLLM.
27+
- Model runner changes (`vllm_ascend/worker/v2/model_runner.py`): check
28+
existing upstream extension points (inheritance, composition) were considered
29+
first, and flag device-side hot-path costs.
30+
- No new module-level mutable globals; constants (`ALL_UPPER_CASE`) are fine.
31+
- All imports at top of file, except circular imports, lazy worker-process
32+
loading, and `if TYPE_CHECKING:` blocks.
33+
34+
## Triton operators
35+
- JIT specialization / recompilation risks from changing arguments.
36+
- Warmup: required variants registered in the component's active registry
37+
window; runtime calls reuse the same wrapper as warmup.
38+
- Device-applicability across Ascend 910B / 910C / 310P.
39+
40+
## Docs consistency
41+
- Behavior changes (config keys, env vars, defaults) should be reflected in the
42+
relevant docs (`docs/source/user_guide/configuration/`, additional_config
43+
table). Flag docs that contradict the code in the same PR.
44+
45+
## Release notes
46+
- Every user-facing PR must add `release_notes/fragments/<PR number>.yaml`
47+
following `release_notes/TEMPLATE.yaml`.
48+
- Flag fragments that: describe internal refactors users cannot observe,
49+
state performance numbers without a scenario (model/workload/hardware) or an
50+
invented magnitude, or change config/env behavior without old→new plus the
51+
migration step.
52+
- Bug-fix fragments should describe the user-visible symptom, not the internal
53+
root cause.
54+
55+
## Testing
56+
- Changes to kernels, model runners, or config parsing should come with or
57+
update CPU-runnable unit tests under `tests/ut`.
58+
- Do not ask authors for NPU/E2E/performance runs when they lack hardware —
59+
that evidence comes from CI; just say so.

0 commit comments

Comments
 (0)