Commit d66105c3 for whisper.cpp
commit d66105c34b65f81b8ee583d5287220349e5633d0
Author: Aman Gupta <amangupta052@gmail.com>
Date: Tue Nov 3 15:28:35 2026 +0800
delta_net_base: refactor conv state (llama/30878)
* delta_net: access conv state via views
* fix sm tensor
* delta_net: fill the conv slot index on the host
The rollback slot index of the conv windows is a constant per graph
shape. It is now an I32 input of the recurrent memory filled on the
host, instead of an arange and an argsort computed on the device, and
the meta backend no longer needs a mirrored split for ARANGE.
---------
Co-authored-by: Pascal <admin@serveurperso.com>
diff --git a/ggml/src/ggml-backend-meta.cpp b/ggml/src/ggml-backend-meta.cpp
index 2641e1f3..c30bdae4 100644
--- a/ggml/src/ggml-backend-meta.cpp
+++ b/ggml/src/ggml-backend-meta.cpp
@@ -700,6 +700,26 @@ static struct ggml_backend_meta_split_state ggml_backend_meta_get_split_state(
}
GGML_ABORT("fatal error");
}
+ // permuted view: split the view dim that spans the src split axis, other dims must be inside one element of it or outside the span
+ if (ggml_is_permuted(tensor) && !ggml_is_permuted(tensor->src[0]) && axis >= 0 && axis < GGML_MAX_DIMS-1) {
+ const size_t nb_axis = tensor->src[0]->nb[axis];
+ const size_t nb_next = tensor->src[0]->nb[axis+1];
+ for (int dim = 0; dim < GGML_MAX_DIMS; dim++) {
+ if (tensor->ne[dim] == 1 || tensor->nb[dim] < nb_axis || tensor->nb[dim]*tensor->ne[dim] != nb_next) {
+ continue;
+ }
+ bool others_ok = true;
+ for (int i = 0; i < GGML_MAX_DIMS; i++) {
+ if (i == dim || tensor->ne[i] == 1) {
+ continue;
+ }
+ others_ok = others_ok && (tensor->nb[i]*tensor->ne[i] <= tensor->nb[dim] || tensor->nb[i] % nb_next == 0);
+ }
+ if (others_ok) {
+ return {ggml_backend_meta_split_axis(dim), {0}, {1}, 1};
+ }
+ }
+ }
if (src_ss[0].axis == GGML_BACKEND_SPLIT_AXIS_MIRRORED || src_ss[0].axis == GGML_BACKEND_SPLIT_AXIS_PARTIAL) {
return src_ss[0];
}