CVS-48367: Enable HoldersTestOnImportedNetwork test on GNA (#4230)
This commit is contained in:
parent
0e4650399c
commit
5fe882e550
@ -74,8 +74,8 @@ class GNAExecutableNetwork : public InferenceEngine::ExecutableNetworkThreadSafe
|
|||||||
|
|
||||||
using ExecutableNetworkInternal::Export;
|
using ExecutableNetworkInternal::Export;
|
||||||
|
|
||||||
void ExportImpl(std::ostream&) override {
|
void Export(std::ostream& modelStream) override {
|
||||||
THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED);
|
plg->Export(modelStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetConfig(const std::map<std::string, InferenceEngine::Parameter>& config) override {
|
void SetConfig(const std::map<std::string, InferenceEngine::Parameter>& config) override {
|
||||||
|
@ -1583,6 +1583,11 @@ InferenceEngine::ExecutableNetwork GNAPlugin::ImportNetwork(std::istream& networ
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GNAPlugin::Export(const std::string &fileName) {
|
void GNAPlugin::Export(const std::string &fileName) {
|
||||||
|
std::fstream outStream(fileName, ios_base::out | ios_base::binary);
|
||||||
|
Export(outStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GNAPlugin::Export(std::ostream &outStream) {
|
||||||
if (inputsDesc->ptr_inputs_global_id.empty() || outputsDesc.empty()) {
|
if (inputsDesc->ptr_inputs_global_id.empty() || outputsDesc.empty()) {
|
||||||
THROW_GNA_EXCEPTION << " network not loaded";
|
THROW_GNA_EXCEPTION << " network not loaded";
|
||||||
}
|
}
|
||||||
@ -1593,8 +1598,6 @@ void GNAPlugin::Export(const std::string &fileName) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::fstream outStream(fileName, ios_base::out | ios_base::binary);
|
|
||||||
|
|
||||||
// TODO: nnet group parameter looks only used in application - so can we move this line into load network.
|
// TODO: nnet group parameter looks only used in application - so can we move this line into load network.
|
||||||
IE_ASSERT(!inputsDataMap.empty());
|
IE_ASSERT(!inputsDataMap.empty());
|
||||||
auto inputDims = inputsDataMap.begin()->second->getTensorDesc().getDims();
|
auto inputDims = inputsDataMap.begin()->second->getTensorDesc().getDims();
|
||||||
|
@ -128,6 +128,7 @@ class GNAPlugin : public InferenceEngine::IInferencePlugin {
|
|||||||
void Wait(uint32_t sync, InferenceEngine::Blob &result) { THROW_GNA_EXCEPTION << "Not implemented"; }
|
void Wait(uint32_t sync, InferenceEngine::Blob &result) { THROW_GNA_EXCEPTION << "Not implemented"; }
|
||||||
|
|
||||||
void Export(const std::string &fileName);
|
void Export(const std::string &fileName);
|
||||||
|
void Export(std::ostream &networkModel);
|
||||||
InferenceEngine::ExecutableNetwork ImportNetwork(const std::string &modelFileName,
|
InferenceEngine::ExecutableNetwork ImportNetwork(const std::string &modelFileName,
|
||||||
const std::map<std::string, std::string> &config) override {
|
const std::map<std::string, std::string> &config) override {
|
||||||
THROW_GNA_EXCEPTION << "Not implemented";
|
THROW_GNA_EXCEPTION << "Not implemented";
|
||||||
|
@ -27,4 +27,14 @@ namespace {
|
|||||||
::testing::ValuesIn(orders)),
|
::testing::ValuesIn(orders)),
|
||||||
HoldersTest::getTestCaseName);
|
HoldersTest::getTestCaseName);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTestImportNetwork,
|
||||||
|
::testing::Combine(
|
||||||
|
::testing::Values(CommonTestUtils::DEVICE_GNA),
|
||||||
|
::testing::ValuesIn(orders)),
|
||||||
|
HoldersTest::getTestCaseName);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTestOnImportedNetwork,
|
||||||
|
::testing::Values(CommonTestUtils::DEVICE_GNA),
|
||||||
|
HoldersTestOnImportedNetwork::getTestCaseName);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
Loading…
Reference in New Issue
Block a user