Skip to content

Commit

Permalink
rename folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Jun 26, 2024
1 parent 7f0b17a commit 9278446
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 19 deletions.
18 changes: 9 additions & 9 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if (GTest_FOUND)
test_datastructures/test_denseskop.cc
test_datastructures/test_sparseskop.cc

test_matmul_impls/linop_common.hh
test_matmul_impls/test_lskge3.cc
test_matmul_impls/test_rskge3.cc
test_matmul_impls/test_lskges.cc
test_matmul_impls/test_rskges.cc
test_matmul_cores/linop_common.hh
test_matmul_cores/test_lskge3.cc
test_matmul_cores/test_rskge3.cc
test_matmul_cores/test_lskges.cc
test_matmul_cores/test_rskges.cc

test_matmul_wrappers/test_sketch_vector.cc
)
Expand All @@ -34,10 +34,10 @@ if (GTest_FOUND)
test_datastructures/test_spmats/test_coo.cc
test_datastructures/test_spmats/test_conversions.cc

test_matmul_impls/test_spmm/spmm_test_helpers.hh
test_matmul_impls/test_spmm/test_spmm_csc.cc
test_matmul_impls/test_spmm/test_spmm_csr.cc
test_matmul_impls/test_spmm/test_spmm_coo.cc
test_matmul_cores/test_spmm/spmm_test_helpers.hh
test_matmul_cores/test_spmm/test_spmm_csc.cc
test_matmul_cores/test_spmm/test_spmm_csr.cc
test_matmul_cores/test_spmm/test_spmm_coo.cc
)
target_link_libraries(SparseRandBLAS_tests
RandBLAS
Expand Down
49 changes: 49 additions & 0 deletions test/DevNotes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
Developer notes for RandBLAS' testing infrastructure
====================================================

Meta note:

Don't defend previous design decisions. Just explain how they work.
That's easier and more useful. Plus, a good explanation will make
pros and cons of the decision (more) self-evident.




Right-multplication by a structured linear operator in a GEMM-like API can
always be reduced to left-multiplication by flipping transposition flags and
layout parameters. So, why have equally fleshed-out tests(/test tooling) for
both cases?

Short answer: maybe it was a bad idea.

Big picture defensive answer:

Different linear operators vary in the extent to which code for their
action on the left can be reduced to their action on the right. Action
on the right is equivalent to adjoint-action from the left.

Someone who's adding a new linear operator might prefer to think mostly
in terms of right-multiplication, and just have left-multiplication reduce
to adjoint-action from the right.

We want someone who adds new functionality to benefit from our testing infrastructure. So we made infrastructure to test GEMM-like APIs where
one operand is structured, and it's easy to get started using this
infrastructure because it's equally valid to start with tests that
multiply only for one side and only another.

Specifics:

RSKGE3 doesn't actually reduce to LSKGE3. It could, but it was
easy enough to have it reduce directly to GEMM, and reducing
directly to GEMM had the advantage of improved readibility. We don't
test all possible combinations of flags (we omit when both arguments
are transposed) but the combinationed we leave untested are unrelated
to flow-of-control.

RSKGES reduces to right_spmm, which does indeed fall back on
left_spmm. But left_spmm has a large number codepaths (twelve!).
It would have been awkward to write tests that hit all of those codepaths
directly. Instead, we write a smaller set of tests for left_spmm
and right_spmm, and count on the right_spmm tests to hit complementary
codepaths compared to the paths hit in the left_spmm tests.
(Admission: we don't know for sure if all codepaths are hit. Verifying
that is on our TODO list.)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/linop_common.hh"
#include "test/test_matmul_cores/linop_common.hh"
#include <gtest/gtest.h>

using RandBLAS::DenseDist;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/linop_common.hh"
#include "test/test_matmul_cores/linop_common.hh"
#include <gtest/gtest.h>

using RandBLAS::SparseDist;
Expand Down Expand Up @@ -185,7 +185,6 @@ TEST_F(TestLSKGES, sketch_saso_rowMajor_oneThread)
}
}


TEST_F(TestLSKGES, sketch_laso_rowMajor_oneThread)
{
for (int64_t k_idx : {0, 1, 2}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/linop_common.hh"
#include "test/test_matmul_cores/linop_common.hh"
#include <gtest/gtest.h>

using namespace test::linop_common;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/linop_common.hh"
#include "test/test_matmul_cores/linop_common.hh"
#include <gtest/gtest.h>

using namespace test::linop_common;
Expand Down Expand Up @@ -193,7 +193,6 @@ TEST_F(TestRSKGES, sketch_saso_rowMajor_oneThread)
}
}


TEST_F(TestRSKGES, sketch_laso_rowMajor_oneThread)
{
for (int64_t k_idx : {0, 1, 2}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//

#include "test/test_datastructures/test_spmats/common.hh"
#include "test/test_matmul_impls/linop_common.hh"
#include "test/test_matmul_cores/linop_common.hh"
#include <gtest/gtest.h>

using namespace test::linop_common;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/test_spmm/spmm_test_helpers.hh"
#include "test/test_matmul_cores/test_spmm/spmm_test_helpers.hh"
#include <vector>

using namespace RandBLAS::sparse_data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/test_spmm/spmm_test_helpers.hh"
#include "test/test_matmul_cores/test_spmm/spmm_test_helpers.hh"
#include <algorithm>
#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//

#include "test/test_matmul_impls/test_spmm/spmm_test_helpers.hh"
#include "test/test_matmul_cores/test_spmm/spmm_test_helpers.hh"
#include <algorithm>
#include <vector>

Expand Down

0 comments on commit 9278446

Please sign in to comment.