Repository navigation
compiler: Preserve compilation invariants under symbol renaming - #3084
Open
FabioLuporini wants to merge 10 commits into
Open
FabioLuporini wants to merge 10 commits into
FabioLuporini wants to merge 10 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3084 +/- ##
==========================================
+ Coverage 84.27% 84.30% +0.03%
==========================================
Files 258 258
Lines 57421 57522 +101
Branches 4911 4915 +4
==========================================
+ Hits 48392 48495 +103
+ Misses 8205 8204 -1
+ Partials 824 823 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
EdCaunt
reviewed
Oct 22, 2026
| self.reserved.update(i.name for e in exprs for i in e.free_symbols) | ||
|
|
||
| # Before indexification, a Function's free symbols omit its own name | ||
| self.reserved.update(i.name for i in retrieve_functions(exprs)) |
| if e0.lhs in e1.rhs.free_symbols: | ||
| dag.add_edge(e0, e1, force_add=True) | ||
|
|
||
| ordering = {e: n for n, e in enumerate(exprs)} |
Contributor
There was a problem hiding this comment.
Is this really better than using .index() on the list?
| @_uxreplace.register(CallFromPointer) | ||
| def _(expr, rule): | ||
| if expr in rule or expr.__class__ in rule: | ||
| return _uxreplace.dispatch(object)(expr, rule) |
Contributor
There was a problem hiding this comment.
Does this just do the default _uxreplace? If so, would it be more readable to put that default behaviour in a helper function and call that here too?
| x, y = np.indices(f.data_with_halo.shape, dtype=np.float32) | ||
| f.data_with_halo[:] = x + 2*y | ||
|
|
||
| op = Operator(Eq(u, f.dx + f.dy), name='names_inputs') |
This branch has not been deployed
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.
Generated temporary names can affect CSE scheduling, while symbolic substitutions can reorder lowered arithmetic or leave stale references in auxiliary metadata. Application identifiers such as r0 can also collide with compiler-generated temporaries.
This PR addresses these issues and provides a final IET customization point for backend naming passes: