Skip to content

Commit 5761e31

Browse files
committed
revert 'skip permute'
1 parent ee19963 commit 5761e31

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ggml_type get_graph_key_from_cgraph(const ggml_cgraph * cgraph, std::string & ou
4444
continue;
4545
}
4646

47-
if (op->op == GGML_OP_NONE || op->op == GGML_OP_VIEW || op->op == GGML_OP_PERMUTE) {
47+
if (op->op == GGML_OP_NONE || op->op == GGML_OP_VIEW) {
4848
QNN_LOG_DEBUG("%s in graph, skipping\n", ggml_op_desc(op));
4949
continue;
5050
}

ggml/src/ggml-qnn/graph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int get_io_tensors_from_graph(const ggml_cgraph * cgraph, qnn::ggml_tensor_array
115115
continue;
116116
}
117117

118-
if (dst->op == GGML_OP_NONE || dst->op == GGML_OP_VIEW || dst->op == GGML_OP_PERMUTE) {
118+
if (dst->op == GGML_OP_NONE || dst->op == GGML_OP_VIEW) {
119119
// TODO: remove GGML_OP_VIEW after view op is supported
120120
continue;
121121
}
@@ -336,7 +336,7 @@ bool qnn_graph::build_graph_from_ggml_graph(const ggml_cgraph * cgraph) {
336336
continue;
337337
}
338338

339-
if (dst->op == GGML_OP_NONE || dst->op == GGML_OP_VIEW || dst->op == GGML_OP_PERMUTE) {
339+
if (dst->op == GGML_OP_NONE || dst->op == GGML_OP_VIEW) {
340340
// TODO: remove GGML_OP_VIEW after view op is supported
341341
continue;
342342
}

ggml/src/ggml-qnn/op-config-caps.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ constexpr const qnn_op_caps_t kOpCaps[] = {
115115
QNN_OP_RESHAPE, // qnn_op_name
116116
},
117117
{}, // GGML_OP_VIEW
118-
{}, // GGML_OP_PERMUTE
118+
{
119+
// GGML_OP_PERMUTE
120+
QNN_OP_CHANNEL_SHUFFLE, // qnn_op_name
121+
},
119122
{}, // GGML_OP_TRANSPOSE
120123
{}, // GGML_OP_GET_ROWS
121124
{}, // GGML_OP_GET_ROWS_BACK

0 commit comments

Comments
 (0)