Skeleton for the pipeline pass
This commit is contained in:
@@ -1 +1,2 @@
|
||||
add_subdirectory(IR)
|
||||
add_subdirectory(Transforms)
|
||||
|
@@ -0,0 +1,3 @@
|
||||
set(LLVM_TARGET_DEFINITIONS Passes.td)
|
||||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name TritonGPU)
|
||||
add_public_tablegen_target(TritonGPUTransformsIncGen)
|
14
include/triton/Dialect/TritonGPU/Transforms/Passes.h
Normal file
14
include/triton/Dialect/TritonGPU/Transforms/Passes.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef TRITON_DIALECT_TRITONGPU_TRANSFORMS_PASSES_H_
|
||||
#define TRITON_DIALECT_TRITONGPU_TRANSFORMS_PASSES_H_
|
||||
|
||||
#include "mlir/Pass/Pass.h"
|
||||
|
||||
namespace mlir {
|
||||
std::unique_ptr<Pass> createTritonGPUPipelinePass();
|
||||
|
||||
// /// Generate the code for registering passes.
|
||||
// #define GEN_PASS_REGISTRATION
|
||||
// #include "triton/Dialect/TritonGPU/Transforms/Passes.h.inc"
|
||||
|
||||
} // namespace mlir
|
||||
#endif
|
27
include/triton/Dialect/TritonGPU/Transforms/Passes.td
Normal file
27
include/triton/Dialect/TritonGPU/Transforms/Passes.td
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef TRITONGPU_PASSES
|
||||
#define TRITONGPU_PASSES
|
||||
|
||||
include "mlir/Pass/PassBase.td"
|
||||
|
||||
def TritonGPUPipeline : Pass<"tritongpu-pipeline", "mlir::FuncOp"> {
|
||||
let summary = "pipeline";
|
||||
|
||||
let description = [{
|
||||
scf.for() {
|
||||
%a = load %a_ptr;
|
||||
%b = load %b_ptr;
|
||||
|
||||
%d = dot %a, %b, %c;
|
||||
}
|
||||
|
||||
=>
|
||||
|
||||
...
|
||||
}];
|
||||
|
||||
let constructor = "mlir::triton::gpu::createPipelinePass";
|
||||
|
||||
let dependentDialects = ["mlir::triton::gpu::TritonGPUDialect"];
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user