Repository navigation
b12754
Pre-releaseggml-openvino: fix CI op tests and improve KV cache decode (#33002)
- ggml-openvino: write back consumed in-place nodes of op-test graphs
On the naive path every node of an op-test graph is a model output,
except an in-place node that another node reads: it got no output, so
its destination buffer was never written. GATED_DELTA_NET_CACHE_FUSION
copies the final state into the cache and then reads the copy, so the
cache kept its old contents.
Write such a node back through its view_src, as is already done when
nothing reads it. Model graphs are unchanged.
- ggml-openvino: keep the rest of the buffer in a partial in-place FILL
An in-place FILL on a view into part of a larger buffer produced only
the filled values. Its output stands for the whole in-place source, so
the write-back put those values at the start of the buffer and not at
the view's offset.
For a contiguous view with a static shape, build the whole buffer: the
elements before the view, the filled values, then the elements after
it. Add NodeContext::get_inplace_op_src() to detect the in-place case.
- ggml-openvino: fix softplus precision for large negative inputs
softplus was computed as relu(x) + log(1 + exp(-|x|)). When exp(-|x|)
is below the precision of 1 + exp(-|x|), the log returns 0 or one ulp,
so for x below about -16 in f32 the result was 0 or far off. The
SOFTPLUS test case with inputs in [-16.6, -16] fails on CPU and GPU.
Compute log1p(y) for y = exp(-|x|) with the series
y - y^2/2 + y^3/3 - y^4/4 when y < 0.01, where its relative error is
below 2e-9, and keep log(1 + y) above that.
- ggml-openvino: finer GPU KV rounding for decode batches
Rounding the GPU KV length up to a power of two makes a batch attend up
to twice the rows that hold data right after each power of two. Decode
reads every attended row, so long contexts lose decode speed.
The GPU plugin keeps memory for each attended length: several large
buffers for a prompt batch, about one copy of K and V for a decode
batch. Keep the power of two for prompt batches (more than 16 tokens
per sequence), and round decode batches up to a multiple of 2^k / 4 and
of 256. That is four lengths per power of two, with at most 25% masked
rows.
-
ggml-openvino : keep the head axis of the 4-D KV cache static
-
ggml-openvino: split two one-line lambdas per clang-format
The backend's .clang-format keeps a lambda on one line only when it is a
function argument (AllowShortLambdasOnASingleLine: Inline). The constant
helpers in the softplus and FILL translators are assigned to variables,
so clang-format splits them. Formatting only.
Co-authored-by: Mustafa Cavus mustafa.cavus@intel.com
Website:
Attestations:
macOS/iOS:
- macOS Apple Silicon (arm64)
- macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED
- macOS Intel (x64)
- iOS XCFramework
Linux:
- Ubuntu x64 (CPU)
- Ubuntu arm64 (CPU)
- Ubuntu 24.04 s390x (CPU)
- Ubuntu 26.04 s390x (CPU)
- Ubuntu 26.04 s390x (zDNN)
- Ubuntu x64 (Vulkan)
- Ubuntu arm64 (Vulkan)
- Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries
- Ubuntu x64 (CUDA 13) - CUDA 13.5 libraries
- Ubuntu arm64 (CUDA 13) - CUDA 13.5 libraries
- Ubuntu x64 (ROCm 10.0)
- Ubuntu x64 (OpenVINO)
- Ubuntu x64 (SYCL FP32)
- Ubuntu x64 (SYCL FP16)
- Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide
Android:
Windows:
- Windows x64 (CPU)
- Windows arm64 (CPU)
- Windows arm64 (OpenCL Adreno)
- Windows x64 (CUDA 12) - CUDA 12.4 DLLs
- Windows x64 (CUDA 13) - CUDA 13.5 DLLs
- Windows arm64 (CUDA 13) - CUDA 13.5 DLLs
- Windows x64 (Vulkan)
- Windows arm64 (Vulkan)
- Windows x64 (OpenVINO)
- Windows x64 (SYCL)
- Windows x64 (ROCm 10.0)
openEuler:
- DISABLED
- openEuler x86 (310p)
- openEuler x86 (910b, ACL Graph)
- openEuler aarch64 (310p)
- openEuler aarch64 (910b, ACL Graph)
UI: