Repository navigation
hexagon: run non-row concats on the CPU - #67
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_opaccepts every CONCAT, but for buffers mapped above 4 GB of DSP addressspace the HTP's
op_concatruns only the dim-1 contiguous DMA copy and returnsHTP_STATUS_NO_SUPPORTfor 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
b11223skel, cross-built with theghcr.io/snapdragon-toolchain/arm64-linux:v0.7image.vla_predict_checkat Hexagon defaultsagainst the same binary with
VLA_DEVICE=cpu --weight-dtype f32, noGGML_HEXAGON_OPFILTER:[960,50]Before the change SmolVLA aborted, and ran with
GGML_HEXAGON_OPFILTER=CONCAT; with the change itgives 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.