Fix NVIDIA DeepSeek V4 MHC warmup coverage - #49707
Open
coltonottley wants to merge 2 commits into
Open
coltonottley wants to merge 2 commits into
coltonottley wants to merge 2 commits into
Conversation
Signed-off-by: Colton Ottley <coltonottley@gmail.com>
- Rename local warmup destructured comb_mix to res_mix (same value) - Strengthen CPU-device no-op test: spy mhc_pre_broadcast_tilelang, assert zero calls - In _warmup_broadcast_mhc, fail closed/no-op unless hc_attn_fn_broadcast is a tensor on the same CUDA device as hc_attn_fn - Add authentic tests for missing (non-tensor) and mismatched-device broadcast tensor Signed-off-by: Colton Ottley <coltonottley@gmail.com>
Contributor
Author
|
This is ready for review and upstream CI. DCO passes; the focused and adjacent warmup suites pass 53 tests with one CUDA-only skip; the branch is current with |
4 tasks
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix DeepSeek V4 NVIDIA mHC startup warmup coverage.
The existing warmup detector requires decoder layers to expose
hc_preandhc_post, but NVIDIADeepseekV4DecoderLayerdoes not expose those methods. The detector therefore returns without warming any NVIDIA mHC kernels. The first-layer broadcast path (mhc_pre_broadcast_tilelang) also has no warmup coverage.This change:
hc_pre/hc_postwrappers that use the same arguments and return ordering as inference;n_splitskey up tomax_num_batched_tokens;Root cause
Two upstream changes left independent gaps:
hc_pre/hc_post, but the NVIDIA decoder layer does not implement them, so warmup silently no-ops.n_splitsis a TileLang compile-time parameter. Warming only powers of two or only the broadcast geometry leaves reachable specializations cold. The shared selector in this patch enumerates the exact reachable split keys for each K geometry.Validation
Source validation on current upstream
main:git diff --checkpass.Hardware validation used DeepSeek-V4-Flash with TP=2, MTP=2, FP8 KV cache, and 1,000,000-token context on RTX PRO 6000 Blackwell GPUs:
Persistent per-source kernel caches reduced same-image restart time substantially, but cache persistence is a deployment optimization, not required for the correctness of this patch.
Scope
This PR is intentionally limited to NVIDIA DeepSeek V4 mHC warmup. Other first-request JIT gaps observed in speculative decoding, sparse-MLA metadata, and expert-token counting are separate work.