MLIR 22.0.0git
AMDGPUToROCDL.h
Go to the documentation of this file.
1//===- AMDGPUToROCDL.h - Convert AMDGPU 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_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
9#define MLIR_CONVERSION_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
10
12#include <memory>
13#include <string>
14
15namespace mlir {
16
19class TypeConverter;
20class Pass;
21
22#define GEN_PASS_DECL_CONVERTAMDGPUTOROCDLPASS
23#include "mlir/Conversion/Passes.h.inc"
24
25/// Note: This function will also add conversions for the AMDGPU-specific
26/// address spaces and types, but those can be added separately using
27/// populateAMDGPUTypeAndAttributeConversions().
28void populateAMDGPUToROCDLConversionPatterns(LLVMTypeConverter &converter,
29 RewritePatternSet &patterns,
30 amdgpu::Chipset chipset);
31
32namespace amdgpu {
33/// Remap common GPU memory spaces (Workgroup, Private, etc) to LLVM address
34/// spaces.
36} // namespace amdgpu
37
38/// Remap AMDGPU memory spaces to LLVM address spaces
39/// by mapping amdgpu::AddressSpace::fat_raw_buffer to ptr addrspace(7),
40/// amdgpu::AddressSpace::buffer_rsrc to ptr addrspace(8), and
41/// amdgpu::AddressSpace::fat_strided_buffer to ptr addrspace(9).
43
44} // namespace mlir
45
46#endif // MLIR_CONVERSION_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
Conversion from types to the LLVM IR dialect.
The abstract base pass class.
Definition Pass.h:52
void populateCommonGPUTypeAndAttributeConversions(TypeConverter &typeConverter)
Remap common GPU memory spaces (Workgroup, Private, etc) to LLVM address spaces.
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
void populateAMDGPUToROCDLConversionPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns, amdgpu::Chipset chipset)
Note: This function will also add conversions for the AMDGPU-specific address spaces and types,...
void populateAMDGPUTypeAndAttributeConversions(TypeConverter &typeConverter)
Remap AMDGPU memory spaces to LLVM address spaces by mapping amdgpu::AddressSpace::fat_raw_buffer to ...