---
id: pr-sglang-20673
repo: sgl-project/sglang
pr: 20673
title: '[Feature][JIT Kernel] Fused TP QK norm For Minimax'
author: DarkSharpness
date: '2026-04-13'
url: https://github.com/sgl-project/sglang/pull/20673
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark_test
- compiler_runtime
- csrc kernel
- fused norm
- jit_kernel
- memory_primitives
- norm_elementwise
techniques:
- kernel-fusion
- warp-specialization
hardware_features: []
kernel_types:
- compiler
- decode
- memory
- norm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 314d6ecf0880eefbd9d56cdc21e1b57bb390df80
inclusion_reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.
changed_paths:
- python/sglang/jit_kernel/all_reduce.py
- python/sglang/jit_kernel/benchmark/bench_tp_qknorm.py
- python/sglang/jit_kernel/csrc/distributed/tp_qknorm.cuh
- python/sglang/jit_kernel/include/sgl_kernel/distributed/common.cuh
- python/sglang/jit_kernel/include/sgl_kernel/distributed/custom_all_reduce.cuh
- python/sglang/jit_kernel/include/sgl_kernel/warp.cuh
- python/sglang/jit_kernel/tests/test_custom_all_reduce.py
- python/sglang/jit_kernel/tests/test_tp_qknorm.py
- python/sglang/jit_kernel/tests/utils.py
- python/sglang/srt/distributed/device_communicators/custom_all_reduce_v2.py
- python/sglang/srt/models/minimax_m2.py
artifact_dir: evidence/pull-bundles/sglang/gh-20673
head_ref_oid: d1efab15611374d5e1ed7cbe77ae82a51a7c45c5
---
# [Feature][JIT Kernel] Fused TP QK norm For Minimax

- Repository: `sgl-project/sglang`
- PR: [20673](https://github.com/sgl-project/sglang/pull/20673)
- Decision: `Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.`
- Reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.

## Changed Paths

- `python/sglang/jit_kernel/all_reduce.py`
- `python/sglang/jit_kernel/benchmark/bench_tp_qknorm.py`
- `python/sglang/jit_kernel/csrc/distributed/tp_qknorm.cuh`
- `python/sglang/jit_kernel/include/sgl_kernel/distributed/common.cuh`
- `python/sglang/jit_kernel/include/sgl_kernel/distributed/custom_all_reduce.cuh`
- `python/sglang/jit_kernel/include/sgl_kernel/warp.cuh`
- `python/sglang/jit_kernel/tests/test_custom_all_reduce.py`
- `python/sglang/jit_kernel/tests/test_tp_qknorm.py`
- `python/sglang/jit_kernel/tests/utils.py`
- `python/sglang/srt/distributed/device_communicators/custom_all_reduce_v2.py`
- `python/sglang/srt/models/minimax_m2.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-20673`
