Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bimalgaudel committed May 1, 2024
1 parent 92e416e commit 93f6986
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TiledArray/einsum/tiledarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ auto replicate_array(Array from, TiledRange const &prepend_trng) {

template <typename T, typename... Ts>
auto reduce_modes(Tensor<T, Ts...> const &orig, size_t drank) {
if (drank == 0) return orig;
TA_ASSERT(orig.nbatch() == 1);
auto const orig_rng = orig.range();
TA_ASSERT(orig_rng.rank() > drank);
Expand Down Expand Up @@ -313,6 +314,7 @@ auto reduce_modes(Tensor<T, Ts...> const &orig, size_t drank) {
template <typename T, typename... Ts>
auto reduce_modes(TA::DistArray<T, Ts...> orig, size_t drank) {
TA_ASSERT(orig.trange().rank() > drank);
if (drank == 0) return orig;

auto const result_trange = [orig, drank]() {
container::svector<TiledRange1> tr1s;
Expand Down

0 comments on commit 93f6986

Please sign in to comment.