summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2024-06-17 16:51:42 +0200
committerGitHub <noreply@github.com>2024-06-17 16:51:42 +0200
commit99052cd227c7182fcf53343d2e7d33bfa180a9cf (patch)
treecb52a43a2cde83869307f3941ce8264f908f8044
parentc637fcd34d135a9ff4f97d3a53ad03a910a4a31f (diff)
sched : offload_op also requires supports_op (#7977)
-rw-r--r--ggml-backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ggml-backend.c b/ggml-backend.c
index 2bec7bea..26dce7f7 100644
--- a/ggml-backend.c
+++ b/ggml-backend.c
@@ -1172,7 +1172,7 @@ static int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched_t sched, st
// check if a backend with higher prio wants to offload the op
if (src_backend_id == sched->n_backends - 1) {
for (int b = 0; b < src_backend_id; b++) {
- if (ggml_backend_offload_op(sched->backends[b], tensor)) {
+ if (ggml_backend_supports_op(sched->backends[b], tensor) && ggml_backend_offload_op(sched->backends[b], tensor)) {
SET_CAUSE(tensor, "1.off");
return b;
}