Eric Zhang commited on
Commit
5c36e7c
·
1 Parent(s): 2b95b05

opencl : skip empty nodes on cgraph compute (llama/14491)

Browse files
ggml/src/ggml-opencl/ggml-opencl.cpp CHANGED
@@ -2187,7 +2187,7 @@ static ggml_status ggml_backend_opencl_graph_compute(ggml_backend_t backend, ggm
2187
  // dependencies.
2188
  sync_with_other_backends(backend);
2189
 
2190
- if (node->op == GGML_OP_RESHAPE || node->op == GGML_OP_TRANSPOSE || node->op == GGML_OP_VIEW || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_NONE) {
2191
  continue;
2192
  }
2193
 
 
2187
  // dependencies.
2188
  sync_with_other_backends(backend);
2189
 
2190
+ if (ggml_is_empty(node) || node->op == GGML_OP_RESHAPE || node->op == GGML_OP_TRANSPOSE || node->op == GGML_OP_VIEW || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_NONE) {
2191
  continue;
2192
  }
2193