@@ -547,10 +547,10 @@ struct test_case {
547547 double err = nmse (f1.data (), f2.data (), f1.size ());
548548 if (err > ud->max_err ) {
549549 printf (" [%s] NMSE = %.9f > %.9f " , ggml_op_desc (t1), err, ud->max_err );
550- // for (int i = 0; i < (int) f1.size(); i++) {
551- // printf("%5d %9.6f %9.6f, diff = %9.6f\n", i, f1[i], f2[i], f1[i] - f2[i]);
552- // }
553- // printf("\n");
550+ for (int i = 0 ; i < (int ) f1.size (); i++) {
551+ printf (" %5d %9.6f %9.6f, diff = %9.6f\n " , i, f1[i], f2[i], f1[i] - f2[i]);
552+ }
553+ printf (" \n " );
554554 // exit(1);
555555 ud->ok = false ;
556556 }
@@ -3660,6 +3660,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
36603660 test_cases.emplace_back (new test_gla (GGML_TYPE_F32, 32 , 64 , 32 , 4 ));
36613661 test_cases.emplace_back (new test_gla (GGML_TYPE_F32, 32 , 64 , 128 , 4 ));
36623662
3663+ /*
36633664 for (int i = 1; i < 9; ++i) {
36643665 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
36653666 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_Q4_0, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
@@ -3672,14 +3673,16 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
36723673 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_Q6_K, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
36733674 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_IQ4_NL, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
36743675 }
3676+ */
36753677
36763678#if 1
36773679 for (ggml_type type_a : base_types) {
36783680 for (ggml_type type_b : {GGML_TYPE_F32, GGML_TYPE_F16}) {
36793681 // test cases without permutation
3680- test_cases.emplace_back (new test_mul_mat (type_a, type_b, 16 , 1 , 256 , { 1 , 1 }, {1 , 1 }));
3681- test_cases.emplace_back (new test_mul_mat (type_a, type_b, 16 , 1 , 256 , {10 , 1 }, {1 , 1 }));
3682+ // test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, { 1, 1}, {1, 1}));
3683+ // test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 1}, {1, 1}));
36823684 test_cases.emplace_back (new test_mul_mat (type_a, type_b, 16 , 1 , 256 , {10 , 1 }, {2 , 1 }));
3685+ /*
36833686 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 10}, {1, 1}));
36843687 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 10}, {2, 1}));
36853688 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 10}, {1, 2}));
@@ -3705,8 +3708,10 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
37053708 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 2, 1, 3}));
37063709 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 1, 3, 2}));
37073710 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 3, 2, 1}));
3711+ */
37083712 }
37093713 }
3714+ /*
37103715 for (ggml_type type_a : other_types) {
37113716 for (ggml_type type_b : {GGML_TYPE_F32}) {
37123717 if (ggml_blck_size(type_a) != 256) {
@@ -3715,6 +3720,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
37153720 test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {1, 1}, {1, 1}));
37163721 }
37173722 }
3723+ */
37183724#else
37193725 // m = a rows
37203726 // n = b rows
@@ -3728,19 +3734,21 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
37283734 int m = dist_m(rng);
37293735 int n = dist_n(rng);
37303736 int k = dist_k(rng) * ggml_blck_size(type_a);
3731- test_cases.emplace_back(new test_mul_mat(type_a, type_b, m, n, k, { 1, 1}, {1, 1}));
3737+ // test_cases.emplace_back(new test_mul_mat(type_a, type_b, m, n, k, { 1, 1}, {1, 1}));
37323738 }
37333739 }
37343740 }
37353741 #endif
37363742
3743+ /*
37373744 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 2, 128, { 8, 1}, {1, 1}));
37383745 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 83, 2, 128, { 8, 1}, {4, 1}));
37393746 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 2, 64, { 8, 1}, {4, 1}));
37403747 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 83, 2, 64, { 8, 1}, {4, 1}));
37413748 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 45, 128, { 8, 1}, {4, 1}));
37423749 test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 128, 45, 64, { 8, 1}, {4, 1}));
37433750
3751+ */
37443752 // sycl backend will limit task global_range < MAX_INT
37453753 // test case for f16-type-convert-to-fp32 kernel with large k under fp32 compute dtype (occurs in stable-diffusion)
37463754 // however this case needs to alloc more memory which may fail in some devices (Intel Arc770, etc.)
@@ -3974,7 +3982,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
39743982 for (int bs : {1 , 2 , 3 , 4 , 5 , 8 , 512 }) {
39753983 for (ggml_type type_a : all_types) {
39763984 for (ggml_type type_b : {GGML_TYPE_F32}) {
3977- test_cases.emplace_back (new test_mul_mat (type_a, type_b, 4096 , bs, 14336 , {1 , 1 }, {1 , 1 }));
3985+ // test_cases.emplace_back(new test_mul_mat(type_a, type_b, 4096, bs, 14336, {1, 1}, {1, 1}));
39783986 }
39793987 }
39803988 }
0 commit comments