-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[mlir][ROCDL] Add tensor load and store instructions to ROCDL #165016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kuhar
merged 7 commits into
llvm:main
from
justinrosner:justinr-rocdl-tensor-load-store
Oct 28, 2025
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1bea035
[mlir][ROCDL] Add tensor load and store instructions to ROCDL
justinrosner 983aff0
Merge branch 'main' into justinr-rocdl-tensor-load-store
justinrosner 2fcb81e
Update Arg types
justinrosner c966631
Remove mem properties
justinrosner 04c5172
Update LIT tests and add description to ops
justinrosner 0bcaa1f
Attend to more review comments
justinrosner 2c70cf5
Add back unique types to assembly string
justinrosner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we want
MemReadhere, same asMemWritebelow.Here is what I can find:
IntrInaccessibleMemOrArgMemOnlyI think memory properties are best associated with the ROCDL intrinsic instead of the individual arguments. @justinrosner
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to do something like the following instead then?
MemoryEffectOpInterfaceto each classgetEffectsmethod with something like:Does this give a better matching with what the underlying LLVM intrinsic is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quickly looked around, it seems the best we can do is to use
RecursiveMemoryEffectsto represent this op.So it could be like:
Let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that
RecursiveMemoryEffectswas meant for ops that contain regions and want their memory behavior to be the union of the effects of the nested ops? The new ops have a 1:1 mapping with the intrinsics, so they are not going to have any regions. So wouldn't marking them as recursive have no effect here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe here is a design question: per the manual,
TENSOR_LOAD_TO_LDSwill be decomposed into a series ofGLOBAL_LOAD_ASYNC_TO_LDSinternally as it is using TDM. So it is intrinsically doing something more.But looking around, I don't see other ROCDL ops that works on mem actually have related memory traits. So I guess it is okay to skip it.