13 #ifndef MLIR_TARGET_LLVM_XEVM_UTILS_H
14 #define MLIR_TARGET_LLVM_XEVM_UTILS_H
36 std::optional<SmallVector<std::unique_ptr<llvm::Module>>>
43 std::optional<SmallVector<char, 0>>
compileToBinary(
const std::string &asmStr,
44 StringRef inputFormat);
55 std::optional<std::string>
findTool(StringRef tool);
Utility base class for transforming operations into binary objects, by default it returns the seriali...
Operation & module
Module to transform to a binary object.
Operation is the basic unit of execution within MLIR.
This class serves as an opaque interface for passing options to the TargetAttrInterface methods.
Base class for all XeVM serializations from GPU modules into binary strings.
gpu::TargetOptions targetOptions
GPU compilation target options.
XeVMTargetAttr getTarget() const
Returns the target attribute.
std::optional< SmallVector< std::unique_ptr< llvm::Module > > > loadBitcodeFiles(llvm::Module &module) override
Loads the bitcode files in librariesToLink.
std::optional< SmallVector< char, 0 > > compileToBinary(const std::string &asmStr, StringRef inputFormat)
Compiles to native code using ocloc.
SmallVector< Attribute > librariesToLink
List of LLVM bitcode to link into after translation to LLVM IR.
SerializeGPUModuleBase(Operation &module, XeVMTargetAttr target, const gpu::TargetOptions &targetOptions={})
XeVMTargetAttr xeTarget
XeVM Target attribute.
std::optional< std::string > findTool(StringRef tool)
Returns the path to the tool used for serialization.
gpu::GPUModuleOp getGPUModuleOp()
Returns the gpu module being serialized.
Include the generated interface declarations.