---
id: pr-sglang-16043
repo: sgl-project/sglang
pr: 16043
title: optimize get_topk_ragged by fusing get k and k_scale triton kernel
author: BJWang-ant
date: '2026-02-04'
url: https://github.com/sgl-project/sglang/pull/16043
source_category: upstream-code
architectures:
- sm100
tags:
- attention
techniques: []
hardware_features: []
kernel_types:
- attention
languages:
- python
- triton
captured_at: '2026-04-27'
status: merged
merge_sha: 760ae933bb3878a6897e7e552a746929c29e9d90
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/srt/layers/attention/nsa/index_buf_accessor.py
- python/sglang/srt/layers/attention/nsa/nsa_indexer.py
- python/sglang/srt/mem_cache/memory_pool.py
- test/manual/layers/attention/nsa/test_get_k_scale_triton_kernel.py
- test/manual/layers/attention/nsa/test_index_buf_accessor.py
head_ref_oid: 6680bbc6d9819e3f1a514d71d87437e411bd4395
artifact_dir: evidence/pull-bundles/sglang/gh-16043
---
# optimize get_topk_ragged by fusing get k and k_scale triton kernel

- Repository: `sgl-project/sglang`
- PR: [16043](https://github.com/sgl-project/sglang/pull/16043)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/srt/layers/attention/nsa/index_buf_accessor.py`
- `python/sglang/srt/layers/attention/nsa/nsa_indexer.py`
- `python/sglang/srt/mem_cache/memory_pool.py`
- `test/manual/layers/attention/nsa/test_get_k_scale_triton_kernel.py`
- `test/manual/layers/attention/nsa/test_index_buf_accessor.py`

## Evidence Bundle

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