sched : allow ops with weights on an incompatible buffer type

This will cause the weight to be copied to a backend that supports the
op, which is very costly. The weight should have been stored in a buffer
of a backend that can run the op, but llama.cpp cannot do this
automatically at the moment.

ggml-ci
This commit is contained in:
slaren 2024-06-13 02:38:36 +02:00
parent ae9cd85698
commit 211fb045f1

View file

@ -1116,9 +1116,10 @@ static int ggml_backend_sched_backend_from_buffer(ggml_backend_sched_t sched, co
} }
} }
fprintf(stderr, "%s: error: no backend supports buffer type %s used in tensor %s\n", #ifndef NDEBUG
__func__, ggml_backend_buffer_name(buffer), tensor->name); fprintf(stderr, "%s: warning: no backend supports op %s with a weight with buffer type %s used in tensor %s, the weight will need to be copied\n",
GGML_ASSERT(false); __func__, ggml_op_desc(tensor), ggml_backend_buffer_name(buffer), tensor->name);
#endif
return -1; return -1;
} }