cont_engine: evaluate a zero-volume general product through a tile-less evaluator - #590
Draft
kshitij-05 wants to merge 3 commits into
Draft
kshitij-05 wants to merge 3 commits into
kshitij-05 wants to merge 3 commits into
Conversation
…ss evaluator init_distribution_general skips the process grid for a zero-volume result (ProcGrid needs at least one row and one column), but make_dist_eval_general still built the SUMMA evaluator and its canonical slabbed pmap from proc_grid_, tripping TA_ASSERT(world_) in ProcGrid::make_pmap. The result has no tiles, so evaluate it through ZeroVolumeEvalImpl, a DistEvalImpl that owns no tiles and produces nothing. Hit by a shape-imposed ToT product whose sliced aux mode had no tiles.
It is a DistEvalImpl that owns no tiles, not a contraction detail, so it belongs next to the other distributed evaluators rather than in expressions/cont_engine.h -- which also relied on picking up DistEvalImpl transitively through dist_eval/contraction_eval.h. Installed alongside the other dist_eval headers.
A result mode with no tiles makes the general product's result zero-volume, which is the corner case where init_distribution_general skips the process grid. Covers all three ways the result volume vanishes -- an empty left external (M == 0), fused (n_slabs_ == 0), and right external (N == 0) mode -- with canonical and repermuted targets, dense and block-sparse. Four of those six combinations abort without the ZeroVolumeEvalImpl path (TA_ASSERT(world_) in ProcGrid::make_pmap, or nh_ > 0 in contraction_eval). Also pins the adjacent case that must keep taking the ordinary path: an empty *contracted* mode, whose result still has tiles and is zero.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
init_distribution_generalalready skips the process grid for a zero-volume result (ProcGridneeds at least one row and one column), butmake_dist_eval_generalstill built the SUMMA evaluator and its slabbed pmap fromproc_grid_, trippingTA_ASSERT(world_)inProcGrid::make_pmap.Fix: a zero-volume result is evaluated through
ZeroVolumeEvalImpl, aDistEvalImplthat owns no tiles and produces nothing. Hit by a shape-imposed tensor-of-tensor product whose sliced mode had no tiles.