Skip to content

Commit 9070af8

Browse files
committed
Add perf tests for reduce_rows_f32 kernel
1 parent ece608a commit 9070af8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test-backend-ops.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6179,6 +6179,21 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
61796179
test_cases.emplace_back(new test_add_id(GGML_TYPE_F32, GGML_TYPE_F32, 2880, 32, 4, n_token));
61806180
}
61816181

6182+
std::vector<std::array<int64_t, 4>> reduce_rows_cases;
6183+
for (int j=0; j<14; ++j){
6184+
for (int i=7; i<14;++i){
6185+
{
6186+
reduce_rows_cases.push_back({ int64_t(std::pow(2,i)), int64_t(std::pow(2,j)), 1, 1 });
6187+
}
6188+
}
6189+
}
6190+
6191+
for (auto it: reduce_rows_cases){
6192+
test_cases.emplace_back(new test_mean(GGML_TYPE_F32, it));
6193+
test_cases.emplace_back(new test_sum_rows(GGML_TYPE_F32, it));
6194+
test_cases.emplace_back(new test_sum(GGML_TYPE_F32, it));
6195+
}
6196+
61826197
return test_cases;
61836198
}
61846199

0 commit comments

Comments
 (0)