﻿# llama.cpp Hexagon SSM_SCAN: qualify state transitions as well as single outputs

F32 SSM_SCAN support in b12373 expands Hexagon coverage; validate carried state and segmented execution before claiming complete model support.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-hexagon-ssm-scan-state-boundary/
Language: en

llama.cpp b12373 adds F32 SSM_SCAN support to the Hexagon backend. The upstream PR reports operation tests on several platform configurations. For a state-space operation, the useful integration question extends beyond one successful call: state carried into the next segment must remain consistent with the reference execution.

## One operation is one coverage increment

Adding SSM_SCAN removes one possible gap in a backend’s operation inventory. It does not establish that every node of a model using state-space layers runs on Hexagon. Inspect the full graph and placement decisions, including conversions and remaining fallback operations. The release should be described as F32 operator support, matching the PR, rather than an unqualified statement that every related model or datatype is now accelerated end to end.

## State is part of the observable result

A proposed local reference check compares both the output sequence and the carried state where the interface exposes it. If only the immediate output is checked, a state error may surface on a later invocation. Use nontrivial initial state as well as a zero-state control, and keep the same mathematical input across backend comparisons. Resetting state between every call would avoid the very integration property the test is meant to verify.

## Segment the same sequence deliberately

Compare processing a sequence in one supported operation with processing it in segments that pass state between them. Account for the implementation’s numerical tolerance rather than demanding unjustified bit identity. Vary segment boundaries so a convenient alignment does not dominate coverage. This is a proposed validation design, not a claim that the upstream patch changed segmentation semantics or that a particular model has already passed these checks here.

## Measure the complete placed graph

After correctness checks, measure the actual placed graph with state transfers included. A fast SSM_SCAN microbenchmark may coexist with transfer overhead or CPU fallback elsewhere, so its time cannot stand in for request latency. Attribute the PR’s hardware test coverage to upstream and record the local device separately. The release adds an important backend building block; the remaining integration evidence belongs to the concrete model and execution route.

## Sources

- [llama.cpp b12373 release](https://github.com/ggml-org/llama.cpp/releases/tag/b12373)
- [llama.cpp pull request #31921](https://github.com/ggml-org/llama.cpp/pull/31921)

## Related reading

- [GatedDeltaNet in Vulkan: CPU fallback and a different HIP bottleneck](/journal/gated-delta-net-vulkan-fallback-hip-kernel-historical-case/)
- [llama.cpp GPU layers: verify partial model offloading](/journal/llama-cpp-gpu-layers/)
