]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : recurrent state rollback for ggml_ssm_scan (llama/26623)
authorlnigam <redacted>
Fri, 14 Aug 2026 14:20:40 +0000 (19:50 +0530)
committerGeorgi Gerganov <redacted>
Fri, 14 Aug 2026 19:16:06 +0000 (22:16 +0300)
commitb7ea8b19bf387e1023ce8f86b9e090cd1faed92c
tree80a8f7823b7653f15c21e5e7e49f3a8db65c02b2
parent2aef2a0085f115d45c2a4adf5e706c42f070c854
ggml : recurrent state rollback for ggml_ssm_scan (llama/26623)

* Initial changes for Recurrent state rollback for nemotron for cpu and cuda

* Removing CPU RS rollback. Will enable it in subsequent PRs

* addition of test case

* Removing assert and calling runtime API to check if op is supported

* removing extra API and updating the call sites for K

* replace static cuda detection to runtime fused_op api

* address review comments and fallback when SSM rollback not supprted

* Adding changes for supporting RS-rollback in CPU. Also added test-backend-ops for cpu and cuda

* removing memory manipulation as rs rollback is now supported in CPU

* removing the static probe which is not needed now

* correcting the format

* address review comments

* enabling test for all the backends, unsupported backends will fallback to CPU

* Apply suggestions from code review

Co-authored-by: Georgi Gerganov <redacted>
* choose different graph based on the result of fused_ssm_op is supported or not and also handled memory->n_rs_seq >1 case incase of op is not supported

* Support K > 1 in ssm_scan for all backends

* Fix CI Issues

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Gaurav Garg <redacted>
18 files changed:
ggml/include/ggml.h
ggml/src/ggml-cpu/ggml-cpu.cpp
ggml/src/ggml-cpu/ops.cpp
ggml/src/ggml-cuda/ggml-cuda.cu
ggml/src/ggml-cuda/ssm-scan.cu
ggml/src/ggml-et/et-kernels/src/ssm_scan_f32.c
ggml/src/ggml-et/ggml-et-ops.cpp
ggml/src/ggml-et/ggml-et-ops.h
ggml/src/ggml-metal/ggml-metal-device.m
ggml/src/ggml-metal/ggml-metal-impl.h
ggml/src/ggml-metal/ggml-metal-ops.cpp
ggml/src/ggml-metal/ggml-metal.metal
ggml/src/ggml-sycl/ssm_scan.cpp
ggml/src/ggml-vulkan/ggml-vulkan.cpp
ggml/src/ggml-vulkan/vulkan-shaders/ssm_scan.comp
ggml/src/ggml-webgpu/ggml-webgpu.cpp
ggml/src/ggml-webgpu/wgsl-shaders/ssm_scan.wgsl
ggml/src/ggml.c