Skip to content

Commit

Permalink
test: {he,sy}{rk,r2k} take n, k. Fix dimensions of check.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed May 27, 2024
1 parent a5e027b commit deb1858
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,19 +367,19 @@ def filter_csv( values, csv ):

[ 'hbmm', gen + dtype + la + side + uplo + mn + ab + kd + matrixBC ],

[ 'herk', gen + dtype_real + la + he_matrix + trans + mn + ab + matrixC ],
[ 'herk', gen + dtype_complex + la + he_matrix + trans_nc + mn + ab + matrixC ],
[ 'herk', gen + dtype_real + la + he_matrix + trans + nk + ab + matrixC ],
[ 'herk', gen + dtype_complex + la + he_matrix + trans_nc + nk + ab + matrixC ],

[ 'her2k', gen + dtype_real + la + he_matrix + trans + mn + ab + matrixBC ],
[ 'her2k', gen + dtype_complex + la + he_matrix + trans_nc + mn + ab + matrixBC ],
[ 'her2k', gen + dtype_real + la + he_matrix + trans + nk + ab + matrixBC ],
[ 'her2k', gen + dtype_complex + la + he_matrix + trans_nc + nk + ab + matrixBC ],

[ 'symm', gen + dtype + la + side + sy_matrix + mn + ab + matrixBC ],

[ 'syr2k', gen + dtype_real + la + sy_matrix + trans + mn + ab + matrixC ],
[ 'syr2k', gen + dtype_complex + la + sy_matrix + trans_nt + mn + ab + matrixC ],
[ 'syr2k', gen + dtype_real + la + sy_matrix + trans + nk + ab + matrixC ],
[ 'syr2k', gen + dtype_complex + la + sy_matrix + trans_nt + nk + ab + matrixC ],

[ 'syrk', gen + dtype_real + la + sy_matrix + trans + mn + ab + matrixBC ],
[ 'syrk', gen + dtype_complex + la + sy_matrix + trans_nt + mn + ab + matrixBC ],
[ 'syrk', gen + dtype_real + la + sy_matrix + trans + nk + ab + matrixBC ],
[ 'syrk', gen + dtype_complex + la + sy_matrix + trans_nt + nk + ab + matrixBC ],

# todo: tbsm fails for nb=8 or 16 with --quick.
[ 'tbsm', gen_no_nb + ' --nb 32' + dtype + la + side + uplo + transA + diag + mn + a + kd + matrixB ],
Expand Down
12 changes: 6 additions & 6 deletions test/test_her2k.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void test_her2k_work(Params& params, bool run)
opA = conj_transpose( A );
opB = conj_transpose( B );
}
slate_assert(A.mt() == C.mt());
slate_assert(B.mt() == C.mt());
slate_assert(A.nt() == B.nt());
slate_assert( opA.mt() == C.mt() );
slate_assert( opB.mt() == C.mt() );
slate_assert( opA.nt() == opB.nt() );

print_matrix("A", A, params);
print_matrix("B", B, params);
Expand All @@ -138,9 +138,9 @@ void test_her2k_work(Params& params, bool run)
// If check run, perform first half of SLATE residual check.
TestMatrix<slate::Matrix<scalar_t>> X_alloc, Y_alloc, Z_alloc;
if (check && ! ref) {
X_alloc = allocate_test_Matrix<scalar_t>( false, true, An, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
X_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, k, nrhs, params );

auto& X = X_alloc.A;
auto& Y = Y_alloc.A;
Expand Down
6 changes: 3 additions & 3 deletions test/test_herk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ void test_herk_work(Params& params, bool run)
// If check run, perform first half of SLATE residual check.
TestMatrix<slate::Matrix<scalar_t>> X_alloc, Y_alloc, Z_alloc;
if (check && ! ref) {
X_alloc = allocate_test_Matrix<scalar_t>( false, true, An, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
X_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, k, nrhs, params );

auto& X = X_alloc.A;
auto& Y = Y_alloc.A;
Expand Down
12 changes: 6 additions & 6 deletions test/test_syr2k.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ void test_syr2k_work(Params& params, bool run)
opA = conj_transpose( A );
opB = conj_transpose( B );
}
slate_assert(opA.mt() == C.mt());
slate_assert(opB.mt() == C.mt());
slate_assert(opA.nt() == B.nt());
slate_assert( opA.mt() == C.mt() );
slate_assert( opB.mt() == C.mt() );
slate_assert( opA.nt() == opB.nt() );

print_matrix("A", A, params);
print_matrix("B", B, params);
Expand All @@ -136,9 +136,9 @@ void test_syr2k_work(Params& params, bool run)
// If check run, perform first half of SLATE residual check.
TestMatrix<slate::Matrix<scalar_t>> X_alloc, Y_alloc, Z_alloc;
if (check && ! ref) {
X_alloc = allocate_test_Matrix<scalar_t>( false, true, An, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
X_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, k, nrhs, params );

auto& X = X_alloc.A;
auto& Y = Y_alloc.A;
Expand Down
6 changes: 3 additions & 3 deletions test/test_syrk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ void test_syrk_work(Params& params, bool run)
// If check run, perform first half of SLATE residual check.
TestMatrix<slate::Matrix<scalar_t>> X_alloc, Y_alloc, Z_alloc;
if (check && ! ref) {
X_alloc = allocate_test_Matrix<scalar_t>( false, true, An, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, Am, nrhs, params );
X_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Y_alloc = allocate_test_Matrix<scalar_t>( false, true, n, nrhs, params );
Z_alloc = allocate_test_Matrix<scalar_t>( false, true, k, nrhs, params );

auto& X = X_alloc.A;
auto& Y = Y_alloc.A;
Expand Down

0 comments on commit deb1858

Please sign in to comment.