Skip to content

Commit

Permalink
Gtestsuite: Updated sgemm testcase for sup
Browse files Browse the repository at this point in the history
Updated sgemm testcase to handle multiple values of alpha, beta for different input size
Added sgemm testcase to cover m,n,k dimension till 20 size atleast instepsize of 1

Change-Id: Id10ba3d7a05154b171511ef11ea76297494672cd
  • Loading branch information
mangala811 committed Nov 24, 2023
1 parent 384ba48 commit 6ab76f5
Showing 1 changed file with 14 additions and 39 deletions.
53 changes: 14 additions & 39 deletions gtestsuite/testsuite/level3/gemm/sgemm_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class SGemmTestPrint {

// Black box testing.
INSTANTIATE_TEST_SUITE_P(
Blackbox,
sgemm_sup_10_30,
SGemmTest,
::testing::Combine(
::testing::Values('c'
Expand All @@ -151,7 +151,7 @@ INSTANTIATE_TEST_SUITE_P(

// Black box testing.
INSTANTIATE_TEST_SUITE_P(
sgemm_sup_m,
sgemm_sup_alpha_beta,
SGemmTest,
::testing::Combine(
::testing::Values('c'
Expand All @@ -161,36 +161,11 @@ INSTANTIATE_TEST_SUITE_P(
), // storage format
::testing::Values('n','t'), // transa
::testing::Values('n','t'), // transb
::testing::Range(gtint_t(1), gtint_t(600), 1), // m
::testing::Values(50), // n
::testing::Values(30), // k
::testing::Values( 1.0, 0.0, -2.0), // alpha
::testing::Values(-1.0, 1.0, 0.0), // beta
::testing::Values(gtint_t(2)), // increment to the leading dim of a
::testing::Values(gtint_t(3)), // increment to the leading dim of b
::testing::Values(gtint_t(7)) // increment to the leading dim of c
),
::SGemmTestPrint()
);


// Black box testing.
INSTANTIATE_TEST_SUITE_P(
sgemm_sup_n,
SGemmTest,
::testing::Combine(
::testing::Values('c'
#ifndef TEST_BLAS
,'r'
#endif
), // storage format
::testing::Values('n','t'), // transa
::testing::Values('n','t'), // transb
::testing::Values(30), // m
::testing::Range(gtint_t(1), gtint_t(600), 1), // n
::testing::Values(30), // k
::testing::Values( 1.0, 0.0, -2.0), // alpha
::testing::Values(-1.0, 1.0, 0.0), // beta
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
::testing::Range(gtint_t(1), gtint_t(50), 1), // n
::testing::Range(gtint_t(1), gtint_t(10), 1), // k
::testing::Values(0.0, 1.0, -1.0, 5.3, -10.0), // alpha
::testing::Values(0.0, 1.0, -1.0, 6.4, -19.0), // beta
::testing::Values(gtint_t(2)), // increment to the leading dim of a
::testing::Values(gtint_t(3)), // increment to the leading dim of b
::testing::Values(gtint_t(7)) // increment to the leading dim of c
Expand All @@ -209,13 +184,13 @@ INSTANTIATE_TEST_SUITE_P(
,'r'
#endif
), // storage format
::testing::Values('n','t'), // transa
::testing::Values('n','t'), // transb
::testing::Range(gtint_t(1), gtint_t(100), 1), // m
::testing::Range(gtint_t(1), gtint_t(100), 1), // n
::testing::Range(gtint_t(1), gtint_t(100), 1), // k
::testing::Values( 1.0, 0.0, -2.0), // alpha
::testing::Values(-1.0, 1.0, 0.0), // beta
::testing::Values('n'), // transa
::testing::Values('n'), // transb
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
::testing::Range(gtint_t(1), gtint_t(50), 1), // n
::testing::Range(gtint_t(1), gtint_t(20), 1), // k
::testing::Values( -2.0), // alpha
::testing::Values( 5.0), // beta
::testing::Values(gtint_t(2)), // increment to the leading dim of a
::testing::Values(gtint_t(3)), // increment to the leading dim of b
::testing::Values(gtint_t(7)) // increment to the leading dim of c
Expand Down

0 comments on commit 6ab76f5

Please sign in to comment.