Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
1f88919
OpenVINO backend: 1) enable gpt-oss moe on OV bk; 2) enable mxfp4 sup…
zhaixuejun1993 Jun 23, 2026
4707c44
OpenVINO backend: disable TOPK_MOE op test
zhaixuejun1993 Jun 24, 2026
bbe855b
OpenVINO Backend: Add op FILL support
zhaixuejun1993 Jun 25, 2026
5c3b962
OpenVINO backend: enable set rows with multi dims
zhaixuejun1993 Jun 25, 2026
4b68df1
fix the name missmatch in setrow + view
zhaixuejun1993 Jun 25, 2026
36d0bc3
OpenVINO backend: enable op GGML_UNARY_OP_SIGMOID
zhaixuejun1993 Jun 25, 2026
ef525ec
OpenVINO Backend: enable SQR & SQRT
zhaixuejun1993 Jun 25, 2026
301882b
OpenVINO backend: 1) ensure unique node names for OpenVINO; 2) add or…
zhaixuejun1993 May 27, 2026
e197045
OpenVINO backend: enable fallback for openVINO to CPU backend
zhaixuejun1993 May 27, 2026
bec8a61
OpenVINO backend: fix accurace issue in gemma3n arch test
zhaixuejun1993 Jun 30, 2026
29d14d8
fix mpt failed case
zhaixuejun1993 Jun 30, 2026
c6d80e9
OpenVINO backend: clean nodeinfo
zhaixuejun1993 Jul 3, 2026
32d2b86
OpenVINO Backend: enable zero-size copy for view
zhaixuejun1993 Jul 7, 2026
bf460cb
add concat ssm_conv in compute_dynamic_dim
wine99 May 21, 2026
745a95b
OpenVINO backend: disable EXP with FP32, which failed in op test. Roo…
zhaixuejun1993 Jun 16, 2026
5f77b5f
OpenVINO backend: fix CPY op test failed issue
zhaixuejun1993 Jun 16, 2026
eba9c7c
OpenVINO backend: fix GATED_DELTA_NET op test failed issue
zhaixuejun1993 Jun 16, 2026
05a92b8
handle in-place op, handle qwen35 dynamic clearing of cache in cgraph
wine99 Jun 18, 2026
cb09887
handle qwen35 dynamic clearing of cache correctly
wine99 Jun 23, 2026
8546cb4
Enable qwen35 dense multi seq
wine99 Jun 29, 2026
c13deb5
Fix qwen35 9b gqa
wine99 Jun 30, 2026
c21bf94
Fix after rebase
wine99 Jul 1, 2026
487db27
Disable SOLVE_TRI
wine99 Jul 7, 2026
867a993
openvino: fix NEOX RoPE accuracy on GPU stateful (mixed-rank Multiply)
cavusmustafa Jul 7, 2026
64c9d62
OpenVINO backend: 1) remove the unique name in llama.cpp; 2) add new …
zhaixuejun1993 Jul 8, 2026
58ab393
OpenVINO Backenb: remove changes in llama.cpp
zhaixuejun1993 Jul 8, 2026
7591b24
Doc change (use x64 Native Tools Command Prompt for VS)
virajwad Jul 9, 2026
8452765
Cleaner sentence
virajwad Jul 9, 2026
88fbdc6
OpenVINO Backend: cache key upgrade includes all src name
zhaixuejun1993 Jul 9, 2026
07f5918
OpenVINO Backend: enable llama arch test on ci
zhaixuejun1993 Jul 10, 2026
37d76cb
OpenVINO Backend: move parameter node creating from decoder into tran…
zhaixuejun1993 Jul 3, 2026
110e57a
OpenVINO Backend: create extra input ov node move from decoder to tra…
zhaixuejun1993 Jul 3, 2026
175f422
fix for op regression due to is_model_splitted
suryasidd Jul 17, 2026
e4085c0
openvino: fix CPY writeback for recurrent state rollback
wine99 Jul 27, 2026
7162f3a
qwen35 moe
wine99 Jul 20, 2026
820e72c
optimize MoE expert aggregation with ReduceSum
wine99 Jul 27, 2026
e00e9dd
OpenVINO Backend: fix error in arch test model mpt
zhaixuejun1993 Jul 31, 2026
af2f655
fix error caused by cpy in arch test model kimi-linear
zhaixuejun1993 Jul 31, 2026
d12d18f
Skip GET_ROWS inaccurate test
wine99 Jul 30, 2026
5324634
OpenVINO Backend: fix error in arch test model minimax-m3
zhaixuejun1993 Jul 31, 2026
88b3413
openvino: fallback dynamic MUL_MAT_ID shapes
zhaixuejun1993 Jul 31, 2026
2c49b89
Merge pull request #270 from zhaixuejun1993/xuejun/arch-test-smallthi…
zhaixuejun1993 Aug 1, 2026
8b087c7
Merge pull request #267 from zhaixuejun1993/xuejun/arch-test-mpt
zhaixuejun1993 Aug 1, 2026
090e19e
Merge pull request #268 from zhaixuejun1993/xuejun/arch-test-kimi-lin…
zhaixuejun1993 Aug 1, 2026
5b20788
Merge pull request #269 from zhaixuejun1993/xuejun/arch-test-minimax-m3
zhaixuejun1993 Aug 1, 2026
ec01bd6
openvino: fix GPU mul_mat_id op tests
zhaixuejun1993 Aug 3, 2026
fd36389
Merge pull request #271 from zhaixuejun1993/xuejun/fix-op-test-failed
zhaixuejun1993 Aug 3, 2026
fa089b1
ggml-openvino: add GGML_OPENVINO_RELEASE_WEIGHTS to reclaim host weig…
Jun 25, 2026
98698af
ggml-openvino: stream weight requantization to cut the compile-time R…
Jun 30, 2026
9222c69
ggml-openvino: avoid redundant token_embd requantization at compile
Jun 30, 2026
7af5940
ggml-openvino: gate compile-memory optimizations behind GGML_OPENVINO…
Jun 30, 2026
72090f4
ggml-openvino: add frontend model cache (GGML_OPENVINO_MODEL_CACHE_DIR)
Jun 30, 2026
2efe0b5
ggml-openvino: harden frontend model cache correctness
zhaixuejun1993 Jul 31, 2026
edf91ec
ggml-openvino: add memory optimization umbrella switch
zhaixuejun1993 Jul 31, 2026
b3c3d8b
ggml-openvino: rename compiled model cache env
zhaixuejun1993 Jul 31, 2026
4e8215d
docs: document OpenVINO memory optimization env vars
zhaixuejun1993 Aug 4, 2026
fa75be4
Merge pull request #275 from zhaixuejun1993/ov-mem-optimizations-v1
zhaixuejun1993 Aug 4, 2026
ed4c66a
ggml-openvino: fix Qwen3VL crash and deepstack correctness bug
wine99 Aug 3, 2026
ad1f97a
ggml-openvino: fix IMROPE inp_pos padding for NPU static shapes
wine99 Aug 4, 2026
91c707a
ggml-openvino: extract op support policy into dedicated module
zhaixuejun1993 Aug 4, 2026
70f308f
ggml-openvino: document full op policy table
zhaixuejun1993 Aug 4, 2026
bdbca74
ggml-openvino: manage buffer extras with RAII
zhaixuejun1993 Aug 6, 2026
4b16b4e
ggml-openvino: split weight buffer release helper
zhaixuejun1993 Aug 7, 2026
fa364d8
ggml-openvino: avoid duplicated buffer storage state
zhaixuejun1993 Aug 7, 2026
646a11e
ggml-openvino: drop unused buffer context name
zhaixuejun1993 Aug 7, 2026
befe071
ggml-openvino: split concrete buffer implementation
zhaixuejun1993 Aug 10, 2026
0dc7070
ggml-openvino: document public backend API
zhaixuejun1993 Aug 10, 2026
2bd4cd4
ggml-openvino: store host buffer type names
zhaixuejun1993 Aug 10, 2026
635a50b
ggml-openvino: tag buffer type contexts
zhaixuejun1993 Aug 10, 2026
2784cb5
ggml-openvino: share stateful execution helper
zhaixuejun1993 Aug 10, 2026
83f4a30
ggml-openvino: move unused markers before returns
zhaixuejun1993 Aug 10, 2026
0f8f384
ggml-openvino: share buffer type initialization
zhaixuejun1993 Aug 10, 2026
4492719
ggml-openvino: trim stale main includes
zhaixuejun1993 Aug 10, 2026
ce60be9
ggml-openvino: document logical device count
zhaixuejun1993 Aug 10, 2026
aa0f519
ggml-openvino: document registry singleton ownership
zhaixuejun1993 Aug 10, 2026
a0914a2
openvino: split quantization layout helpers
zhaixuejun1993 Aug 10, 2026
36fec73
openvino: add quantization storage plan
zhaixuejun1993 Aug 10, 2026
92b575b
openvino: share integer weight graph builder
zhaixuejun1993 Aug 10, 2026
e41e3f7
openvino: name integer zero point modes
zhaixuejun1993 Aug 10, 2026
efd5785
openvino: centralize quantized weight shapes
zhaixuejun1993 Aug 10, 2026
773fc3b
openvino: split quantized weight graph builders
zhaixuejun1993 Aug 10, 2026
27cc64e
openvino: split quantized weight extraction
zhaixuejun1993 Aug 10, 2026
4ebfcdb
openvino: split quantized weight requantization
zhaixuejun1993 Aug 10, 2026
812bb70
openvino: rename quantized weight orchestration
zhaixuejun1993 Aug 10, 2026
026d696
openvino: rename quant weight header
zhaixuejun1993 Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build-openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,16 @@ jobs:

