Skip to content

[models, examples, tests, docs] feat: the RTX PRO 6000 NVFP4 megakernel (bf16 or FP8 KV cache) - #12

Open
JerryGJX wants to merge 4 commits into
mainfrom
rtxpro6000-nvfp4-megakernel
Open

JerryGJX wants to merge 4 commits into
mainfrom
rtxpro6000-nvfp4-megakernel

Conversation

@JerryGJX

@JerryGJX JerryGJX commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds a decode megakernel for the NVFP4 model on one RTX PRO 6000 (96 GB), at the model's full 260k-token window: on a bf16 KV cache by default, or on an FP8 one with engine.kv_cache_dtype=fp8_e4m3. The GPU is detected, as for GB300 and the RTX 5090: a recipe sets no switch.

  • pear/models/qwen3_5/deploy/rtx_blackwell/nvfp4/ holds a folder per GPU: rtx5090/ (the kernel on main, moved), rtxpro6000/ (new) and common/csrc/ (the four files both include).
  • The RTX PRO 6000's kernel is the RTX 5090's plus a pacer warp that prefetches weights and KV tiles, SiLU pairs in up to three parts, earlier reads in the draft ops and a bf16 KV cache's attention. Two builds: bf16 KV (no flag) and FP8 KV (-DMK_KV_FP8=1).
  • gpu_backend.py has a backend per GPU and KV cache dtype, matched by the GPU's name.
  • The RTX 5090's kernel is unchanged. Its backend now refuses an engine with calculated KV scales: the kernel reads the FP8 cache at scale 1. That check is Fp8KvCacheMixin in deploy/gpu_backend.py, which the GB300 FP8 KV cache PR adds at the same place, so the two merge into one.
  • The recipe is examples/models/qwen3_8_27b_pear/deploy/gpu/rtxpro6000.yaml (GPU=rtxpro6000). The README's hardware table and News name the RTX PRO 6000. The GB300 FP8 KV cache PR edits the same table.

How was it verified?

CI's CPU jobs pass locally (pre-commit, the tests job's pytest command), with new tests for the backend chosen per GPU and KV cache dtype, the builds and the recipe.

On the GPUs, the branch against the kernel it was ported from (RTX PRO 6000) and against main (RTX 5090), in one job on one GPU: the generated code is instruction-identical, on identical inputs the outputs are bitwise equal (the
accuracy gate, its four fallback samplings and the acceptance run's 16 answers), and the verify step's period is within 0.07%.

RTX PRO 6000, bf16 KV RTX PRO 6000, FP8 KV RTX 5090
Verify step, production contexts 14.495 ms 13.906 ms 14.500 ms
Window the recipe's server serves 260,096 tokens 260,096 tokens 191,168 tokens

Decode speed with the DFlash2 checkpoint, measured as the README's GB300 and RTX 5090 figures: 16 logged robot-control conversations (1.9k to 68k tokens of context) through the recipe's server, decode time from the server's own metrics.

KV cache Tokens per verify step Decode tokens/s
bf16 3.84 264
FP8 3.84 276

Checklist

  • The title reads [module] type: description, for example [envs] fix: the reset of a stale episode. CI checks it against the modules and types of .github/scripts/pr_title.py.
  • One coherent change; unrelated changes go in their own PR.
  • pre-commit run --all-files passes.
  • Tests cover the change, or the section above says why they cannot.
  • A change to a prompt file shows the rendered prompt before and after.
  • A change to 3rdparty/*/patches was exported by the scripts there.
  • No cluster path, host name, account name or credential in the code, the comments or this description.

@JerryGJX
JerryGJX requested a review from Sakits as a code owner November 21, 2026 00:46
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