]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
opencl: bugfix increment ref_count in ggml_backend_opencl_init() (llama/26162)
authorakleine <redacted>
Sun, 2 Aug 2026 13:43:00 +0000 (15:43 +0200)
committerGeorgi Gerganov <redacted>
Tue, 4 Aug 2026 10:37:47 +0000 (13:37 +0300)
commit4e7439e81f81c8fb5b130d6a2c0b95c52b9db48e
tree66c7ecc81be7de33af9d7e3235500697b6aa0ef2
parentd735ac6361452c8cdc89fdff524a1f21a5788a4d
opencl: bugfix increment ref_count in ggml_backend_opencl_init() (llama/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