Skip to content

Commit b877e07

Browse files
committed
Add in-place tests
1 parent 9422879 commit b877e07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test-backend-ops.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6071,6 +6071,10 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
60716071
//add_test_bin_bcast(type, {3, 3, 2560, 1280}, {2, 1, 1, 1});
60726072
}
60736073

6074+
// single in-place tests, especially important for WebGPU backend since kernels for in-place vs. not are different
6075+
test_cases.emplace_back(new test_bin_bcast(ggml_add_inplace, GGML_TYPE_F32, {16, 5, 4, 3}, {1, 1, 1, 1}, 16));
6076+
test_cases.emplace_back(new test_bin_bcast(ggml_mul_inplace, GGML_TYPE_F32, {16, 5, 4, 3}, {1, 1, 1, 1}, 16));
6077+
60746078
// fusion
60756079
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {10, 5, 4, 3}, {2, 1, 1, 1}, 2));
60766080
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {16, 5, 4, 3}, {1, 2, 1, 1}, 3));

0 commit comments

Comments
 (0)