Skip to content

Commit c3cb20b

Browse files
committed
tests: filter out fusion cases before calling eval_support
1 parent e78ca2e commit c3cb20b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/test-backend-ops.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,11 +1463,6 @@ struct test_case {
14631463
return true;
14641464
}
14651465

1466-
// Filter out fusion tests in support mode
1467-
if (run_whole_graph()) {
1468-
return true;
1469-
}
1470-
14711466
bool supported = ggml_backend_supports_op(backend, out);
14721467

14731468
std::string device_desc = ggml_backend_dev_description(ggml_backend_get_device(backend));
@@ -7578,6 +7573,15 @@ static bool test_backend(ggml_backend_t backend, test_mode mode, const char * op
75787573
if (mode == MODE_SUPPORT) {
75797574
auto test_cases = make_test_cases_eval();
75807575
filter_test_cases(test_cases, params_filter);
7576+
7577+
// Filter out fusion cases
7578+
test_cases.erase(
7579+
std::remove_if(test_cases.begin(), test_cases.end(), [](const std::unique_ptr<test_case>& tc) {
7580+
return tc->run_whole_graph();
7581+
}),
7582+
test_cases.end()
7583+
);
7584+
75817585
for (auto & test : test_cases) {
75827586
test->eval_support(backend, op_names_filter, output_printer);
75837587
}

0 commit comments

Comments
 (0)