Skip to content

Commit 313f261

Browse files
hexagon: use ggml_op_is_empty and ggml_is_empty to check for NOPs
1 parent aee43d8 commit 313f261

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

ggml/src/ggml-hexagon/ggml-hexagon.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3158,18 +3158,7 @@ static inline bool op_reuse_src1(const ggml_tensor * op1, const ggml_tensor * op
31583158

31593159
static inline bool is_compute_op(ggml_tensor *node)
31603160
{
3161-
switch (node->op) {
3162-
case GGML_OP_NONE:
3163-
case GGML_OP_RESHAPE:
3164-
case GGML_OP_VIEW:
3165-
case GGML_OP_PERMUTE:
3166-
case GGML_OP_TRANSPOSE:
3167-
return false;
3168-
default:
3169-
break;
3170-
}
3171-
3172-
return ggml_nrows(node) != 0;
3161+
return !(ggml_op_is_empty(node->op) || ggml_is_empty(node));
31733162
}
31743163

31753164
// scan the graph and figure out last compute op index

0 commit comments

Comments
 (0)