You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][S-TIR] compute_at after rfactor drops the tail predicate: wrong sums and out-of-bounds reads #20812
split of a reduction loop by a factor that does not divide its extent gives the block a predicate
(k_0 * 64 + k_1 < 77). rfactor keeps it on Y_rf, but compute_at(Y_rf, ...) then rebuilds the loops of Y_rf
without it. No error is raised, and the kernel reads past each row (and past the end of X).
Same TIR (no T.where on Y_rf after compute_at) on main e345029; the CUDA kernel has the same unguarded read.
Probable cause: rfactor marks the new blocks as affine_binding / region_cover / stage_pipeline (reduction.cc,
"Update scope information"), and compute_at trusts these flags (ScopeReconstructor::MakeNewLoop, compute_at.cc).
With debug_mask="all" the schedule fails verification right after rfactor. Rejecting the schedule would be a fine fix.
Activity