Skip to content

ResultTensorOfTensorTA: outer tile of "regular" companion array must be TA::Tensor#515

Merged
evaleev merged 8 commits into
masterfrom
evaleev/tot/inner-btas-tensor
May 13, 2026
Merged

ResultTensorOfTensorTA: outer tile of "regular" companion array must be TA::Tensor#515
evaleev merged 8 commits into
masterfrom
evaleev/tot/inner-btas-tensor

Conversation

@evaleev
Copy link
Copy Markdown
Member

@evaleev evaleev commented May 12, 2026

Summary

  • Fixes `compatible_regular_distarray_type` in `ResultTensorOfTensorTA` to wrap the inner's numeric type in `TA::Tensor` instead of re-using the inner-tile type as the new outer tile. The previous formulation produced a `DistArray<btas::Tensor, ...>` when the input ToT was btas-inner — invalid because `btas::Tensor` is inner-only (no `permute`/`reshape`/`batch` etc., which einsum's outer kernel needs).
  • Bumps the TiledArray pin to `53dee008` (TA PR enable btas::Tensor as inner tile of TA::Tensor-of-Tensor + bump BTAS pin tiledarray#546) which adds the matching TA-side support for btas inner tiles (operator ADL routing, einsum's DeNestedArray + sum_tot_2_tos, dist_array's volume(), size_of for btas::Tensor, etc.).

Test plan

  • SeQuant TA-eval unit tests pass against the bumped TA pin.
  • Downstream (MPQC) PNO/CSV CC paths build and run with btas-inner CSV coefficients + TA-inner amplitudes.

bimalgaudel and others added 5 commits May 11, 2026 12:19
Drop EvalDetailBinary; collapse to a single Eval line per op, with
optional left/right populated only for Sum/Product. Add an alloc field
that distinguishes fresh-allocation ops from SumInplace (alloc=0B), so
summing the column gives total bytes allocated and `grep alloc=0B`
isolates inplace ops. Fix hwmark undercounts in Permute and SumInplace
for cached inputs whose canon_phase != 1 or that the permute wrapper
turned into a fresh buffer — previously these silently biased hw down.
Replace the sequant.nu helper with sequant_trace.py — a stdlib-only
parser exposing trace_eval/trace_cache/trace_term plus a one-pass
parse() that returns NamedTuple rows (EvalRow/CacheRow/TermRow with
an extras dict for unrecognized fields). Rewrite evaluation.rst with
Python recipes and regenerated example outputs that reflect the new
trace columns (alloc, hw, left/right) and the per-mode field-population
rules. Add a note that the parser is iteration-blind: callers must
slice rows by line range or term before aggregating across repeated
contexts (the sample mpqc_out.txt is capped at one iteration for this
reason).
…n 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).
@evaleev evaleev force-pushed the evaleev/tot/inner-btas-tensor branch from 03b8e2e to 22ae856 Compare May 12, 2026 21:50
…with_hwmark' into evaleev/tot/inner-btas-tensor
@evaleev evaleev force-pushed the evaleev/tot/inner-btas-tensor branch 2 times, most recently from 149a82d to fc9d1f1 Compare May 13, 2026 03:55
…n 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).
@evaleev evaleev force-pushed the evaleev/tot/inner-btas-tensor branch from fc9d1f1 to 5c26211 Compare May 13, 2026 11:45
@evaleev evaleev merged commit 4daf3dc into master May 13, 2026
16 checks passed
@evaleev evaleev deleted the evaleev/tot/inner-btas-tensor branch May 13, 2026 15:08
@evaleev evaleev added this to the 2.3 milestone May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants