MLIR 22.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
13#include <memory>
14
15namespace mlir {
16class Pass;
18class ConversionTarget;
20
21template <typename OpT>
22class OperationPass;
23
24namespace amdgpu {
25struct Chipset;
26} // namespace amdgpu
27
28namespace gpu {
29class GPUModuleOp;
30} // namespace gpu
31
32#define GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
33#include "mlir/Conversion/Passes.h.inc"
34
35/// Collect a set of patterns to convert from the GPU dialect to ROCDL.
36/// If `runtime` is Unknown, gpu.printf will not be lowered
37/// The resulting pattern set should be run over a gpu.module op
38void populateGpuToROCDLConversionPatterns(const LLVMTypeConverter &converter,
39 RewritePatternSet &patterns,
40 gpu::amd::Runtime runtime,
41 amdgpu::Chipset chipset);
42
43/// Configure target to convert from the GPU dialect to ROCDL.
45
46} // namespace mlir
47
48#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:356
The abstract base pass class.
Definition Pass.h:51
Runtime
Potential runtimes for AMD GPU kernels.
Definition Runtimes.h:15
Include the generated interface declarations.
void populateGpuToROCDLConversionPatterns(const LLVMTypeConverter &converter, RewritePatternSet &patterns, gpu::amd::Runtime runtime, amdgpu::Chipset chipset)
Collect a set of patterns to convert from the GPU dialect to ROCDL.
void configureGpuToROCDLConversionLegality(ConversionTarget &target)
Configure target to convert from the GPU dialect to ROCDL.
const FrozenRewritePatternSet & patterns
Represents the amdgpu gfx chipset version, e.g., gfx90a, gfx942, gfx1103.
Definition Chipset.h:22