---
id: pr-sglang-22914
repo: sgl-project/sglang
pr: 22914
title: '[Refactor] Deduplicate NSA utils.py into cp_utils.py for context parallel'
author: Fridge003
date: '2026-04-20'
url: https://github.com/sgl-project/sglang/pull/22914
source_category: upstream-code
architectures:
- sm100
tags: []
techniques: []
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: c304d0d64d30f69a8c49a2e213d05934fd446cb5
inclusion_reason: defer
changed_paths:
- python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py
- python/sglang/srt/layers/attention/nsa/nsa_indexer.py
- python/sglang/srt/layers/attention/nsa/utils.py
- python/sglang/srt/layers/utils/cp_utils.py
- python/sglang/srt/managers/schedule_batch.py
- python/sglang/srt/model_executor/forward_batch_info.py
- python/sglang/srt/models/deepseek_nextn.py
- python/sglang/srt/models/deepseek_v2.py
artifact_dir: evidence/pull-bundles/sglang/gh-22914
head_ref_oid: 63d3e85ce3b3ad279a493f292de99f0fae39a3fb
---
# [Refactor] Deduplicate NSA utils.py into cp_utils.py for context parallel

- Repository: `sgl-project/sglang`
- PR: [22914](https://github.com/sgl-project/sglang/pull/22914)
- Decision: `defer`
- Reason: defer

## Changed Paths

- `python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py`
- `python/sglang/srt/layers/attention/nsa/nsa_indexer.py`
- `python/sglang/srt/layers/attention/nsa/utils.py`
- `python/sglang/srt/layers/utils/cp_utils.py`
- `python/sglang/srt/managers/schedule_batch.py`
- `python/sglang/srt/model_executor/forward_batch_info.py`
- `python/sglang/srt/models/deepseek_nextn.py`
- `python/sglang/srt/models/deepseek_v2.py`

## Evidence Bundle

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