Skip to content

knowledge(vllm-omni): 1 change(s) from refine - #356

Merged
tzhouam merged 1 commit into
mainfrom
kb/vllm-omni/vllm-omni-refine-3f8e7695379d
Oct 12, 2026
Merged

tzhouam merged 1 commit into
mainfrom
kb/vllm-omni/vllm-omni-refine-3f8e7695379d

Conversation

@tzhouam

@tzhouam tzhouam commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Generated automatically by the Copilot knowledge service (changeset vllm-omni-refine-3f8e7695379d).

op page rule
add repos/vllm-omni/components/model-executor/rules-npu-kv-layout.md VLLM-OMNI-PR8827-CONTIG-KV

Generator: zcode:GLM-5.3 · judge: codex:gpt-6-sol:medium.
The publisher merges it only if its local gate passes on the exact merge result.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T15:27:14.925671Z 565f5be PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tzhouam
tzhouam merged commit 749a920 into main Oct 12, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 565f5be3eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


- [AutoRound NVFP4 method dispatch 合同](rules-autoround-dispatch.md)。
- [数值精确性与平台可移植性规则](rules-numeric-exactness.md)
- [Model Executor — NPU KV cache 布局规则](rules-npu-kv-layout.md)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route the NPU rule through the owner entrypoint

When Direct selects the model-executor owner, _routes.yaml sends it to components/model-executor/rules.md and the scoped workflow stops navigating after identifying that owner. Because this new rule is linked only from _index.md and has no trigger or link in rules.md, reviews involving this KV-layout scenario will not receive it; add it to the owner page's Direct quick map/code routing rather than relying on the index.

AGENTS.md reference: knowledge/AGENTS.md:L5-L10

Useful? React with 👍 / 👎.

- 强制:contiguous 判定必须实现为 `spec.page_size_bytes == spec.real_page_size_bytes`:unpadded page 保持 vLLM-Ascend 0.30.0 及更早的连续分离 K/V 分配(K、V 各自 contiguous 且 storage 不别名);padded page 留在 packed 单 tensor 路径,因为 V2 的分离 K/V 分配只支持 unpadded page。
- 强制:`apply_contiguous_kv_patch()` 必须通过替换 `vllm_ascend.attention.utils.requires_contiguous_pa_kv_cache.__code__` 生效,不得重绑模块属性——这样 `attention.utils`、`worker.model_runner_v1`、`worker.v2.attn_utils` 的按引用导入才同步生效;patch 必须幂等(重复调用不叠加),并在 `NPUOmniPlatform.__init__` 的 `adapt_patch(is_global_patch=True)` 之后调用。
- 禁止:为统一布局把 padded page 也切到连续分离分配;用属性重绑或层层包装代替 `__code__` 替换,导致部分模块仍执行旧判定或重复 patch 叠加。
- 验收:`tests/platforms/npu/test_contiguous_kv_cache.py` 加入 `.buildkite/npu/test-npu-ready.yml` 的 `core_model and npu and A3 and omni` lane。v1 case(`NPUModelRunner._allocate_kv_cache_tensors`)断言 double-apply 后 `attention.utils`、`worker.model_runner_v1`、`worker.v2.attn_utils` 三处引用同一函数对象,且 K/V 各自 contiguous、storage 指针不同;v1 不做 fill 隔离。v2 case(`attn_utils._allocate_kv_cache`+`_reshape_kv_cache_v2`)断言 `original(None, None, spec)` 对 unpadded/padded 返回 True/False:unpadded 时 K/V contiguous、storage 指针不同,padded 时返回单 tensor 且 `stride(0)*element_size == page_size_bytes`;fill 隔离(K 填 1、V 填 2 后互不串扰)只在 v2 的两种参数化中断言。导入 runner 前先 import `vllm.v1.worker.gpu.spec_decode.speculator` 与 `vllm_ascend.ops`。^[PR #8827]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the required related-page links

This new stable knowledge page contains no relative Markdown links, but doc/knowledge/SCHEMA.md lines 94–96 require every settled-layer page to link at least two related pages. The incoming _index.md link does not satisfy that page-level requirement; link the owner rules.md and relevant platform-backend or validation page from this rule.

AGENTS.md reference: AGENTS.md:L7-L10

Useful? React with 👍 / 👎.

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