sgl-project/sglang · warning · DeprecationWarning

sglang.srt.layers.attention.nsa.tilelang_kernel is deprecate

Error message

sglang.srt.layers.attention.nsa.tilelang_kernel is deprecated; use sglang.kernels.ops.attention.dsa.tilelang_kernel instead.

What it means

Import-time DeprecationWarning: the tilelang kernel module moved from sglang.srt.layers.attention.nsa.tilelang_kernel to sglang.kernels.ops.attention.dsa.tilelang_kernel. The shim star-imports the new module and warns.

Source

Thrown at python/sglang/srt/layers/attention/nsa/tilelang_kernel.py:4

# [Deprecated] Re-export shim for backward compatibility. Use dsa.tilelang_kernel instead.
import warnings

warnings.warn(
    "sglang.srt.layers.attention.nsa.tilelang_kernel is deprecated; "
    "use sglang.kernels.ops.attention.dsa.tilelang_kernel instead.",
    DeprecationWarning,
    stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.tilelang_kernel import *  # noqa: F401, F403

View on GitHub (pinned to 0132848349)

Solutions

  1. Change the import to sglang.kernels.ops.attention.dsa.tilelang_kernel
  2. Verify the sglang-kernels package version that provides the new path is installed
  3. Remove cached .pyc of the old module if stale

Example fix

# before
from sglang.srt.layers.attention.nsa.tilelang_kernel import *
# after
from sglang.kernels.ops.attention.dsa.tilelang_kernel import *
Defensive patterns

Strategy: validation

Validate before calling

null

Prevention

When it happens

Trigger: Importing the tilelang kernel module via the nsa path, typically when a TileLang-based DSA/NSA backend is selected.

Common situations: Enabling the tilelang attention backend on code that still imports from the old namespace after upgrading SGLang.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/6a906492d2d26280. Report an issue: GitHub.