Skip to content

Commit

Permalink
Revert "Tests and fixes one more corner case of ToT x ToT evaluation."
Browse files Browse the repository at this point in the history
This reverts commit 644f0e9.
  • Loading branch information
bimalgaudel committed Jul 8, 2024
1 parent 52b0960 commit 3554191
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/TiledArray/einsum/tiledarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,9 @@ auto einsum(expressions::TsrExpr<ArrayA_> A, expressions::TsrExpr<ArrayB_> B,
// contracted indices
auto i = (a & b) - h;

//
// - no Hadamard indices for non-nested DistArray imply evaluation can be
// delegated to expression layer.
// - only Hadamard indices for nested and non-nested DistArray imply
// evaluation can be delegated to expression layer.
//
if ((!IsArrayToT<ArrayC> && !h) || (h && !(i || e))) {
// no Hadamard indices => standard contraction (or even outer product)
// same a, b, and c => pure Hadamard
if (!h || (h && !(i || e))) {
ArrayC C;
C(std::string(c) + inner.c) = A * B;
return C;
Expand Down
7 changes: 0 additions & 7 deletions tests/einsum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,6 @@ BOOST_AUTO_TEST_CASE(corner_cases) {
{{0, 4, 8}, {0, 4}}, //
{{0, 4, 8}, {0, 4}}, //
{8})));

BOOST_REQUIRE(
check_manual_eval<ArrayToT>("ijkl;abecdf,k;e->ijl;bafdc", //
{{0, 2}, {0, 3}, {0, 4}, {0, 5}}, //
{{0, 4}}, //
{2, 3, 6, 4, 5, 7}, //
{6}));
}

BOOST_AUTO_TEST_SUITE_END()
Expand Down

0 comments on commit 3554191

Please sign in to comment.