Skip to content

Commit

Permalink
Add IndexCastUIOp to AxisInfo.
Browse files Browse the repository at this point in the history
`index_cast` is supported, so there is not reason why `index_castui` shouldn't be supported. `index_castui` happens to appear in our Triton fusion emitter. Without this change Triton fails to correctly propagate axis info and do layout optimization.

PiperOrigin-RevId: 696500599
  • Loading branch information
olegshyshkov authored and Google-ML-Automation committed Nov 14, 2024
1 parent f908c44 commit 2465051
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions third_party/triton/temporary/index_cast_ui_axis_info.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/lib/Analysis/AxisInfo.cpp
+++ b/lib/Analysis/AxisInfo.cpp
@@ -1011,6 +1011,7 @@ AxisInfoAnalysis::AxisInfoAnalysis(DataF
CastOpAxisInfoVisitor<arith::ExtUIOp>,
CastOpAxisInfoVisitor<arith::TruncIOp>,
CastOpAxisInfoVisitor<arith::IndexCastOp>,
+ CastOpAxisInfoVisitor<arith::IndexCastUIOp>,
CastOpAxisInfoVisitor<triton::gpu::ConvertLayoutOp>,
CastOpAxisInfoVisitor<mlir::UnrealizedConversionCastOp>,
CastOpAxisInfoVisitor<triton::BitcastOp>>();
1 change: 1 addition & 0 deletions third_party/triton/temporary/series.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ those to this list.
temporary_patch_list = [
"//third_party/triton:temporary/replace_unreachable_by_abort.patch",
"//third_party/triton:temporary/block_k_16_fix.patch",
"//third_party/triton:temporary/index_cast_ui_axis_info.patch",
# Add new patches just above this line
]

0 comments on commit 2465051

Please sign in to comment.