New transform: Push indexing to only materialized nodes.#634
Open
kaushikcfd wants to merge 4 commits into
Open
New transform: Push indexing to only materialized nodes.#634kaushikcfd wants to merge 4 commits into
kaushikcfd wants to merge 4 commits into
Conversation
kaushikcfd
force-pushed
the
indirection_pusher
branch
5 times, most recently
from
February 20, 2026 19:43
35e4a63 to
a15bd58
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
10 times, most recently
from
March 2, 2026 01:21
8d1f516 to
c42a786
Compare
kaushikcfd
marked this pull request as ready for review
March 2, 2026 01:22
kaushikcfd
force-pushed
the
indirection_pusher
branch
3 times, most recently
from
March 2, 2026 07:21
a1f0f4b to
bf08e13
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new transform to push indexing operations down the expression DAG so that indexing happens only at (or is forced onto) materialized nodes, generalizing prior work in #425. This is accompanied by a substantial new test suite and a small testing helper to compare transformed vs. reference evaluation.
Changes:
- Introduce
pt.push_index_to_materialized_nodestransform and export it frompytato.__init__. - Add extensive tests covering many indexing composition/broadcasting scenarios.
- Add
assert_allclose_to_reftest helper for comparing two Pytato expressions by evaluation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pytato/transform/push_index_to_materialized_nodes.py |
New transform implementation that composes/pushes indices through various ops. |
pytato/__init__.py |
Exposes push_index_to_materialized_nodes as part of the public API. |
pytato/raising.py |
Adjusts ZerosLikeOp typing/raising for the new transform’s HLO lowering path. |
pytato/array.py |
Tweaks index-expression typing (ConvertibleToIndexExpr). |
test/testlib.py |
Adds assert_allclose_to_ref helper to compare two Pytato expressions via execution. |
test/test_transform.py |
New large test module for the indexing pusher transform. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kaushikcfd
force-pushed
the
indirection_pusher
branch
3 times, most recently
from
March 3, 2026 17:40
9b43f79 to
6dd89c4
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
from
March 12, 2026 19:21
6dd89c4 to
16f0843
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
3 times, most recently
from
March 15, 2026 20:57
276c70b to
fcaf770
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
5 times, most recently
from
March 25, 2026 20:06
ea9c9da to
16bd893
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
2 times, most recently
from
April 14, 2026 23:10
2f97f16 to
4bcf6fb
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
2 times, most recently
from
May 10, 2026 19:51
631abec to
94b7045
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
from
May 24, 2026 18:08
94b7045 to
2fe62a4
Compare
kaushikcfd
force-pushed
the
indirection_pusher
branch
from
June 25, 2026 18:27
2fe62a4 to
ebc954d
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.
Generalizes the logic in #425.
Includes commits from #656.