diff --git a/ggml.c b/ggml.c index 200e87720e7ad4..c48c182b5640de 100644 --- a/ggml.c +++ b/ggml.c @@ -14574,13 +14574,14 @@ void ggml_graph_compute(struct ggml_context * ctx, struct ggml_cgraph * cgraph) { size_t cur = 0; enum ggml_backend compute_backend = stages[GGML_TASK_COMPUTE].backend; + GGML_ASSERT(compute_backend != GGML_BACKEND_UNKNOWN); #if defined(GGML_USE_CUBLAS) - if (!= GGML_BACKEND_CPU) { + if (compute_backend != GGML_BACKEND_CPU) { cur = ggml_cuda_mul_mat_get_wsize(node->src0, node->src1, node); } else #elif defined(GGML_USE_CLBLAST) - if (compute_backend!= GGML_BACKEND_CPU) { + if (compute_backend != GGML_BACKEND_CPU) { cur = ggml_cl_mul_mat_get_wsize(node->src0, node->src1, node); } else