From 075fd8fa0b1cef651ac22e1b50895d11ebcfbde9 Mon Sep 17 00:00:00 2001 From: metamergebot Date: Thu, 8 Oct 2026 12:47:46 -0700 Subject: [PATCH] [Mamba] Describe the track snapshot dtype by its kernel instead of fp32 (#43192) Co-authored-by: Hanming Lu <69857889+hanming-lu@users.noreply.github.com> Co-authored-by: jiayisuse --- .../srt/layers/attention/hybrid_linear_attn_backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/attention/hybrid_linear_attn_backend.py b/python/sglang/srt/layers/attention/hybrid_linear_attn_backend.py index 0c5f4c49a6..59bbe57901 100644 --- a/python/sglang/srt/layers/attention/hybrid_linear_attn_backend.py +++ b/python/sglang/srt/layers/attention/hybrid_linear_attn_backend.py @@ -1002,8 +1002,9 @@ class MambaAttnBackendBase(AttentionBackend): """Copy extend SSM state at the last chunk boundary to track slots (source depends on chunk alignment; see `_init_track_ssm_indices`). - Unaligned rows read the fp32 ``h_track_buf`` snapshot written in-kernel - when given (its rows follow the batch, selected by the integer index + Unaligned rows read the ``h_track_buf`` snapshot written in-kernel + when given (in the kernel's native state dtype; its rows follow the batch, + selected by the integer index ``track_ssm_h_batch_src`` — a boolean mask would nonzero() and sync the stream once per layer); otherwise they fall back to the per-chunk states ``h`` (already rounded to the activation dtype)."""