8 #ifndef MLIR_CONVERSION_GPUCOMMON_GPUCOMMONPASS_H_
9 #define MLIR_CONVERSION_GPUCOMMON_GPUCOMMONPASS_H_
12 #include "llvm/ADT/StringRef.h"
23 class LLVMTypeConverter;
28 class RewritePatternSet;
41 #define GEN_PASS_DECL_GPUTOLLVMCONVERSIONPASS
42 #include "mlir/Conversion/Passes.h.inc"
44 using OwnedBlob = std::unique_ptr<std::vector<char>>;
48 Operation *, llvm::LLVMContext &, StringRef)>;
56 std::unique_ptr<OperationPass<ModuleOp>>
63 StringRef gpuBinaryAnnotation = {},
64 bool kernelBarePtrCallConv =
false);
Conversion from types to the LLVM IR dialect.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Operation is the basic unit of execution within MLIR.
Include the generated interface declarations.
Include the generated interface declarations.
std::function< std::unique_ptr< llvm::Module >(Operation *, llvm::LLVMContext &, StringRef)> LoweringCallback
void populateGpuToLLVMConversionPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns, StringRef gpuBinaryAnnotation={}, bool kernelBarePtrCallConv=false)
Collect a set of patterns to convert from the GPU dialect to LLVM and populate converter for gpu type...
std::unique_ptr< OperationPass< ModuleOp > > createGpuToLLVMConversionPass(bool kernelBarePtrCallConv=false)
Creates a pass to convert a GPU operations into a sequence of GPU runtime calls.
std::function< OwnedBlob(const std::string &, Location, StringRef)> BlobGenerator
std::unique_ptr< std::vector< char > > OwnedBlob