Commit 82324fc50 for llama.cpp
commit 82324fc508006de234552e701f4509c72c4fdd8d
Author: Marco Colombo <ing.marco.colombo@gmail.com>
Date: Wed Sep 16 17:38:44 2026 +0200
hexagon: accept the zeroed rope probe in supports_op (#28995)
llama probes weight placement with a rope where all params are 0, so rejecting
n_dims == 0 or freq_base == 0 puts rope_freqs on the CPU. That splits the decode
graph at every full-attention layer (gemma-4-E2B: 5 splits instead of 2).
Assisted-by: Claude Opus 5
diff --git a/ggml/src/ggml-hexagon/ggml-hexagon.cpp b/ggml/src/ggml-hexagon/ggml-hexagon.cpp
index ec7801388..36b9f817c 100644
--- a/ggml/src/ggml-hexagon/ggml-hexagon.cpp
+++ b/ggml/src/ggml-hexagon/ggml-hexagon.cpp
@@ -4986,7 +4986,9 @@ static bool ggml_hexagon_supported_rope(const struct ggml_hexagon_session * sess
const int mode = op_params[2];
const int n_offs = op_params[15];
- if (n_dims <= 0 || n_dims % 2 != 0) {
+ // llama probes weight placement with a dummy rope where every param is 0 (llama-model-loader.cpp).
+ // Rejecting it puts rope_freqs on the CPU, which then splits the graph at every full-attention layer.
+ if (n_dims < 0 || n_dims % 2 != 0) {
return false;
}
@@ -4997,7 +4999,7 @@ static bool ggml_hexagon_supported_rope(const struct ggml_hexagon_session * sess
float freq_base;
memcpy(&freq_base, op_params + 5, sizeof(float));
- if (freq_base <= 0.0f) {
+ if (freq_base < 0.0f) {
return false;
}