sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.triton_kernel is deprecated;
Error message
sglang.srt.layers.attention.nsa.triton_kernel is deprecated; use sglang.kernels.ops.attention.dsa.triton_kernel instead.
What it means
Import-time DeprecationWarning: the NSA triton kernel module moved to sglang.kernels.ops.attention.dsa.triton_kernel. The shim re-exports everything, so kernels keep working until the shim is removed.
Source
Thrown at python/sglang/srt/layers/attention/nsa/triton_kernel.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.triton_kernel instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.triton_kernel is deprecated; "
"use sglang.kernels.ops.attention.dsa.triton_kernel instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.triton_kernel import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)
Solutions
- Update to sglang.kernels.ops.attention.dsa.triton_kernel
- Fix re-exports in downstream forks/plugins
- Run tests with warnings-as-errors to catch stragglers
Example fix
# before from sglang.srt.layers.attention.nsa.triton_kernel import * # after from sglang.kernels.ops.attention.dsa.triton_kernel import *
Defensive patterns
Strategy: validation
Prevention
- Use sglang.kernels.ops.attention.dsa.triton_kernel for Triton DSA kernels
- Treat any attention.nsa import as tech debt
When it happens
Trigger: Importing sglang.srt.layers.attention.nsa.triton_kernel or Triton DSA/NSA kernel helpers through the nsa namespace.
Common situations: Triton-based sparse attention code using old import paths after the NSA→DSA refactor in SGLang.
Related errors
- sglang.srt.layers.attention.nsa.dequant_k_cache is deprecate
- sglang.srt.layers.attention.nsa.index_buf_accessor is deprec
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute i
- sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; u
- sglang.srt.layers.attention.nsa.quant_k_cache is deprecated;
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/62ce4c368d327ab9.
Report an issue: GitHub.