Add the implementation to GetExecGraphInfo API in AUTO plugin (#16979)
This commit is contained in:
parent
aa1f26a2b7
commit
589bd6d076
@ -34,4 +34,11 @@ void ExecutableNetwork::SetExeNetworkForContext() {
|
||||
std::string ExecutableNetwork::GetLogTag() const noexcept {
|
||||
return _sContext->_LogTag;
|
||||
}
|
||||
|
||||
std::shared_ptr<ngraph::Function> ExecutableNetwork::GetExecGraphInfo() {
|
||||
// TODO: When there are more then 2 executable networks, such as MULTI:GPU,CPU
|
||||
auto autoSContext = std::dynamic_pointer_cast<AutoScheduleContext>(_sContext);
|
||||
return autoSContext->_hwExecutableNetwork->GetExecGraphInfo();
|
||||
}
|
||||
|
||||
} // namespace MultiDevicePlugin
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
using Ptr = std::shared_ptr<ExecutableNetwork>;
|
||||
ExecutableNetwork(const Schedule::Ptr& schedule, const ScheduleContext::Ptr& sContext);
|
||||
IInferPtr CreateInferRequest() override;
|
||||
std::shared_ptr<ngraph::Function> GetExecGraphInfo() override;
|
||||
~ExecutableNetwork() override;
|
||||
|
||||
protected:
|
||||
|
@ -424,7 +424,11 @@ TEST_P(ExecGraphSerializationTest, ExecutionGraph) {
|
||||
|
||||
pugi::xml_document expected;
|
||||
pugi::xml_document result;
|
||||
ASSERT_TRUE(expected.load_string(target_device == "CPU" ? expected_serialized_model_cpu : expected_serialized_model));
|
||||
if (target_device == "CPU" || target_device == "AUTO:CPU" || target_device == "MULTI:CPU") {
|
||||
ASSERT_TRUE(expected.load_string(expected_serialized_model_cpu));
|
||||
} else {
|
||||
ASSERT_TRUE(expected.load_string(expected_serialized_model));
|
||||
}
|
||||
ASSERT_TRUE(result.load_file(m_out_xml_path.c_str()));
|
||||
|
||||
bool status;
|
||||
|
Loading…
Reference in New Issue
Block a user