]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml-virtgpu: make the code thread safe (#19204)
authorKevin Pouget <redacted>
Wed, 4 Feb 2026 02:46:18 +0000 (03:46 +0100)
committerGitHub <redacted>
Wed, 4 Feb 2026 02:46:18 +0000 (10:46 +0800)
commit015deb90485b9ebfff492e10fe7080a0439202b6
tree44248faa120c04d95352f4a966efa82f6cbdfa7a
parent2ceda3f6622661af839c19767705f33fb9f6cdd2
ggml-virtgpu: make the code thread safe (#19204)

* ggml-virtgpu: regenerate_remoting.py: add the ability to deprecate a function

* ggml-virtgpu: deprecate buffer_type is_host remoting

not necessary

* ggml-virtgpu: stop using static vars as cache

The static init isn't thread safe.

* ggml-virtgpu: protect the use of the shared memory to transfer data

* ggml-virtgpu: make the remote calls thread-safe

* ggml-virtgpu: backend: don't continue if couldn't allocate the tensor memory

* ggml-virtgpu: add a cleanup function for consistency

* ggml-virtgpu: backend: don't crash if buft->iface.get_max_size is missing

* fix style and ordering

* Remove the static variable in apir_device_get_count

* ggml-virtgpu: improve the logging

* fix review minor formatting changes
27 files changed:
ggml/include/ggml-virtgpu.h
ggml/src/ggml-virtgpu/apir_cs_ggml-rpc-front.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched-backend.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched-buffer-type.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched-buffer.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched-device.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched.cpp
ggml/src/ggml-virtgpu/backend/backend-dispatched.gen.h
ggml/src/ggml-virtgpu/backend/backend-dispatched.h
ggml/src/ggml-virtgpu/backend/backend.cpp
ggml/src/ggml-virtgpu/backend/shared/apir_cs.h
ggml/src/ggml-virtgpu/backend/shared/apir_cs_ggml.h
ggml/src/ggml-virtgpu/ggml-backend-buffer-type.cpp
ggml/src/ggml-virtgpu/ggml-backend-device.cpp
ggml/src/ggml-virtgpu/ggml-backend-reg.cpp
ggml/src/ggml-virtgpu/ggml-remoting.h
ggml/src/ggml-virtgpu/ggmlremoting_functions.yaml
ggml/src/ggml-virtgpu/regenerate_remoting.py
ggml/src/ggml-virtgpu/virtgpu-forward-backend.cpp
ggml/src/ggml-virtgpu/virtgpu-forward-buffer-type.cpp
ggml/src/ggml-virtgpu/virtgpu-forward-buffer.cpp
ggml/src/ggml-virtgpu/virtgpu-forward-device.cpp
ggml/src/ggml-virtgpu/virtgpu-forward-impl.h
ggml/src/ggml-virtgpu/virtgpu-forward.gen.h
ggml/src/ggml-virtgpu/virtgpu-shm.cpp
ggml/src/ggml-virtgpu/virtgpu.cpp
ggml/src/ggml-virtgpu/virtgpu.h