Skip to content

LLM inference in C/C++

C++ ggml

opencl: flush profiling batch at shutdown for incomplete batches (#25016)

shaofeiqi5c7c22c3e134
diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp
index fb330e0625..00f20b09b8 100644
--- a/ggml/src/ggml-opencl/ggml-opencl.cpp
+++ b/ggml/src/ggml-opencl/ggml-opencl.cpp
@@ -850,6 +850,7 @@ struct ggml_backend_opencl_context {
ref_count--;
if (ref_count == 0) {
#ifdef GGML_OPENCL_PROFILING
+ flush_profiling_batch();
write_profiling_info();
profiling_results.clear();
#endif