mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
This PR rebases Triton from LLVM-14 to LLVM-15. Most changes are mechanical, except for the analysis framework changes.
53 lines
1.8 KiB
TableGen
53 lines
1.8 KiB
TableGen
#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()";
|
|
|
|
let dependentDialects = ["mlir::arith::ArithmeticDialect",
|
|
"mlir::math::MathDialect",
|
|
// TODO: Does this pass depend on SCF?
|
|
"mlir::scf::SCFDialect",
|
|
"mlir::triton::TritonDialect",
|
|
"mlir::triton::gpu::TritonGPUDialect"];
|
|
|
|
let options = [
|
|
Option<"numWarps", "num-warps",
|
|
"int32_t", /*default*/"4",
|
|
"number of warps">
|
|
];
|
|
}
|
|
|
|
|
|
def ConvertTritonGPUToLLVM : Pass<"convert-triton-gpu-to-llvm", "mlir::ModuleOp"> {
|
|
let summary = "Convert TritonGPU to LLVM";
|
|
let description = [{
|
|
|
|
}];
|
|
let constructor = "mlir::triton::createConvertTritonGPUToLLVMPass()";
|
|
|
|
let dependentDialects = ["mlir::arith::ArithmeticDialect",
|
|
"mlir::math::MathDialect",
|
|
"mlir::gpu::GPUDialect",
|
|
"mlir::scf::SCFDialect",
|
|
"mlir::LLVM::LLVMDialect",
|
|
"mlir::tensor::TensorDialect",
|
|
"mlir::triton::TritonDialect",
|
|
"mlir::triton::gpu::TritonGPUDialect",
|
|
"mlir::NVVM::NVVMDialect"];
|
|
|
|
let options = [
|
|
Option<"computeCapability", "compute-capability",
|
|
"int32_t", /*default*/"80",
|
|
"device compute capability">
|
|
];
|
|
}
|
|
|
|
#endif
|