From 35541916ba08646497a10b1353b15092f8fde0f6 Mon Sep 17 00:00:00 2001 From: Bimal Gaudel Date: Mon, 8 Jul 2024 07:40:35 -0400 Subject: [PATCH] Revert "Tests and fixes one more corner case of ToT x ToT evaluation." This reverts commit 644f0e966e1d533f7c82d5b716c86157bee2116a. --- src/TiledArray/einsum/tiledarray.h | 10 +++------- tests/einsum.cpp | 7 ------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/TiledArray/einsum/tiledarray.h b/src/TiledArray/einsum/tiledarray.h index 4777a8656e..5d68770506 100644 --- a/src/TiledArray/einsum/tiledarray.h +++ b/src/TiledArray/einsum/tiledarray.h @@ -525,13 +525,9 @@ auto einsum(expressions::TsrExpr A, expressions::TsrExpr 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 && !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; diff --git a/tests/einsum.cpp b/tests/einsum.cpp index 646d636b65..a5980c7446 100644 --- a/tests/einsum.cpp +++ b/tests/einsum.cpp @@ -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("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()