fix(openvino): explicit memset in buffer_context allocation (#20857)
* fix(openvino): explicit memset in buffer_context allocation * minor --------- Co-authored-by: Dan Hoffman <dhoffman@cyket.net> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
parent
84ffd0c192
commit
cc18f965b6
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue