MLIR 24.0.0git
GPUToROCDLPass.h
Go to the documentation of this file.
1//===- GPUToROCDLPass.h - Convert GPU kernel to ROCDL dialect ---*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8#ifndef MLIR_CONVERSION_GPUTOROCDL_GPUTOROCDLPASS_H_
9#define MLIR_CONVERSION_GPUTOROCDL_GPUTOROCDLPASS_H_
10
14#include <memory>
15
16namespace mlir {
17class Pass;
19class ConversionTarget;
21
22template <typename OpT>
23class OperationPass;
24
25namespace gpu {
26class GPUModuleOp;
27} // namespace gpu
28
29#define GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
30#include "mlir/Conversion/Passes.h.inc"
31
32/// Collect a set of patterns to convert from the GPU dialect to ROCDL.
33/// If `runtime` is Unknown, gpu.printf will not be lowered
34/// The resulting pattern set should be run over a gpu.module op
35void populateGpuToROCDLConversionPatterns(const LLVMTypeConverter &converter,
36 RewritePatternSet &patterns,
37 gpu::amd::Runtime runtime,
38 const ROCDL::TargetInfo &target);
39
40/// Configure target to convert from the GPU dialect to ROCDL.
42
43} // namespace mlir
44
45#endif // MLIR_CONVERSION_GPUTOROCDL_GPUTOROCDLPASS_H_
Conversion from types to the LLVM IR dialect.
Pass to transform an operation of a specific type.
Definition Pass.h:367
The abstract base pass class.
Definition Pass.h:52
Runtime
Potential runtimes for AMD GPU kernels.
Definition Runtimes.h:15
Include the generated interface declarations.
void configureGpuToROCDLConversionLegality(ConversionTarget &target)
Configure target to convert from the GPU dialect to ROCDL.
void populateGpuToROCDLConversionPatterns(const LLVMTypeConverter &converter, RewritePatternSet &patterns, gpu::amd::Runtime runtime, const ROCDL::TargetInfo &target)
Collect a set of patterns to convert from the GPU dialect to ROCDL.