fix: fail closed on post-spatial external skip in 1D-height tiling to match the 2D path - #35
Merged
Conversation
… match the 2D path
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.
Summary
A rank-4 stage whose post-spatial
Add/Mul/Concatconsumes a stage-external,output-resolution operand (e.g.
[Conv(stride 2), Add(conv_out, skip)]) was admitted bythe 1D-height tiler, even though the 2D tiler already rejects that exact shape. The
1D-height executor loads every stage input at the spatial op's input-halo rows, so a
strided interior tile would read the external skip at
stride*out_startrows -- the wrongrows, and past the operand's height.
This shape is unreachable through the standard compile pipeline today (the greedy temporal
partition only emits a single forced op as an over-budget/tiled stage, so a multi-op stage
is never tiled), so it is a latent-correctness and path-consistency gap rather than an
active bug. It was confirmed by an adversarially-verified investigation. The fix makes the
1D-height and 2D paths reject in lockstep.
Change
_has_post_spatial_binary(stage_ops): true when aConcat/Add/Mulis consumedat or after the stage's spatial op. Shared by
_stage_2d_eligible(a behavior-preservingrefactor of its existing post-spatial check) and
_stage_tile_axis._stage_tile_axisreturnsTILE_AXIS_NONEfor a rank-4 stage with a post-spatialbinary/Concat, so it runs untiled via
exec_stage_normal.co-tiled skip stays admitted on both.
Testing
Full suite: 338 passed, 2 skipped.