[Codegen][VectorExt] Add VectorExt::TransferScatter#23610
Closed
keshavvinayak01 wants to merge 6 commits intoiree-org:mainfrom
Closed
[Codegen][VectorExt] Add VectorExt::TransferScatter#23610keshavvinayak01 wants to merge 6 commits intoiree-org:mainfrom
keshavvinayak01 wants to merge 6 commits intoiree-org:mainfrom
Conversation
Extract shared verifier, templatize fold patterns, merge lowering files into LowerTransferGatherScatterOps.cpp, and extract GPU distribution and layout analysis helpers to reduce code duplication between the two ops. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Keshav Vinayak Jha <[email protected]>
Signed-off-by: Keshav Vinayak Jha <[email protected]>
0600626 to
792746d
Compare
Replace custom parse/print with declarative assemblyFormat using `(-> type($result)^)?` for the optional tensor result. Unify TransferOpAdaptor into a single template using `if constexpr`. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Keshav Vinayak Jha <[email protected]>
Extract foldAllTrueSplatMask and foldTransferIndexVecOps to deduplicate the gather and scatter fold functions. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Keshav Vinayak Jha <[email protected]>
Merge removeDim0FromMap/removeDim0FromIndexVecMap into a single function with a droppedAxes pointer parameter. Remove UnrollDim0Info struct in favor of output parameters. Templatize UnrollTransferDim for both gather and scatter. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Keshav Vinayak Jha <[email protected]>
Add scatter equivalents of the existing gather unrolling tests: memref, masked, tensor semantics, and 3D transposed index vector. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Keshav Vinayak Jha <[email protected]>
hanhanW
requested changes
Mar 3, 2026
Contributor
hanhanW
left a comment
There was a problem hiding this comment.
It's good to have a single PR that demonstrate the impact, but you should really break it into a few small PRs. I did not review any details, and I think we can at least break it into something like
- Introduce the operation including roundtrip/invalid tests.
- A PR per interface implementation.
- Unrolling support
Please read below links for guidance:
Contributor
|
Nice! I think splitting PR as Hanhan suggested is a good idea. |
This was referenced Mar 5, 2026
keshavvinayak01
added a commit
that referenced
this pull request
Mar 7, 2026
…23666) Introduce `iree_vector_ext.transfer_scatter`, the write counterpart to `transfer_gather`. Uses the same unified `indexing_maps` attribute with per-dimension control (contiguous, scattered, broadcast). For tensor operands the op returns the modified tensor; for memref operands it has no result. Part 1/4 from #23610 --------- Signed-off-by: Keshav Vinayak Jha <[email protected]> Co-Authored-By: Claude Sonnet 4.6 [email protected]
This was referenced Mar 9, 2026
keshavvinayak01
added a commit
that referenced
this pull request
Mar 11, 2026
) Add bufferization interface for `TransferScatterOp` Split from #23703 per review feedback. Part 3a/4 from #23610 Signed-off-by: Keshav Vinayak Jha <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
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.
Adds
iree_vector_ext.transfer_scatter, the write counterpart totransfer_gather, using the same unifiedindexing_mapsattribute. For tensor operands, the operation returns the modified tensor; for memref operands, it has no result.Example — scatter write: writing values into scattered rows of a 2D dest:
Adds a lot of templatizing for shared code logic of TransferGather/TransferScatter, and missing tests in
vector_lowering.mlir