Skip to content

Commit 5c26211

Browse files
committed
ResultTensorOfTensorTA: use TA::Tensor as outer of "regular" companion array
The "regular" (non-nested) companion array used in ToT * T einsum contractions had its outer tile set to the *inner* tile type of the input ToT array. For TA-inner ToT that happens to work (TA::Tensor is a valid outer tile too), but for btas-inner ToT it produced a DistArray<btas::Tensor, ...> whose tile lacks the outer-tile API einsum needs (permute/reshape/batch/...). The outer tile must always be TA::Tensor; inner-tile types like btas::Tensor are *inner-only*. Fix compatible_regular_distarray_type to wrap the inner's numeric type in TA::Tensor. Also bumps the TiledArray pin to the version that lifts the matching TA-side restrictions (ValeevGroup/tiledarray#546).
1 parent 8148756 commit 5c26211

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

SeQuant/core/eval/backends/tiledarray/result.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,14 @@ class ResultTensorOfTensorTA final : public Result {
317317

318318
using _inner_tensor_type = typename ArrayT::value_type::value_type;
319319

320+
// "Regular" (non-nested) companion array for ToT * T einsum. The OUTER tile
321+
// type must be a TA::Tensor — inner tile types like btas::Tensor are only
322+
// valid as the *innermost* tile (they don't support permute/reshape/batch
323+
// and so can't drive einsum's outer kernel). So we wrap the inner's numeric
324+
// type in TA::Tensor here, rather than re-using the inner tile type as the
325+
// outer tile.
320326
using compatible_regular_distarray_type =
321-
TA::DistArray<_inner_tensor_type, typename ArrayT::policy_type>;
327+
TA::DistArray<TA::Tensor<numeric_type>, typename ArrayT::policy_type>;
322328

323329
// Only @c that_type type is allowed for ToT * T computation
324330
using that_type = ResultTensorTA<compatible_regular_distarray_type>;

external/versions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(SEQUANT_TRACKED_VGCMAKEKIT_TAG 256d9462bb765787f5acb69be154b26d6efba8b6)
55

66
set(SEQUANT_TRACKED_RANGEV3_TAG 0.12.0)
77

8-
set(SEQUANT_TRACKED_TILEDARRAY_TAG 7f76cda06fd19658d376fd79b3d80dfe8e32c61e)
8+
set(SEQUANT_TRACKED_TILEDARRAY_TAG c782d06a0f796dabd33de4581fe59887f7bc668d)
99

1010
set(SEQUANT_TRACKED_LIBPERM_TAG cada3e185549896203cf4d0c7f26ea22c7de428f)
1111

0 commit comments

Comments
 (0)