Skip to content

Commit 0841f09

Browse files
author
Anoop Kapoor
committed
Address Ashish's comment
1 parent dbe335a commit 0841f09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ void ggml_backend_sched_split_graph(ggml_backend_sched_t sched, struct ggml_cgra
981981
struct ggml_tensor * node = graph->nodes[i];
982982
int * node_backend_id = &tensor_backend_id(node);
983983
if (ggml_is_view_op(node->op)) {
984-
if(node->src[0]) {
984+
if(node->src[0] && (sched->n_backends >= 1)) {
985985
*node_backend_id = sched->n_backends -1;
986986
node_backend_id = &tensor_backend_id(node->src[0]);
987987
*node_backend_id = sched->n_backends -1;

0 commit comments

Comments
 (0)