8 #ifndef MLIR_CONVERSION_GPUTOROCDL_GPUTOROCDLPASS_H_
9 #define MLIR_CONVERSION_GPUTOROCDL_GPUTOROCDLPASS_H_
16 class LLVMTypeConverter;
17 class ConversionTarget;
18 class RewritePatternSet;
20 template <
typename OpT>
27 #define GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
28 #include "mlir/Conversion/Passes.h.inc"
43 std::unique_ptr<OperationPass<gpu::GPUModuleOp>>
45 const std::string &chipset =
"gfx900",
47 bool useBarePtrCallConv =
false,
Runtime
Potential runtimes for AMD GPU kernels.
Include the generated interface declarations.
static constexpr unsigned kDeriveIndexBitwidthFromDataLayout
Value to pass as bitwidth for the index type when the converter is expected to derive the bitwidth fr...
void populateGpuToROCDLConversionPatterns(const LLVMTypeConverter &converter, RewritePatternSet &patterns, gpu::amd::Runtime runtime)
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.
std::unique_ptr< OperationPass< gpu::GPUModuleOp > > createLowerGpuOpsToROCDLOpsPass(const std::string &chipset="gfx900", unsigned indexBitwidth=kDeriveIndexBitwidthFromDataLayout, bool useBarePtrCallConv=false, gpu::amd::Runtime runtime=gpu::amd::Runtime::Unknown)
Creates a pass that lowers GPU dialect operations to ROCDL counterparts.
const FrozenRewritePatternSet & patterns