From 4d70039221b7ee62e7df0921bd7cf942991f1626 Mon Sep 17 00:00:00 2001 From: hongruichen Date: Tue, 18 Jun 2024 23:07:01 +0800 Subject: [PATCH] fix todo --- ggml-qnn.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ggml-qnn.cpp b/ggml-qnn.cpp index b97b202453fa07..7661f758268e35 100644 --- a/ggml-qnn.cpp +++ b/ggml-qnn.cpp @@ -1995,8 +1995,7 @@ class ggml_qnn_tensor_readwrite if (is_npu) { qnn_instance * instance = ctx->instance; uint8_t *qnn_buffer = static_cast(instance->alloc_rpcmem( - ggml_nbytes(tensor), 4)); // TODO: should we get the align param from device here? - if (!qnn_buffer) { + ggml_nbytes(tensor), alignof(void*))); QNN_LOG_WARN("alloc rpcmem failure, %s\n", strerror(errno)); QNN_LOG_DEBUG("tensor%p name %s", _qnn_tensor, QNN_TENSOR_GET_NAME(*_qnn_tensor)); _context = nullptr;