Skip to content

Commit

Permalink
actually free the backends on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
marty1885 committed Jul 17, 2024
1 parent 22ecfd3 commit 537c3ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test-metalium.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,13 @@ int main()
<< " Failed: " << total_tests - passed_tests << " (" << (1.0 - passed_ratio) * 100 << "%)\n"
<< " Not supported: " << not_supported << "\n";

if(total_tests != passed_tests) {
bool failed = total_tests != passed_tests;
if(failed) {
std::cout << "Some tests failed\n";
return 1;
}

ggml_backend_free(metalium);
ggml_backend_free(cpu);

return (int)failed;
}

0 comments on commit 537c3ba

Please sign in to comment.