Skip to content

hexagon: run non-row concats on the CPU - #67

Merged
khanhnd61-vr merged 1 commit into
VinRobotics:mainfrom
thanhdq1o2:hexagon-linux-iq10
Oct 29, 2026
Merged

khanhnd61-vr merged 1 commit into
VinRobotics:mainfrom
thanhdq1o2:hexagon-linux-iq10

Conversation

@thanhdq1o2

Copy link
Copy Markdown
Contributor

On Linux (IQ-10, Hexagon v81, llama.cpp b11223) every model aborted on its first predict with
ggml-hex: HTP0 synchronize failed : dsp-error NO-SUPPORT.

ggml-hexagon's supports_op accepts every CONCAT, but for buffers mapped above 4 GB of DSP address
space the HTP's op_concat runs only the dim-1 contiguous DMA copy and returns HTP_STATUS_NO_SUPPORT
for anything else (the generic path refuses extended buffers). This adds a rule to the fallback
wrapper, next to the GELU / gapped-broadcast / IM2COL ones, so the other concats run on the CPU.

Verified

IQ-10 board (Linux, Hexagon v81), stock llama.cpp b11223 skel, cross-built with the
ghcr.io/snapdragon-toolchain/arm64-linux:v0.7 image. vla_predict_check at Hexagon defaults
against the same binary with VLA_DEVICE=cpu --weight-dtype f32, no GGML_HEXAGON_OPFILTER:

Model max|Δ| vs CPU F32 Concats moved to CPU
SmolVLA 7.2e-4 [960,50]
π0.5 3.6e-4 1 shape
Evo-1 4.1e-4 none
GR00T N1.5 1.7e-3 1 shape
GR00T N1.6 1.3e-3 1 shape
GR00T N1.7 5.4e-3 1 shape

Before the change SmolVLA aborted, and ran with GGML_HEXAGON_OPFILTER=CONCAT; with the change it
gives the same output with no environment variable. GR00T N1.7 is above the 2.9e-3 bar independently
of this change; that will be a separate PR.

Other backends are unaffected: the rule is gated on Hexagon, so OpenCL builds behave as before, and
CUDA, Metal and CPU builds do not compile the wrapper. Not tested on a Snapdragon X laptop (v73),
where these concats now also run on the CPU.

ggml-hexagon's supports_op accepts every CONCAT, but on buffers mapped
above 4 GB of DSP address space the HTP runs only the dim-1 contiguous
DMA copy and returns NO_SUPPORT for anything else, which aborts the
host. Refuse the other concats in the fallback wrapper so they run on
the CPU.

Verified on IQ-10 (Linux, Hexagon v81, llama.cpp b11223): SmolVLA,
pi0.5, Evo-1 and GR00T N1.5/N1.6/N1.7 run with no OPFILTER; output
matches GGML_HEXAGON_OPFILTER=CONCAT. Other backends are unaffected.
@khanhnd61-vr
khanhnd61-vr merged commit 821e067 into VinRobotics:main Oct 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants