Skip to content

Commit 3e4dc72

Browse files
authored
Thread enable-modulo-support through TritonToLinalgExperimental (#40)
TritonToStructured accepts enable-modulo-support (since f2eb8c5), but TritonToLinalgExperimental never declared the option and never forwarded it to the inner createTritonToStructuredPass() call, so --triton-to-linalg-experimental=enable-modulo-support=false errored with "no such option" instead of disabling the modulo split-pointer path.
1 parent 0c27923 commit 3e4dc72

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

include/triton-shared/Conversion/TritonToLinalgExperimental/Passes.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def TritonToLinalgExperimental : Pass<"triton-to-linalg-experimental", "mlir::Mo
1616
let options = [
1717
Option<"enableMakeGatherScatterTensorPtr", "enable-make-gather-scatter", "bool", /*default*/"true",
1818
"Enable make_gather_scatter_tptr support">,
19+
Option<"enableModuloSupport", "enable-modulo-support", "bool", /*default*/"true",
20+
"Enable modulo operation support in pointer analysis">,
1921
Option<"enableCollapseShape", "enable-collapse-shape", "bool", /*default*/"false",
2022
"Enable collapse shape pass">,
2123
];

lib/Conversion/TritonToLinalgExperimental/TritonToLinalgExperimentalPass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class TritonToLinalgExperimentalPass
5555
auto moduleOp = getOperation();
5656
PassManager pm(&getContext(), moduleOp.getOperationName());
5757

58-
pm.addPass(createTritonToStructuredPass(enableMakeGatherScatterTensorPtr));
58+
pm.addPass(createTritonToStructuredPass(enableMakeGatherScatterTensorPtr,
59+
enableModuloSupport));
5960

6061
// Erase dead code and fold constants created during lowering
6162
pm.addPass(createCSEPass());

0 commit comments

Comments
 (0)