]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
opencl: bugfix increment ref_count in ggml_backend_opencl_init() (#26162)
authorakleine <redacted>
Sun, 2 Aug 2026 13:43:00 +0000 (15:43 +0200)
committerGitHub <redacted>
Sun, 2 Aug 2026 13:43:00 +0000 (06:43 -0700)
commitc745be2a2c5aefbf9f3ced0440804373731890b6
treea83db2d4322a3986cd8799d861a6205d3c1d4bcb
parent596a5795bdd6da317ea103fc06c0a71c296e3669
opencl: bugfix increment ref_count in  ggml_backend_opencl_init() (#26162)

Incrementing `ref_count` at the beginning is important later
in the `free()` method of the `ggml_backend_opencl_context` at program end.
If we do not increment the `ref_count`, the result would be -1 here,
and consequently, the profiling data would not be flushed and written.
( #ifdef GGML_OPENCL_PROFILING )
ggml/src/ggml-opencl/ggml-opencl.cpp