Skip to content

Commit f2cdb32

Browse files
committed
add assert about count < 32
1 parent 3886b5f commit f2cdb32

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

ggml/src/ggml-impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ static inline bool ggml_can_fuse_subgraph(const struct ggml_cgraph * cgraph,
663663
const enum ggml_op * ops,
664664
const int * outputs,
665665
int num_outputs) {
666+
GGML_ASSERT(count < 32);
666667
if (node_idx + count > cgraph->n_nodes) {
667668
return false;
668669
}

ggml/src/ggml.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6991,7 +6991,6 @@ bool ggml_can_fuse_subgraph_ext(const struct ggml_cgraph * cgraph,
69916991
GGML_ASSERT(outputs && num_outputs > 0);
69926992

69936993
for (int i = 0; i < count; ++i) {
6994-
69956994
if (node_idxs[i] >= cgraph->n_nodes) {
69966995
return false;
69976996
}

0 commit comments

Comments
 (0)