-
Notifications
You must be signed in to change notification settings - Fork 78
[LoadStoreOpToLLVM] Unify the 2D block IO lowering code for both regular pointer and block pointer #5500
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR refactors the 2D block I/O load lowering code to consolidate duplicate logic between regular pointer and block pointer handling. The refactoring creates shared utilities for unpacking block pointer structures and computing memory access parameters, enabling both pointer types to use the same code path.
Key Changes:
- Introduces helper functions (
unpackLLBlockPointer,getBases,getPitch,getBaseOffsets) to extract and process pointer metadata uniformly - Removes the specialized
rewriteTensorPointerLoadfunction (~800 lines) in favor of the unified lowering path - Extends support to more layout types and transposed matrix loads for block pointers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
Outdated
Show resolved
Hide resolved
third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
Outdated
Show resolved
Hide resolved
third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
Outdated
Show resolved
Hide resolved
f0d6179 to
6bc5f30
Compare
6bc5f30 to
70554e9
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
Outdated
Show resolved
Hide resolved
70554e9 to
17cb97c
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // throughout the tile. | ||
| if (auto baseHeightInt = | ||
| mlir::triton::intel::getFoldedConstantValue(baseHeight)) { | ||
| if (baseHeightInt < tileHeight && baseHeightInt == 1) { |
Copilot
AI
Dec 1, 2025
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.
The condition baseHeightInt < tileHeight && baseHeightInt == 1 has a logical redundancy. If baseHeightInt == 1, the first condition baseHeightInt < tileHeight is only meaningful when tileHeight > 1. Consider simplifying to if (baseHeightInt == 1 && tileHeight > 1) for clarity.
| if (baseHeightInt < tileHeight && baseHeightInt == 1) { | |
| if (baseHeightInt == 1 && tileHeight > 1) { |
…lar pointer and block pointer. And clean up duplicate code. Signed-off-by: Lu,Chengjun <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.