//===--------- ExecusionSession.hpp - ExecutionSession Declaration --------===// // // Copyright 2019-2020 The IBM Research Authors. // // ============================================================================= // // This file contains declarations of ExecusionSession class, which helps C++ // programs interact with compiled binary model libraries. // //===----------------------------------------------------------------------===// #pragma once #include #include #include #include "src/Runtime/DynMemRef.h" namespace onnx_mlir { typedef OrderedDynMemRefDict *(*entryPointFuncType)(OrderedDynMemRefDict *); class ExecutionSession { public: ExecutionSession(std::string sharedLibPath, std::string entryPointName); std::vector> run( std::vector>); ~ExecutionSession(); protected: // Handler to the shared library file being loaded. void *_sharedLibraryHandle = nullptr; // Entry point function. entryPointFuncType _entryPointFunc = nullptr; }; } // namespace onnx_mlir