blob: a13438af00e04e274b45775ef7a36b3d8878a9d1 [file] [log] [blame]
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_GPU_PASSES
#define TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_GPU_PASSES
include "mlir/Pass/PassBase.td"
def GpuFusionRewritePass : Pass<"gpu-fusion-rewrite", "ModuleOp"> {
let summary = "Pass to rewrite lmhlo.fusion ops to gpu.launch_func.";
let constructor = "createGpuFusionRewritePass()";
}
def GpuKernelToNVVMPass : Pass<"gpu-kernel-to-nvvm", "gpu::GPUModuleOp"> {
let summary = "Pass to transform a gpu module to nvvm.";
let dependentDialects = ["LLVM::LLVMDialect", "NVVM::NVVMDialect"];
let constructor = "createGpuKernelToNvvmPass()";
}
def GpuKernelToROCDLPass : Pass<"gpu-kernel-to-rocdl", "gpu::GPUModuleOp"> {
let summary = "Pass to transform a gpu module to rocdl.";
let dependentDialects = ["LLVM::LLVMDialect", "ROCDL::ROCDLDialect"];
let constructor = "createGpuKernelToRocdlPass()";
}
#endif // TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_GPU_PASSES