sgl-project/sglang · error · NotImplementedError
AITER Sage backend does not have a metadata builder.
Error message
AITER Sage backend does not have a metadata builder.
What it means
The AITER Sage attention backend intentionally does not provide an AttentionMetadataBuilder; get_builder_cls raises NotImplementedError just like the base AITer backend. It uses plain AttentionMetadata (get_metadata_cls) and needs no per-batch metadata construction.
Source
Thrown at python/sglang/multimodal_gen/runtime/layers/attention/backends/aiter_sage.py:32
class AITERSageBackend(AttentionBackend):
@staticmethod
def get_enum() -> AttentionBackendEnum:
return AttentionBackendEnum.AITER_SAGE
@staticmethod
def get_impl_cls() -> type["AITERSageImpl"]:
return AITERSageImpl
@staticmethod
def get_metadata_cls() -> type["AttentionMetadata"]:
# AITER Sage backend does not require special metadata.
return AttentionMetadata
@staticmethod
def get_builder_cls() -> type["AttentionMetadataBuilder"]:
raise NotImplementedError(
"AITER Sage backend does not have a metadata builder."
)
class AITERSageImpl(AttentionImpl):
def __init__(
self,
num_heads: int,
head_size: int,
softmax_scale: float,
causal: bool = False,
num_kv_heads: int | None = None,
prefix: str = "",
dropout_p: float = 0.0,
**extra_impl_args,
) -> None:
View on GitHub (pinned to 0132848349)
Solutions
- Skip builder instantiation for the Sage backend; guard with try/except NotImplementedError or a capability check
- Use get_metadata_cls() which returns the base AttentionMetadata
- Redesign the dispatch to treat a missing builder as 'no metadata needed' rather than fatal
Example fix
# before
builder = backend.get_builder_cls()()
# after
builder = None
if backend.get_builder_cls is not AITERSageBackend.get_builder_cls:
builder = backend.get_builder_cls()() Defensive patterns
Strategy: try-catch
Try / catch
try:
builder_cls = backend.get_builder_cls()
except NotImplementedError:
builder_cls = None Prevention
- Maintain a per-backend capability map (has_builder: bool) instead of assuming uniform interfaces
When it happens
Trigger: Calling AITERSageBackend.get_builder_cls() directly or from generic code that instantiates builders for every registered backend.
Common situations: Backend-agnostic orchestration code that assumes all backends implement get_builder_cls; startup probing loops over the backend registry.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- AITer backend does not have a metadata builder.
- AITer backend requires num_heads ({num_heads}) to be a multi
- AITER Sage attention is not available, please update AITER v
- native MXFP8 MoE only supports gated swiglu-oai, got {activa
- {type(self).__name__} does not implement packed varlen atten
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/4de4cfe2dabdb1ab.
Report an issue: GitHub.