From 8ca33dec7d0d859f508697d110566fd680e56885 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 26 Jan 2024 20:01:36 +0100 Subject: [PATCH] test-backend-ops : check all the ops in the test for support in the backends --- tests/test-backend-ops.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp index cfc65d53e..f3b8e9143 100644 --- a/tests/test-backend-ops.cpp +++ b/tests/test-backend-ops.cpp @@ -364,15 +364,15 @@ struct test_case { printf(" %s(%s): ", op_desc(out).c_str(), vars().c_str()); fflush(stdout); - // check if backends support op + // check if the backends support the ops bool supported = true; for (ggml_backend_t backend : {backend1, backend2}) { - if ( - !ggml_backend_supports_op(backend, out) - || (op_desc(out) == "MOE" && !strcmp(ggml_backend_name(backend), "Kompute")) - ) { - printf("not supported [%s] ", ggml_backend_name(backend)); - supported = false; + for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) { + if (!ggml_backend_supports_op(backend, t)) { + printf("not supported [%s] ", ggml_backend_name(backend)); + supported = false; + break; + } } } if (!supported) {