use helper function instead
This commit is contained in:
parent
a7be0693ba
commit
9add256efe
1 changed files with 2 additions and 3 deletions
|
@ -49,8 +49,7 @@ public:
|
||||||
// TODO: set the quantizeParams base on the tensor type
|
// TODO: set the quantizeParams base on the tensor type
|
||||||
QNN_TENSOR_SET_RANK(_qnn_tensor, qnn::get_ggml_tensor_rank(tensor));
|
QNN_TENSOR_SET_RANK(_qnn_tensor, qnn::get_ggml_tensor_rank(tensor));
|
||||||
|
|
||||||
const bool is_npu = device == QNN_BACKEND_NPU;
|
if (should_use_mem_handle()) {
|
||||||
if (is_npu) {
|
|
||||||
QNN_TENSOR_SET_MEM_TYPE(_qnn_tensor, QNN_TENSORMEMTYPE_MEMHANDLE);
|
QNN_TENSOR_SET_MEM_TYPE(_qnn_tensor, QNN_TENSORMEMTYPE_MEMHANDLE);
|
||||||
QNN_TENSOR_SET_MEM_HANDLE(_qnn_tensor, nullptr);
|
QNN_TENSOR_SET_MEM_HANDLE(_qnn_tensor, nullptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue