Skip to content

Commit 8fc2c03

Browse files
committed
Modify perf and unit-tests
1 parent 8e04242 commit 8fc2c03

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

tests/test-backend-ops.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,6 +5998,14 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
59985998
test_cases.emplace_back(new test_sum());
59995999
test_cases.emplace_back(new test_sum_rows());
60006000
test_cases.emplace_back(new test_mean());
6001+
test_cases.emplace_back(new test_sum(GGML_TYPE_F32, { 33, 1, 1, 1 }));
6002+
test_cases.emplace_back(new test_sum_rows(GGML_TYPE_F32, { 33, 1, 1, 1 }));
6003+
test_cases.emplace_back(new test_mean(GGML_TYPE_F32, { 33, 1, 1, 1 }));
6004+
test_cases.emplace_back(new test_sum(GGML_TYPE_F32, { 33, 1024, 1, 1 }));
6005+
test_cases.emplace_back(new test_sum_rows(GGML_TYPE_F32, { 33, 1024, 1, 1 }));
6006+
test_cases.emplace_back(new test_sum(GGML_TYPE_F32, { 33, 256, 1, 1 }));
6007+
test_cases.emplace_back(new test_sum_rows(GGML_TYPE_F32, { 33, 256, 1, 1 }));
6008+
test_cases.emplace_back(new test_mean(GGML_TYPE_F32, { 33, 256, 1, 1 }));
60016009
test_cases.emplace_back(new test_group_norm(GGML_TYPE_F32, {64, 64, 320, 1}));
60026010
test_cases.emplace_back(new test_group_norm(GGML_TYPE_F32, {9, 9, 1280, 1}));
60036011
test_cases.emplace_back(new test_acc());
@@ -6179,14 +6187,11 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
61796187
test_cases.emplace_back(new test_add_id(GGML_TYPE_F32, GGML_TYPE_F32, 2880, 32, 4, n_token));
61806188
}
61816189

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+
std::vector<std::array<int64_t, 4>> reduce_rows_cases = {
6191+
{ 8192, 1, 1, 1 },
6192+
{ 8192, 8192, 1, 1 },
6193+
{ 128, 8192, 1, 1 },
6194+
};
61906195

61916196
for (auto it: reduce_rows_cases){
61926197
test_cases.emplace_back(new test_mean(GGML_TYPE_F32, it));

0 commit comments

Comments
 (0)