Skip to content

Commit 5d279bd

Browse files
tests: remove max_nmse_err override and expand test cases for get_rel_pos
* Removed the overridden max_nmse_err method in the test_get_rel_pos struct as it was deemed unnecessary. * Added multiple new test cases for various attention configurations, enhancing coverage for the get_rel_pos functionality.
1 parent 4813779 commit 5d279bd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test-backend-ops.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7871,8 +7871,20 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
78717871
test_cases.emplace_back(new test_get_rel_pos(type, 13, 7, 7, v));
78727872
// Square large: 14x14 attention
78737873
test_cases.emplace_back(new test_get_rel_pos(type, 27, 14, 14, v));
7874+
// Square large: 16x16 attention
7875+
test_cases.emplace_back(new test_get_rel_pos(type, 31, 16, 16, v));
78747876
// Rectangular: 14x7 attention
78757877
test_cases.emplace_back(new test_get_rel_pos(type, 27, 14, 7, v));
7878+
// Rectangular: 7x14 attention
7879+
test_cases.emplace_back(new test_get_rel_pos(type, 27, 7, 14, v));
7880+
// Rectangular: 16x8 attention
7881+
test_cases.emplace_back(new test_get_rel_pos(type, 31, 16, 8, v));
7882+
// Rectangular: 8x16 attention
7883+
test_cases.emplace_back(new test_get_rel_pos(type, 31, 8, 16, v));
7884+
// Rectangular: 28x14 attention
7885+
test_cases.emplace_back(new test_get_rel_pos(type, 55, 28, 14, v));
7886+
// Rectangular: 14x28 attention
7887+
test_cases.emplace_back(new test_get_rel_pos(type, 55, 14, 28, v));
78767888
// Edge case: 1x1 attention (minimum)
78777889
test_cases.emplace_back(new test_get_rel_pos(type, 1, 1, 1, v));
78787890
}

0 commit comments

Comments
 (0)