]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
opencl : skip empty nodes on cgraph compute (llama/14491)
authorEric Zhang <redacted>
Wed, 2 Jul 2025 11:00:04 +0000 (19:00 +0800)
committerGeorgi Gerganov <redacted>
Sat, 12 Jul 2025 13:05:00 +0000 (16:05 +0300)
src/ggml-opencl/ggml-opencl.cpp

index 518a18ef3a7902b698d0cef0abf7ea2732732cf4..f747f756816facaeb137892da9aabf14c6343d7c 100644 (file)
@@ -2187,7 +2187,7 @@ static ggml_status ggml_backend_opencl_graph_compute(ggml_backend_t backend, ggm
         //       dependencies.
         sync_with_other_backends(backend);
 
-        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) {
+        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) {
             continue;
         }