Skip to content

Sync nv_dev with upstream #347 - #349

Merged
RayWang96 merged 3 commits into
deepseek-ai:nv_devfrom
Barry-Delaney:user/jinshik/nv_dev_347
Jun 2, 2026
Merged

RayWang96 merged 3 commits into
deepseek-ai:nv_devfrom
Barry-Delaney:user/jinshik/nv_dev_347

Conversation

@Barry-Delaney

Copy link
Copy Markdown

Merges upstream 88965b0 (deepseek-ai PR #347: "Multiple updates and refactorings") into nv_dev (c
urrently ac1f285 = #316 merge via PR #328 + PR #342 IMA guard). Brings PR #347's FP8/FP4 Mega MoE r
efactor, BF16 accumulation/output expansion, paged-MQA scheduler refactor, and assorted fixes. Merge
base is 891d57b; the merge also pulls 714dd1a ("Update test_mega_moe.py").

Topology follows the established nv_dev convention (git merge --no-ff <upstream_sha>, preserving th
e upstream commit as the second parent), matching PR #314 / #328.

LyricZhao and others added 3 commits May 11, 2026 19:20
* Optimize FP8/FP4 Mega MoE dispatch, scheduling, and shared memory layout
* Add BF16 accumulation/output support updates for GEMM paths
* Improve paged MQA scheduler and attention coverage
* Minor fixes and test updates
…refactorings) into nv_dev

Brings deepseek-ai PR deepseek-ai#347 (88965b0, also pulls 714dd1a 'Update test_mega_moe.py')
onto nv_dev (currently at ac1f285 = deepseek-ai#316 merge deepseek-ai#328 + PR deepseek-ai#342 IMA guard).
Merge base is 891d57b.

Conflicts resolved (5 files):
  * scheduler/paged_mqa_logits.cuh: take deepseek-ai#347's refresh_num_kv_and_advance +
    reversed metadata allocation; drop nv_dev's PR deepseek-ai#342 exist_q_atom_idx guard
    and get_atom_advance (both subsumed — reversed alloc keeps current_q_atom_idx
    in-bounds, refresh_num_kv_and_advance reproduces the varlen 1-or-2 advance).
    NV's host-passed num_next_n_atoms survives in the auto-merged metadata kernel
    (verified: single param, no inline recompute, coherent with reversed alloc).
  * csrc/apis/gemm.hpp: drop redundant C/D dtype asserts (deepseek-ai#347 cleanup; the
    pre-existing d-dtype check + d==c check already cover them).
  * sm100_fp8_fp4_gemm_1d1d.cuh: take deepseek-ai#347's unconditional BF16/FP32 C/D assert
    (supersedes nv_dev's accumulation-only assert).
  * tests/generators.py: take deepseek-ai#347's broadened BF16-accumulation enumeration
    (out_dtype==bf16 and (dtype==bf16 or arch==10)) — strict superset of nv_dev's
    fp8+SM100 case.
  * tests/test_attention.py: merge both — keep NV's SM90 next_n=4 multicast +
    num_clusters metadata sizing; add deepseek-ai#347's pool-size limits, batch_size=4096,
    and block_table/context_lens sanity asserts.

Auto-merged metadata kernel + smxx_fp8_fp4_paged_mqa_logits.hpp + attention.hpp
verified coherent across all three layers (kernel signature / launch / host call
all carry num_next_n_atoms + is_varlen + indices).

Validated on B-card (SM100) and H200 (SM90) incl next_n=4 multicast.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@RayWang96
RayWang96 merged commit 950d31a into deepseek-ai:nv_dev Jun 2, 2026
lucifer1004 added a commit to lucifer1004/DeepGEMM that referenced this pull request Sep 15, 2026
Resolve the nv_dev sync using an ordinary merge, following the ancestry-preserving approach of prior sync PRs deepseek-ai#314, deepseek-ai#328, deepseek-ai#349 and deepseek-ai#384. Audit all 75 target-side changed paths, including 59 conflicts and seven automatically changed paths, against the prepared main-API implementation.

Retain DeepJIT, native SM120 kernels, restored nv_dev attention and MegaMoE contracts, and the validated NVFP4 WAR fix. Preserve the target's FP16 MQA indexing include; this is the only tree change relative to the validated integration head.

Standard standalone build, delivered-package import, 81 host protocol tests, 349 SM120 focused tests, packing and HC passed. Runtime sources are unchanged; prior bounded hardware and sanitizer evidence applies. Existing combined IDE indexing build limitations and previously documented qualification limits remain.
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.

3 participants