Skip to content

WIP: DSV4 attention request-mode gate on native plan (item 27) - #630

Draft
inaniloquentee wants to merge 33 commits into
dsv4-rocmfrom
feat/dsv4-attention-runtime-bi
Draft

inaniloquentee wants to merge 33 commits into
dsv4-rocmfrom
feat/dsv4-attention-runtime-bi

Conversation

@inaniloquentee

Copy link
Copy Markdown
Collaborator

Scope

Draft, partial item 27 of KLR #81 / RL-Kernel #514. Adds an opt-in request-mode gate around the existing native joint attention plan and autograd adapter. Tracks contiguous prefill/decode positions per request, enforces model/cache version transitions, and checks training/recompute Q, canonical KV, sink, logical selection, BF16 O and FP32 LSE byte-for-byte. Native operator failures cannot advance request state. No numerical GPU kernel has been copied or added.

Base and prerequisites

Started from latest main 8588158650aff58c9c1f527674de94bad06c3d10. This branch currently contains prerequisite #629 (including #628) and #626 (including #625/#624/#618), which are still open. Target is dsv4-rocm; it trails that main by 22 commits. Review this commit separately as d46ad78 until prerequisites land.

Verification

MI300X/gfx942 in the ljj ROCm container: 605 passed, 17 warnings across operator contracts and DeepSeek-V4 tests with pinned aiter forward/wrapper and Megatron backward sources; Ruff passed. New tests cover request sequencing, stale versions, provider failure, byte-preserving recompute under reordered rows, native Graph replay, and the native autograd path.

Remaining before item 27 signoff

  • Wire actual Megatron and vLLM model call sites, then verl and vime; the present engine modules only re-export the opt-in gate.
  • Combine live C4/C128/Indexer/recent-window cache state and external writer/read synchronization with owned logical KV metadata; prove stale scale and version barriers.
  • Validate prefill/decode/recompute and whole-engine Graph against the same 0731 checkpoint and exact logical inputs. CP/DCP and PP belong to separate parallel signoff.

The current container exposes one GPU, and its model directory is empty. This PR must remain draft until the missing integration and acceptance evidence are supplied. It does not claim full model or two-node consistency.

fangfangssj and others added 30 commits October 24, 2026 08:44
Signed-off-by: fangfangssj <1135470306@qq.com>
Signed-off-by: Ziyi <ziyizhao0723@gmail.com>
ws1-gtest-gpu and ws1-chain-gpu fail at "Configure runpodctl" before any
test runs. They install releases/latest (v2.14.0 since 2026-09-10), whose
deprecated `config --apiKey` aborts with
`Config File ".runpod.yaml" Not Found` when it is the first runpodctl
call on a fresh HOME. It only succeeds once an earlier call has created
~/.runpod/config.toml, which is why gpu-ci, whose install step happens to
run `runpodctl version` first, got past the same command.

Drop the config step in all three workflows. runpodctl v2 reads
RUNPOD_API_KEY from the environment, and every step that runs
ci/run_gpu_ci.sh already exports it, including the cleanup trap that
calls `pod remove`. Verified for v2.9.0 inside `unshare -rn`, from a
fresh HOME after `runpodctl version`: without the variable `pod list`
fails locally with no_credentials, with RUNPOD_API_KEY=dummy it gets
past the credential check to a network_error, and config.toml keeps
`apikey = ''` throughout. v2.14.0 behaves the same.

Pin the download to v2.9.0, the version gpu-ci run 31455127310 exercised
end to end (pod create with sold-out fallback, pod id parsing, pod get
polling, SSH, cleanup), and verify it with sha256sum -c against the
runpodctl-linux-amd64 line of checksums_2.9.0_sha256.txt
(06e6f54957db79d5cd9f1909a7f1d365076826751ba2f5df65d75dde43a64148),
which matches GitHub's asset digest.

Signed-off-by: Wenbo Ji <36562829+fusheng-ji@users.noreply.github.com>
fix(ci): pin runpodctl v2.9.0 and drop the deprecated config step (RUNPOD_API_KEY auth)
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
ci: remove obsolete RunPod WS1-chain-GPU workflow
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
ci: add RL-Kernel-specific automatic OCR review
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: maxiaosong1124 <maxiaosong7890@outlook.com>
Signed-off-by: lamentropetion <3051000145@qq.com>
docs(rocm): make the vLLM companion base reproducible from upstream
[Ascend] Fix deterministic attention backward compilation
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: ljj <ljj@users.noreply.github.com>
@inaniloquentee

Copy link
Copy Markdown
Collaborator Author

Item-27 framework-integration gate checked on the ljj MI300X container:

  • Installed vLLM is 0.26.0; its model_executor/models has no DeepSeek V4 model entry. The ljj/models directory contains no checkpoint files.
  • Referenced upstream vLLM #60442, #60443 and #60454 remain open (not merged). #60442 changes NVIDIA FlashMLA, so it is not an executable ROCm companion by itself.
  • The existing RL-Kernel vLLM attention_runtime.py is an opt-in re-export, not a model call-site hook. This PR's request-mode/Graph tests validate the shared plan, not live vLLM or verl/vime serving.

Before item 27 can leave draft: pin a compatible V4 vLLM/ROCm implementation and model checkpoint, wire the model call site to the shared plan, then validate prefill/decode/recompute, KV/O/LSE, Graph, and weight-version barriers in both frameworks. No V2 monkeypatch should be treated as a V4 integration.

@KJLdefeated KJLdefeated added DSv4 platform: rocm Specific tasks specific to AMD graphics cards (such as CK, bpreshuffle/FA) labels Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DSv4 platform: rocm Specific tasks specific to AMD graphics cards (such as CK, bpreshuffle/FA)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants