llama.cpp/ggml/src/ggml-virtgpu
Kevin Pouget ffaafde16f
ggml-virtgpu: improve the reliability of the code (#19846)
* ggml-virtgpu-backend: validate the consistency of the received objects

This patch adds consistency checks in the
ggml-virtgpu-backend (running on the host side) to ensure that the
data received from the guest is consistent (valid pointers, valid
sizes and offsets).

* ggml-virtgpu-backend: add fallback/skips for optional ggml backend methods

```
  1. bck->iface.synchronize(bck)
  2. buft->iface.get_alloc_size(buft, op)
  3. buft->iface.get_max_size(buft)
```

these three methods are optional in the GGML interface. `get_max_size`
was already properly defaulted, but `backend sychronize` and `butf
get_max_size` would have segfaulted the backend if not implemented.

* ggml-virtgpu-backend: fix log format missing argument

* ggml-virtgpu-backend: improve the abort message

* ggml-virtgpu-backend: more safety checks

* ggml-virtgpu-backend: new error code

* ggml-virtgpu-backend: initialize all the error codes

* ggml-virtgpu: add a missing comment generated by the code generator

* ggml-virtgpu: add the '[virtgpu]' prefix to the device/buffer names

* ggml-virtgpu: apir_device_buffer_from_ptr: improve the error message

* ggml-virtgpu: shared: make it match the latest api_remoting.h of Virglrenderer APIR

(still unmerged)

* ggml-virtgpu: update the code generator to have dispatch_command_name in a host/guest shared file

* ggml-virtgpu: REMOTE_CALL: fail if the backend returns an error

* docs/backend/VirtGPU.md: indicate that the RAM+VRAM size is limed to 64 GB with libkrun

* ggml-virtgpu: turn off clang-format header ordering for some of the files

Compilation breaks when ordered alphabetically.

* ggml-virtgpu: clang-format

* ggml-virtgpu/backend/shared/api_remoting: better comments for the APIR return codes
2026-02-26 20:00:57 +08:00
..
backend ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
include ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
CMakeLists.txt ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
apir_cs_ggml-rpc-front.cpp ggml-virtgpu: make the code thread safe (#19204) 2026-02-04 10:46:18 +08:00
ggml-backend-buffer-type.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
ggml-backend-buffer.cpp ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
ggml-backend-device.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
ggml-backend-reg.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
ggml-backend.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
ggml-remoting.h ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
ggmlremoting_functions.yaml ggml-virtgpu: make the code thread safe (#19204) 2026-02-04 10:46:18 +08:00
regenerate_remoting.py ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-apir.h ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
virtgpu-forward-backend.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-forward-buffer-type.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-forward-buffer.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-forward-device.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-forward-impl.h ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-forward.gen.h ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu-shm.cpp ggml-virtgpu: make the code thread safe (#19204) 2026-02-04 10:46:18 +08:00
virtgpu-shm.h ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
virtgpu-utils.cpp ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
virtgpu-utils.h ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718) 2026-01-28 17:49:40 +08:00
virtgpu.cpp ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00
virtgpu.h ggml-virtgpu: improve the reliability of the code (#19846) 2026-02-26 20:00:57 +08:00