sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.transform_index is…
Error message
sglang.srt.layers.attention.nsa.transform_index is deprecated; use sglang.kernels.ops.attention.dsa.transform_index instead.
What it means
Deprecation warning: the module sglang.srt.layers.attention.nsa.transform_index has moved; import sglang.kernels.ops.attention.dsa.transform_index instead. The old path will be removed in a future release.
Solutions
- Import from sglang.kernels.ops.attention.dsa.transform_index
- Audit imports with grep for `attention\.nsa`
- Pin an older SGLang release only if you cannot patch immediately
Example fix
# before from sglang.srt.layers.attention.nsa.transform_index import transform_index # after from sglang.kernels.ops.attention.dsa.transform_index import transform_index
Defensive patterns
Strategy: validation
Prevention
- Update transform_index imports to the dsa kernels path
- Run a repo-wide grep for `nsa.transform_index`
When it happens
Trigger: `from sglang.srt.layers.attention.nsa.transform_index import ...` or indirect import via the nsa package.
Common situations: Post-upgrade code that transforms sparse-attention indices using the pre-rename module path.
Related errors
- sglang.srt.layers.attention.nsa.dequant_k_cache is…
- sglang.srt.layers.attention.nsa.index_buf_accessor is…
- sglang.srt.layers.attention.nsa_backend is deprecated; use…
- sglang.srt.layers.attention.nsa is deprecated; use…
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/9d2a0bb3adfe5373.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/srt/layers/attention/nsa/transform_index.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.transform_index instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.transform_index is deprecated; "
"use sglang.kernels.ops.attention.dsa.transform_index instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.transform_index import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)