Skip to content

Commit

Permalink
AMD specific scheduling pass for TTGIR instructions (#483)
Browse files Browse the repository at this point in the history
* Add scheduling pass

* Add LDSWr, LDSRd sinking to scheduler

* Add improvements to AMDReorderInstructions.cpp

* Remove unwanted change in fa tutorial

* Small fixes in fa tutorials

* Address review comments and add some minor fixes

* Enable use of scheduling pass along with amd pipelining

* Don't use reordering together with pipelining

---------

Co-authored-by: Ognjen <oplavsic@luxoft.com>
Co-authored-by: Ognjen Plavsic <ognjen.plavsic@luxoft.com>
  • Loading branch information
3 people authored Mar 27, 2024
1 parent 45d8732 commit a09c6b3
Show file tree
Hide file tree
Showing 9 changed files with 474 additions and 7 deletions.
2 changes: 2 additions & 0 deletions include/triton/Dialect/TritonGPU/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ std::unique_ptr<Pass> createTritonGPUCoalescePass();

std::unique_ptr<Pass> createTritonGPUReorderInstructionsPass();

std::unique_ptr<Pass> createTritonAMDGPUReorderInstructionsPass();

std::unique_ptr<Pass> createTritonGPUDecomposeConversionsPass();

std::unique_ptr<Pass> createTritonGPURemoveLayoutConversionsPass();
Expand Down
12 changes: 12 additions & 0 deletions include/triton/Dialect/TritonGPU/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ def TritonGPUReorderInstructions: Pass<"tritongpu-reorder-instructions", "mlir::
"mlir::triton::TritonDialect"];
}

def TritonAMDGPUReorderInstructions: Pass<"tritonamdgpu-reorder-instructions", "mlir::ModuleOp"> {
let summary = "Reorder instructions";

let description = "This pass reorder instructions so as to be more suitable for good code generation from "
"LLVM backend.";

let constructor = "mlir::createTritonAMDGPUReorderInstructionsPass()";

let dependentDialects = ["mlir::triton::gpu::TritonGPUDialect",
"mlir::triton::TritonDialect"];
}

def TritonGPUDecomposeConversions: Pass<"tritongpu-decompose-conversions", "mlir::ModuleOp"> {
let summary = "Decompose convert[distributed -> dotOperand] into convert[distributed -> shared -> dotOperand]";

Expand Down
Loading

0 comments on commit a09c6b3

Please sign in to comment.