Files
openvino/ngraph/test/frontend/mock_frontend.cpp
Mikhail Nosov 2245ea8be2 [FrontEnd] Rename all frontends from "*_ngraph_frontend*" to "_ov_frontend*" (#8645)
* Renaming all frontends from "*_ngraph_frontend*" to "_ov_frontend*"

Also Debug builds on Windows release frontends without "d" suffix will not be loaded

* Fix review comments and add wheels test debug prints

* More debug prints

* Load by absolute path and remove debug prints
2021-11-18 09:26:13 +03:00

38 lines
959 B
C++

// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "frontend_manager/frontend_manager.hpp"
#include "frontend_manager/frontend_manager_defs.hpp"
#include "ngraph/visibility.hpp"
// Defined if we are building the plugin DLL (instead of using it)
#ifdef mock1_ov_frontend_EXPORTS
# define MOCK_API OPENVINO_CORE_EXPORTS
#else
# define MOCK_API OPENVINO_CORE_IMPORTS
#endif // mock1_ov_frontend_EXPORTS
using namespace ngraph;
using namespace ov::frontend;
class FrontEndMock : public FrontEnd {
public:
std::string get_name() const override {
return "mock1";
}
};
extern "C" MOCK_API FrontEndVersion GetAPIVersion() {
return OV_FRONTEND_API_VERSION;
}
extern "C" MOCK_API void* GetFrontEndData() {
FrontEndPluginInfo* res = new FrontEndPluginInfo();
res->m_name = "mock1";
res->m_creator = []() {
return std::make_shared<FrontEndMock>();
};
return res;
}