use helper function instead

This commit is contained in:
hongruichen 2024-07-10 00:31:13 +08:00
parent a7be0693ba
commit 9add256efe

View file

@ -49,8 +49,7 @@ public:
// TODO: set the quantizeParams base on the tensor type
QNN_TENSOR_SET_RANK(_qnn_tensor, qnn::get_ggml_tensor_rank(tensor));
const bool is_npu = device == QNN_BACKEND_NPU;
if (is_npu) {
if (should_use_mem_handle()) {
QNN_TENSOR_SET_MEM_TYPE(_qnn_tensor, QNN_TENSORMEMTYPE_MEMHANDLE);
QNN_TENSOR_SET_MEM_HANDLE(_qnn_tensor, nullptr);
} else {