]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
fix(openvino): explicit memset in buffer_context allocation (llama/20857)
authorDan Hoffman <redacted>
Mon, 23 Mar 2026 06:05:37 +0000 (23:05 -0700)
committerGeorgi Gerganov <redacted>
Sat, 28 Mar 2026 11:39:09 +0000 (13:39 +0200)
* fix(openvino): explicit memset in buffer_context allocation

* minor

---------

Co-authored-by: Dan Hoffman <redacted>
Co-authored-by: Georgi Gerganov <redacted>
src/ggml-openvino/ggml-openvino.cpp

index 0031cb7369fd8898b63f6f43430e682f3719397b..b3058b4af73cdd0e0e6ba875d7177f82262d9faa 100644 (file)
@@ -97,6 +97,8 @@ struct ggml_backend_openvino_buffer_context {
             ov_buffer = std::make_shared<ov::intel_gpu::ocl::USMTensor>(std::move(usm_tensor));
         } else {
             data = ggml_aligned_malloc(size);
+            GGML_ASSERT(data);
+            memset(data, 0, size);
             ov_buffer = std::make_shared<ov::Tensor>(ov::element::u8, ov::Shape{size}, data);
         }