Repository navigation
EnzymeHLOOpt: a scatter whose every index is out of range writes nothing - #3442
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3442 +/- ##
=======================================
Coverage 29.92% 29.92%
=======================================
Files 241 241
Lines 48628 48628
=======================================
+ Hits 14550 14551 +1
+ Misses 34078 34077 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
MFEM GPU unit suite (74 tests) with the runtime built from Enzyme-JAX main + #3437 #3439 #3440 #3441 #3442 and Reactant.jl #3423 + #3425, over objects from main + the open affine-cfg PRs (#3436 #3438 among them): 74/74 (sweep final55, 2026-10-08 17:38). ex1 (Poisson, order 3, PA, PCG to 1e-12), timed solves in one process (JIT excluded), native CUDA for reference:
|
wsmoses
force-pushed
the
pb/scatter-oob-noop
branch
from
October 9, 2026 00:04
44b5c76 to
0b2b005
Compare
The update of an out-of-range index is dropped, so a scatter whose index constant is one tuple with a negative component, or one at or past the size of a dimension of window one, is its operand. A dead branch of a specialized kernel leaves such scatters, index -1, with the work that fed them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD
wsmoses
force-pushed
the
pb/scatter-oob-noop
branch
from
October 9, 2026 01:03
0b2b005 to
1bbdb91
Compare
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.
ScatterOutOfBoundsNoop: a scatter whose indices are a splat constant with a negative component, or one at or past the size of a dimension of window one, drops every update (StableHLO: out-of-range updates are skipped), so it is its operand. Registered asscatter_out_of_bounds_noopin the scatter group and the runtime list.Why: a branch of a specialized kernel that cannot run (the 3-D arm of
PADiffusionSetupon a 2-D problem) leaves its masked stores as scatters to index-1— in ex1's exec-time module three of the six scatters, each fed by a chain of20480x32x32arithmetic that XLA then computes for nothing. With the fold the scatters and their chains go.Test
scatter_out_of_bounds_noop.mlir: negative, past the end of a window-one dimension (both fold), an index in range and a windowed start in range (kept).🤖 Generated with Claude Code
https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD