[GPU] Fixed device name in query network result (#13915)

This commit is contained in:
Vladimir Paramuzov
2022-11-14 09:09:32 +04:00
committed by GitHub
parent 2faddf61bf
commit e78a9e93c2
2 changed files with 10 additions and 1 deletions

View File

@@ -440,7 +440,7 @@ QueryNetworkResult Plugin::QueryNetwork(const CNNNetwork& network,
});
for (auto&& layerName : supported) {
res.supportedLayersMap.emplace(layerName, GetName());
res.supportedLayersMap.emplace(layerName, GetName() + "." + conf.device_id);
}
return res;

View File

@@ -115,6 +115,15 @@ void LayerTestsCommon::QueryNetwork() {
std::set<std::string> actual;
for (auto&& res : queryNetworkResult.supportedLayersMap) {
std::shared_ptr<InferenceEngine::RemoteContext> ctx = nullptr;
try {
// Try to take fully specified name from the context to match it with query network result for devices that support remote contexts
ctx = core->GetDefaultContext(targetDevice);
ASSERT_EQ(res.second, ctx->getDeviceName());
} catch (...) {
// otherwise, compare with originally used device name
ASSERT_EQ(res.second, targetDevice);
}
actual.insert(res.first);
}
ASSERT_EQ(expected, actual);