#pragma once
#include "megbrain_build_config.h"
#if MGB_JIT && MGB_JIT_MLIR
#include "megbrain/jit/compiler.h"
#include <mlir/ExecutionEngine/ExecutionEngine.h>
#include <mlir/IR/Module.h>
namespace mgb {
namespace jit {
class MLIRCPUExecutable final : public Executable {
public:
MLIRCPUExecutable(mlir::OwningModuleRef& module, const std::string& kernel_name);
~MLIRCPUExecutable();
void execute(JITExecutor* fusion_opr) override final;
private:
std::unique_ptr<mlir::ExecutionEngine> m_engine;
std::string m_kernel_name;
};
} }
#endif