Skip to content

Commit 9d6f7be

Browse files
author
Dan Hoffman
committed
fix(openvino): explicit memset in buffer_context allocation
1 parent 4cb7e0b commit 9d6f7be

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ggml/src/ggml-openvino/ggml-openvino.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ struct ggml_backend_openvino_buffer_context {
9797
ov_buffer = std::make_shared<ov::intel_gpu::ocl::USMTensor>(std::move(usm_tensor));
9898
} else {
9999
data = ggml_aligned_malloc(size);
100+
if (data != nullptr) {
101+
memset(data, 0, size);
102+
}
100103
ov_buffer = std::make_shared<ov::Tensor>(ov::element::u8, ov::Shape{size}, data);
101104
}
102105

0 commit comments

Comments
 (0)