summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbssrdf <merlintiger@hotmail.com>2023-12-29 03:32:31 -0500
committerGeorgi Gerganov <ggerganov@gmail.com>2023-12-29 14:54:19 +0200
commitafc8c192919f04613a92d40391bff4c8cd99856b (patch)
tree1959cf18947a06b21b9291ea415e690bdeb9fc67 /tests
parentca38b8d334baa724bd6c9402470931d26427466f (diff)
ggml : fix some mul mat cases + add tests for src1 F16 (ggml/669)
* fixed mul-mat error for old GPUs * style fixes * add mul mat src1 f16 test cases, fix more cases ggml-ci --------- Co-authored-by: bssrdf <bssrdf@gmail.com> Co-authored-by: slaren <slarengh@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-backend-ops.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp
index f3df8a8c..b115299c 100644
--- a/tests/test-backend-ops.cpp
+++ b/tests/test-backend-ops.cpp
@@ -350,13 +350,18 @@ struct test_case {
fflush(stdout);
// check if backends support op
+ bool supported = true;
for (ggml_backend_t backend : {backend1, backend2}) {
if (!ggml_backend_supports_op(backend, out)) {
- printf("not supported\n");
- ggml_free(ctx);
- return true;
+ printf("not supported [%s] ", ggml_backend_name(backend));
+ supported = false;
}
}
+ if (!supported) {
+ printf("\n");
+ ggml_free(ctx);
+ return true;
+ }
// post-graph sentinel
add_sentinel(ctx);
@@ -1505,8 +1510,7 @@ static bool test_backend(ggml_backend_t backend, test_mode mode, const char * op
}
for (ggml_type type_a : all_types) {
- for (ggml_type type_b : {GGML_TYPE_F32 /*, GGML_TYPE_F16 */}) {
- // FIXME: CPU crashes on f16xf16
+ for (ggml_type type_b : {GGML_TYPE_F32, GGML_TYPE_F16}) {
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, { 1, 1}, {1, 1}));
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 1}, {1, 1}));
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 1}, {2, 1}));