Skip to content

Commit c2076d8

Browse files
committed
fix op desc print
1 parent b3ce765 commit c2076d8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ggml/src/ggml-qnn/backend-ops.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,22 +394,20 @@ bool device_supports_op(ggml_backend_qnn_device_context * ctx, const ggml_tensor
394394

395395
if (!kQnnSupportedOps[qnn::get_qnn_op_index(op)]) {
396396
#ifndef NDEBUG
397-
std::string op_key;
398-
get_qnn_op_desc(op, true, op_key);
399397
ctx->unsupported_op_count++;
400398
QNN_LOG_DEBUG("[%s][%s]op was unsupported, support/unsupported: %d/%d\n", qnn::get_backend_name(ctx->device),
401-
op_key.c_str(), ctx->supported_op_count.load(), ctx->unsupported_op_count.load());
399+
ggml_op_desc(op), ctx->supported_op_count.load(), ctx->unsupported_op_count.load());
402400
#endif
403401
return false;
404402
}
405403

406404
if (!ggnl_qnn_supports_op_tensor(ctx, op)) {
407405
#ifndef NDEBUG
408-
std::string tensor_dims;
409-
append_tensor_shape_and_type(op, tensor_dims);
410-
QNN_LOG_DEBUG("[%s][%s]unsupported tensor(%s), support/unsupported: %d/%d\n",
411-
qnn::get_backend_name(ctx->device), ggml_op_name(op->op), tensor_dims.c_str(),
412-
ctx->supported_op_count.load(), ctx->unsupported_op_count.load());
406+
std::string op_key;
407+
get_qnn_op_desc(op, true, op_key);
408+
ctx->unsupported_op_count++;
409+
QNN_LOG_DEBUG("[%s][%s]unsupported tensor, support/unsupported: %d/%d\n", qnn::get_backend_name(ctx->device),
410+
op_key.c_str(), ctx->supported_op_count.load(), ctx->unsupported_op_count.load());
413411
#endif
414412
return false;
415413
}

0 commit comments

Comments
 (0)