Skip to content

ggml-openvino: back GPU host buffers with a file by default on Linux - #431

Closed
suhas-somashekar-intel wants to merge 19 commits into
ravi9:dev_backend_openvinofrom
suhas-somashekar-intel:ov-gpu-file-backed-weights
Closed

suhas-somashekar-intel wants to merge 19 commits into
ravi9:dev_backend_openvinofrom
suhas-somashekar-intel:ov-gpu-file-backed-weights

Conversation

@suhas-somashekar-intel

Copy link
Copy Markdown

Overview

Additional information

Requirements

@suhas-somashekar-intel
suhas-somashekar-intel marked this pull request as draft November 17, 2026 18:55
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 6 times, most recently from 45e6c13 to 51fc2f9 Compare November 23, 2026 19:20
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 3 times, most recently from 7d8ccda to e0b9fd7 Compare November 27, 2026 02:29
wine99 and others added 18 commits December 1, 2026 00:27
Reuse Qwen vision graphs across image resolutions with runtime spatial
shapes and interpolation targets. Support Gemma spatial positions,
normalized vision attention and variable image-embedding counts.
Preserve recurrent cache state and sequence grouping during parallel
serving, using the native single-output cache-update contract. Keep
KV head dimensions fixed after relayout when applying dynamic axes.

Validated image requests and four-slot unified/split KV serving for
Qwen3.5 and Gemma4 E2B on OpenVINO CPU and GPU. Vision and recurrent
backend regressions passed 21/21 on each device.

(cherry picked from commit d64dcb5594db74c0f03945cac668aefcca75e0b1)
Store weight allocation generations separately from graph descriptors.
Private cache keys retain allocation isolation, while dynamic model
fingerprints stay stable when the same source weights are reloaded.
Honor GGML_PREC_F32 on MatMul src1 with node precision guards and precision-sensitive input paths, including grouped-query attention. Keep other branches at their configured precision. Probe the runtime helper and include precision guards in cache identities.

Validated on the local OpenVINO 2026.5.1 CPU/GPU runtime: 12/12 F32 precision cases under CPU default, CPU BF16 and GPU FP16 hints; mixed-precision branches and cached F32/default/F32 transitions; five real audio preprocessing lengths per device.
The official OpenVINO 2026.4.1 Runtime SDK exports the node precision helper. Remove its link probe and conditional fallback while retaining the Runtime SDK declaration shim and the recurrent-cache-op guard.

Validated the downloaded SDK with a compiled/linked API probe and 12/12 F32 MatMul cases on default CPU and FP16-hint GPU. The local 2026.5.1 build also passes 12/12 on each device. An additional 2026.4.1 CPU BF16-hint check has seven precision failures, independent of this availability-guard removal.
Move the exported helper declaration into mulmat.cpp and remove the single-consumer precision_control.hpp header.

Validated builds and 12/12 F32 MatMul cases on CPU/GPU with both the local OpenVINO build and the official 2026.4.1 Runtime SDK.

Assisted-by: Codex
NPUW, the partitioning layer of the NPU plugin, has its own MoE support.
It isolates the experts into functions and runs only the routed experts for
each token, with the router on the host (the `HOST_ROUTED` mode).
This PR translates the MoE block of a model into the form NPUW recognises,
and sets the NPUW properties for that mode.
ov_graph_compute_static scanned every node of the graph for a MoE block on
each call, cache hits included, to choose the NPUW MoE properties.
set_input_output already matches each MoE block when the decoder is built,
so it now records the result in GgmlOvDecoder::has_moe_block(), and the
properties are added from that flag when a graph compiles. The properties
are the same as before.
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 8 times, most recently from 5b4342a to a274a39 Compare December 4, 2026 16:14
@ravi9

ravi9 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Closing this in favor of GGML_OPENVINO_COMPILE_MEM_SPILL in #483 .
Thank you for the PR.

@ravi9 ravi9 closed this Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants