{"record":{"id":"62ce4c368d327ab9","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-triton-kernel-is-d","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.triton_kernel is deprecated; use sglang.kernels.ops.attention.dsa.triton_kernel instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.triton_kernel is deprecated; use sglang\\.kernels\\.ops\\.attention\\.dsa\\.triton_kernel instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/triton_kernel.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.triton_kernel instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.triton_kernel is deprecated; \"\n    \"use sglang.kernels.ops.attention.dsa.triton_kernel instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.kernels.ops.attention.dsa.triton_kernel import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/triton_kernel.py#L1-L11","documentation":"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.","triggerScenarios":"Importing sglang.srt.layers.attention.nsa.triton_kernel or Triton DSA/NSA kernel helpers through the nsa namespace.","commonSituations":"Triton-based sparse attention code using old import paths after the NSA→DSA refactor in SGLang.","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"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.triton_kernel import *\n# after\nfrom sglang.kernels.ops.attention.dsa.triton_kernel import *","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use sglang.kernels.ops.attention.dsa.triton_kernel for Triton DSA kernels","Treat any attention.nsa import as tech debt"],"tags":["deprecation","sglang","triton","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}