@@ -547,10 +547,10 @@ struct test_case {
547
547
double err = nmse (f1.data (), f2.data (), f1.size ());
548
548
if (err > ud->max_err ) {
549
549
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 " );
554
554
// exit(1);
555
555
ud->ok = false ;
556
556
}
@@ -3660,6 +3660,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
3660
3660
test_cases.emplace_back (new test_gla (GGML_TYPE_F32, 32 , 64 , 32 , 4 ));
3661
3661
test_cases.emplace_back (new test_gla (GGML_TYPE_F32, 32 , 64 , 128 , 4 ));
3662
3662
3663
+ /*
3663
3664
for (int i = 1; i < 9; ++i) {
3664
3665
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
3665
3666
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() {
3672
3673
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_Q6_K, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
3673
3674
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_IQ4_NL, GGML_TYPE_F32, 16, i, 256, { 1, 1}, {1, 1}));
3674
3675
}
3676
+ */
3675
3677
3676
3678
#if 1
3677
3679
for (ggml_type type_a : base_types) {
3678
3680
for (ggml_type type_b : {GGML_TYPE_F32, GGML_TYPE_F16}) {
3679
3681
// 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}));
3682
3684
test_cases.emplace_back (new test_mul_mat (type_a, type_b, 16 , 1 , 256 , {10 , 1 }, {2 , 1 }));
3685
+ /*
3683
3686
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 10}, {1, 1}));
3684
3687
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {10, 10}, {2, 1}));
3685
3688
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() {
3705
3708
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 2, 1, 3}));
3706
3709
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 1, 3, 2}));
3707
3710
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 16, 256, {2, 3}, {1, 1}, {0, 3, 2, 1}));
3711
+ */
3708
3712
}
3709
3713
}
3714
+ /*
3710
3715
for (ggml_type type_a : other_types) {
3711
3716
for (ggml_type type_b : {GGML_TYPE_F32}) {
3712
3717
if (ggml_blck_size(type_a) != 256) {
@@ -3715,6 +3720,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
3715
3720
test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {1, 1}, {1, 1}));
3716
3721
}
3717
3722
}
3723
+ */
3718
3724
#else
3719
3725
// m = a rows
3720
3726
// n = b rows
@@ -3728,19 +3734,21 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
3728
3734
int m = dist_m(rng);
3729
3735
int n = dist_n(rng);
3730
3736
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}));
3732
3738
}
3733
3739
}
3734
3740
}
3735
3741
#endif
3736
3742
3743
+ /*
3737
3744
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 2, 128, { 8, 1}, {1, 1}));
3738
3745
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 83, 2, 128, { 8, 1}, {4, 1}));
3739
3746
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 2, 64, { 8, 1}, {4, 1}));
3740
3747
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 83, 2, 64, { 8, 1}, {4, 1}));
3741
3748
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 64, 45, 128, { 8, 1}, {4, 1}));
3742
3749
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_F16, GGML_TYPE_F32, 128, 45, 64, { 8, 1}, {4, 1}));
3743
3750
3751
+ */
3744
3752
// sycl backend will limit task global_range < MAX_INT
3745
3753
// test case for f16-type-convert-to-fp32 kernel with large k under fp32 compute dtype (occurs in stable-diffusion)
3746
3754
// 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() {
3974
3982
for (int bs : {1 , 2 , 3 , 4 , 5 , 8 , 512 }) {
3975
3983
for (ggml_type type_a : all_types) {
3976
3984
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}));
3978
3986
}
3979
3987
}
3980
3988
}
0 commit comments