- name: Test (CPU)
id: cmake_test_cpu
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
cd ${{ github.workspace }}
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs" --verbose --timeout 2000
ctest --test-dir build/ReleaseOV -L main --verbose --timeout 2000

- name: Test (GPU)
id: cmake_test_gpu
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
cd ${{ github.workspace }}
export GGML_OPENVINO_DEVICE=GPU
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs" --verbose --timeout 3000
ctest --test-dir build/ReleaseOV -L main --verbose --timeout 3000

openvino-windows-2022:
runs-on: windows-2022
Expand Down Expand Up @@ -159,11 +157,10 @@ jobs:
- name: Test (CPU)
id: cmake_test_cpu
shell: cmd
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
REM Find extracted OpenVINO folder dynamically
for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
call "%OPENVINO_ROOT%\setupvars.bat"

cd build
ctest --test-dir ReleaseOV -L main -E "test-llama-archs" -C Release --verbose --timeout 3000
ctest --test-dir ReleaseOV -L main -C Release --verbose --timeout 3000
6 changes: 5 additions & 1 deletion docs/backend/OPENVINO.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ cmake -B build/ReleaseOV -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_OPENVINO=ON
cmake --build build/ReleaseOV --parallel
```

- **Windows:** Open a **Developer Command Prompt for VS 2022** (so the MSVC toolchain is on `PATH`), then run:
- **Windows:** Open **x64 Native Tools Command Prompt for VS** (so the MSVC toolchain is on `PATH`), then run:

```cmd
C:\Intel\openvino\setupvars.bat
Expand Down Expand Up @@ -710,11 +710,15 @@ Boolean flags follow a uniform convention: set to a **positive integer** (e.g. `
|-----------------------------------|-----------|------------|-------------------------------------------------------------------------------------------------------------|
| `GGML_OPENVINO_DEVICE` | String | `CPU` | Specify the target device (CPU, GPU, NPU). On systems with multiple GPUs, use `GPU.0` or `GPU.1` to explicitly target specific GPU. See [OpenVINO GPU Device](https://docs.openvino.ai/2026/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.html). When set to **NPU**, static compilation mode is enabled for optimal performance. |
| `GGML_OPENVINO_CACHE_DIR` | String | `not set` | Directory for OpenVINO model caching (recommended: `/tmp/ov_cache`). Enables model caching when set. **Not supported on NPU devices.** |
| `GGML_OPENVINO_COMPILED_MODEL_CACHE_DIR` | String | `not set` | Directory for the frontend compiled-model cache. When set, OpenVINO compiled models are exported as blobs and imported on later runs to skip weight requantization, graph conversion, and compilation for matching single-graph models. |
| `GGML_OPENVINO_PREFILL_CHUNK_SIZE`| Integer | `256` | Token chunk size for **NPU** prefill (NPU-only; ignored on CPU/GPU). Must be a positive integer; otherwise the default is used. |
| `GGML_OPENVINO_STATEFUL_EXECUTION`| Boolean | `0` | Enable stateful KV cache for better performance. Recommended on CPU, GPU. |
| `GGML_OPENVINO_DISABLE_CACHE` | Boolean | `0` | Disable the in-process compiled-model / decoder cache (cache is on by default). Set to `1` to disable. |
| `GGML_OPENVINO_DISABLE_KV_SLICE` | Boolean | `0` | Disable the KV-cache input-tensor slicing optimization (slicing is on by default on CPU/GPU). Set to `1` to disable. |
| `GGML_OPENVINO_MANUAL_GQA_ATTN` | Boolean | device-based | Tri-state. When **unset**, manual GQA attention is enabled by default on `GPU` and disabled on other devices. Set to a positive integer to force-enable, or `0` to force-disable. |
| `GGML_OPENVINO_MEMORY_OPTIMIZE` | Boolean | `0` | Umbrella switch for compile-time memory reductions. Enables `GGML_OPENVINO_REDUCE_COMPILE_MEM` and, on GPU, `GGML_OPENVINO_RELEASE_WEIGHTS` unless those fine-grained variables are explicitly set. |
| `GGML_OPENVINO_REDUCE_COMPILE_MEM`| Boolean | inherits from `GGML_OPENVINO_MEMORY_OPTIMIZE` | Reduce compile-time host memory use by streaming weight requantization and avoiding extra weight-node materialization where possible. Set explicitly to override the umbrella switch. |
| `GGML_OPENVINO_RELEASE_WEIGHTS` | Boolean | inherits from `GGML_OPENVINO_MEMORY_OPTIMIZE` on GPU | GPU-only. Release host weight buffers after the compiled model cache can reuse the device/plugin copy. Requires stable graph shapes; dynamic workloads that need recompilation should leave this disabled. |
| `GGML_OPENVINO_PROFILING` | Boolean | `0` | Enable execution-time profiling. |
| `GGML_OPENVINO_DUMP_CGRAPH` | Boolean | `0` | Dump the GGML compute graph to `cgraph_ov.txt`. |
| `GGML_OPENVINO_DUMP_IR` | Boolean | `0` | Serialize OpenVINO IR files with timestamps. |
Expand Down
28 changes: 28 additions & 0 deletions ggml/include/ggml-openvino.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,53 @@ extern "C" {
#define GGML_OPENVINO_NAME "OPENVINO"

// backend API
/// \brief Initialize an OpenVINO backend instance for the given device.
/// \param device OpenVINO device index to initialize.
/// \return OpenVINO backend instance, or nullptr if initialization fails.
GGML_BACKEND_API ggml_backend_t ggml_backend_openvino_init(int device);

/// \brief Return whether the backend instance is an OpenVINO backend.
/// \param backend Backend instance to query.
/// \return True if the backend is an OpenVINO backend.
GGML_BACKEND_API bool ggml_backend_is_openvino(ggml_backend_t backend);

/// \brief Return whether the buffer instance is an OpenVINO backend buffer.
/// \param buffer Backend buffer instance to query.
/// \return True if the buffer is an OpenVINO backend buffer.
GGML_BACKEND_API bool ggml_backend_buffer_is_openvino(ggml_backend_buffer_t buffer);

/// \brief Return whether the buffer type is an OpenVINO device buffer type.
/// \param buft Backend buffer type to query.
/// \return True if the buffer type is an OpenVINO device buffer type.
GGML_BACKEND_API bool ggml_backend_buft_is_openvino(ggml_backend_buffer_type_t buft);

/// \brief Return whether the buffer type is an OpenVINO host buffer type.
/// \param buft Backend buffer type to query.
/// \return True if the buffer type is an OpenVINO host buffer type.
GGML_BACKEND_API bool ggml_backend_buft_is_openvino_host(ggml_backend_buffer_type_t buft);

/// \brief Return the context identifier for an OpenVINO backend buffer.
/// \param buffer Backend buffer instance to query.
/// \return OpenVINO buffer context identifier, or 0 if the buffer is not an OpenVINO buffer.
GGML_BACKEND_API size_t ggml_backend_openvino_buffer_get_ctx_id(ggml_backend_buffer_t buffer);

// device buffer
/// \brief Return the OpenVINO device buffer type for the given device.
/// \param device OpenVINO device index.
/// \return OpenVINO device buffer type.
GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_openvino_buffer_type(int device);

/// \brief Return the OpenVINO host buffer type for the given device.
/// \param device OpenVINO device index.
/// \return OpenVINO host buffer type.
GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_openvino_host_buffer_type(int device);

/// \brief Return the number of OpenVINO devices available to the backend.
/// \return Number of OpenVINO devices.
GGML_BACKEND_API int ggml_backend_openvino_get_device_count(void);

/// \brief Return the OpenVINO backend registry instance.
/// \return OpenVINO backend registry instance.
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_openvino_reg(void);

#ifdef __cplusplus
Expand Down
Loading
Loading