Skip to content

Commit

Permalink
add LoopScheduling pass
Browse files Browse the repository at this point in the history
Summary: add scheduleDeps based on attributes
  • Loading branch information
manman-ren committed Sep 27, 2024
1 parent e7ec3fe commit 3cf0007
Show file tree
Hide file tree
Showing 12 changed files with 998 additions and 499 deletions.
13 changes: 13 additions & 0 deletions include/triton/Dialect/TritonGPU/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,17 @@ def TritonGPUOptimizeAccumulatorInit: Pass<"tritongpu-optimize-accumulator-init"
"mlir::triton::TritonDialect"];
}

def TritonGPULoopScheduling: Pass<"tritongpu-loop-scheduling", "mlir::ModuleOp"> {
let summary = "Generate loop scheduling for SWP";

let description = "This pass sets up stages and clustering for software pipelining.";

let dependentDialects = ["mlir::triton::gpu::TritonGPUDialect",
"mlir::triton::TritonDialect"];
let options = [
Option<"numStages", "num-stages",
"int32_t", /*default*/"3",
"number of pipeline stages">
];
}
#endif
1 change: 1 addition & 0 deletions lib/Dialect/TritonGPU/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ add_triton_library(TritonGPUTransforms
Coalesce.cpp
F32DotTC.cpp
CombineTensorSelectAndIf.cpp
LoopScheduling.cpp
ReduceDataDuplication.cpp
OptimizeAccumulatorInit.cpp
OptimizeDotOperands.cpp
Expand Down
Loading

0 comments on commit 3cf0007

Please sign in to comment.