Update structured-to-memref
pass to support the new pass pipeline
#217
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.
This PR simplifies the
structured-to-memref
pass responsible for converting structured triton load / store ops to memref load / store ops. This is part of the work to allow triton-shared to lower gather / scatter pointer sequences. Previously, this pass is also responsible for converting scalar pointer load and store into memref; that transformation has now been moved tounstructured-to-memref
.In addition, the PR also updates the
triton-to-linalg-experimental
pass to fully utilize all the new passes. Once merged, triton-shared now fully supports gather / scatter. An example test (test_gather_scatter.py
) is also added to demonstrate this new capability.Intended lowering pipeline:
tts.make_tptr %ptr_arg with offsets and strides
tts.load
andtts.store
tt.load
andtt.store
intactfold-unstructured-ptr
pass #210):tts.make_unstructured_tptr %ptr_arg %offsets
tt.addptr
tts
dialect tomemref
with the exception oftts.make_unstructured_tptr
unstructured-to-memref
pass #216 ):tt.load
,tt.store
, andtts.make_unstructured_tptr
into memreftriton-ptr-to-memref
pass #211):