---
id: pr-sglang-17554
repo: sgl-project/sglang
pr: 17554
title: 'Kernel: optimize decoding metadata in NSA multi-spec backend with fused kernels'
author: Johnsonms
date: '2026-02-14'
url: https://github.com/sgl-project/sglang/pull/17554
source_category: upstream-code
architectures:
- sm100
tags:
- FlashMLA
- attention_kv
- benchmark_test
- compiler_runtime
- memory_primitives
- norm_elementwise
techniques:
- kernel-fusion
hardware_features: []
kernel_types:
- attention
- compiler
- memory
- mla
- norm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 34132d6da50e0867426962d3681b62a03b5624b9
inclusion_reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.
changed_paths:
- python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh
- python/sglang/jit_kernel/fused_metadata_copy.py
- python/sglang/jit_kernel/tests/test_fused_metadata_copy.py
- python/sglang/srt/environ.py
- python/sglang/srt/layers/attention/nsa/nsa_backend_mtp_precompute.py
- python/sglang/srt/layers/attention/nsa/nsa_mtp_verification.py
- python/sglang/srt/layers/attention/nsa_backend.py
artifact_dir: evidence/pull-bundles/sglang/gh-17554
head_ref_oid: 5fb79a390a080ca66ffbf16c510dd4aeda406cb5
---
# Kernel: optimize decoding metadata in NSA multi-spec backend with fused kernels

- Repository: `sgl-project/sglang`
- PR: [17554](https://github.com/sgl-project/sglang/pull/17554)
- Decision: `Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.`
- Reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.

## Changed Paths

- `python/sglang/jit_kernel/csrc/elementwise/fused_metadata_copy.cuh`
- `python/sglang/jit_kernel/fused_metadata_copy.py`
- `python/sglang/jit_kernel/tests/test_fused_metadata_copy.py`
- `python/sglang/srt/environ.py`
- `python/sglang/srt/layers/attention/nsa/nsa_backend_mtp_precompute.py`
- `python/sglang/srt/layers/attention/nsa/nsa_mtp_verification.py`
- `python/sglang/srt/layers/attention/nsa_backend.py`

## Evidence Bundle

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