[TRITONGPU] Added template for Triton -> TritonGPU conversion
This commit is contained in:
@@ -1 +1 @@
|
||||
add_subdirectory(triton/Dialect)
|
||||
add_subdirectory(triton)
|
||||
|
2
include/triton/CMakeLists.txt
Normal file
2
include/triton/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(Conversion)
|
||||
add_subdirectory(Dialect)
|
4
include/triton/Conversion/CMakeLists.txt
Normal file
4
include/triton/Conversion/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
set(LLVM_TARGET_DEFINITIONS Passes.td)
|
||||
mlir_tablegen(Passes.h.inc -gen-pass-decls)
|
||||
add_public_tablegen_target(TritonConversionPassIncGen)
|
19
include/triton/Conversion/Passes.h
Normal file
19
include/triton/Conversion/Passes.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef TRITON_CONVERSION_PASSES_H
|
||||
#define TRITON_CONVERSION_PASSES_H
|
||||
|
||||
#include "triton/Conversion/TritonToTritonGPU/TritonToTritonGPU.h"
|
||||
|
||||
namespace mlir
|
||||
{
|
||||
namespace triton
|
||||
{
|
||||
|
||||
#define GEN_PASS_REGISTRATION
|
||||
#include "triton/Conversion/Passes.h.inc"
|
||||
|
||||
|
||||
} // namespace triton
|
||||
} // namespace mlir
|
||||
|
||||
|
||||
#endif
|
14
include/triton/Conversion/Passes.td
Normal file
14
include/triton/Conversion/Passes.td
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef TRITON_CONVERSION_PASSES
|
||||
#define TRITON_CONVERSION_PASSES
|
||||
|
||||
include "mlir/Pass/PassBase.td"
|
||||
|
||||
def ConvertTritonToTritonGPU: Pass<"convert-triton-to-tritongpu", "mlir::ModuleOp"> {
|
||||
let summary = "Convert Triton to TritonGPU";
|
||||
let description = [{
|
||||
|
||||
}];
|
||||
let constructor = "mlir::triton::createConvertTritonToTritonGPUPass()";
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,20 @@
|
||||
#ifndef TRITON_CONVERSION_TRITONTOTRITONGPU_TRITONTOTRITONGPUPASS_H_
|
||||
#define TRITON_CONVERSION_TRITONTOTRITONGPU_TRITONTOTRITONGPUPASS_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace mlir{
|
||||
|
||||
class ModuleOp;
|
||||
template <typename T> class OperationPass;
|
||||
|
||||
namespace triton{
|
||||
|
||||
std::unique_ptr<OperationPass<ModuleOp>>
|
||||
createConvertTritonToTritonGPUPass();
|
||||
|
||||
}
|
||||
} // namespace mlir
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user