---
id: pr-deepgemm-328
repo: deepseek-ai/DeepGEMM
pr: 328
title: 'Sync nv_dev with upstream #316 (Mega MoE optimizations & benchmarks)'
author: Barry-Delaney
date: '2026-05-08'
url: https://github.com/deepseek-ai/DeepGEMM/pull/328
source_category: upstream-code
architectures:
- sm100
- sm90
tags:
- JIT
- Mega MoE
- TMA
- attention_kv
- benchmark
- benchmark_test
- fp4
- fp8
- gemm
- gemm_quant
- moe
- moe_routing
- scheduler
- scheduler_autotune
- sm100
- sm90
techniques:
- async-copy
- autotuning
- fine-grained-quantization
- tile-scheduling
hardware_features:
- blackwell
- fp4
- fp8
- hopper
- tma
kernel_types:
- attention
- gemm
- moe
- scheduler
languages:
- cuda-cpp
- ptx
captured_at: '2026-05-16'
status: merged
merge_sha: 67fc64863d43521080bf2005e6528d0fceee9510
inclusion_reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.
changed_paths:
- README.md
- csrc/apis/attention.hpp
- csrc/apis/mega.hpp
- csrc/jit_kernels/heuristics/mega_moe.hpp
- csrc/jit_kernels/impls/sm100_fp8_fp4_mega_moe.hpp
- csrc/jit_kernels/impls/smxx_fp8_fp4_paged_mqa_logits.hpp
- deep_gemm/__init__.py
- deep_gemm/include/deep_gemm/comm/barrier.cuh
- deep_gemm/include/deep_gemm/impls/sm100_fp4_mqa_logits.cuh
- deep_gemm/include/deep_gemm/impls/sm100_fp4_paged_mqa_logits.cuh
- deep_gemm/include/deep_gemm/impls/sm100_fp8_fp4_mega_moe.cuh
- deep_gemm/include/deep_gemm/impls/sm100_fp8_paged_mqa_logits.cuh
- deep_gemm/include/deep_gemm/impls/sm90_fp8_paged_mqa_logits.cuh
- deep_gemm/include/deep_gemm/layout/mega_moe.cuh
- deep_gemm/include/deep_gemm/ptx/ld_st.cuh
- deep_gemm/include/deep_gemm/scheduler/paged_mqa_logits.cuh
- deep_gemm/mega/__init__.py
- scripts/quick_plot_pm.py
- scripts/run_ncu_mega_moe.sh
- tests/test_attention.py
- tests/test_mega_moe.py
artifact_dir: evidence/pull-bundles/deepgemm/gh-328
head_ref_oid: 520195729c219a58951accfa695953725698a632
---
# Sync nv_dev with upstream #316 (Mega MoE optimizations & benchmarks)

- Repository: `deepseek-ai/DeepGEMM`
- PR: [328](https://github.com/deepseek-ai/DeepGEMM/pull/328)
- Decision: `Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.`
- Reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.

## Changed Paths

- `README.md`
- `csrc/apis/attention.hpp`
- `csrc/apis/mega.hpp`
- `csrc/jit_kernels/heuristics/mega_moe.hpp`
- `csrc/jit_kernels/impls/sm100_fp8_fp4_mega_moe.hpp`
- `csrc/jit_kernels/impls/smxx_fp8_fp4_paged_mqa_logits.hpp`
- `deep_gemm/__init__.py`
- `deep_gemm/include/deep_gemm/comm/barrier.cuh`
- `deep_gemm/include/deep_gemm/impls/sm100_fp4_mqa_logits.cuh`
- `deep_gemm/include/deep_gemm/impls/sm100_fp4_paged_mqa_logits.cuh`
- `deep_gemm/include/deep_gemm/impls/sm100_fp8_fp4_mega_moe.cuh`
- `deep_gemm/include/deep_gemm/impls/sm100_fp8_paged_mqa_logits.cuh`
- `deep_gemm/include/deep_gemm/impls/sm90_fp8_paged_mqa_logits.cuh`
- `deep_gemm/include/deep_gemm/layout/mega_moe.cuh`
- `deep_gemm/include/deep_gemm/ptx/ld_st.cuh`
- `deep_gemm/include/deep_gemm/scheduler/paged_mqa_logits.cuh`
- `deep_gemm/mega/__init__.py`
- `scripts/quick_plot_pm.py`
- `scripts/run_ncu_mega_moe.sh`
- `tests/test_attention.py`
- `tests/test_mega_moe.py`

## Evidence Bundle

`evidence/pull-bundles/deepgemm/gh-328`
