[IE CLDNN] Better error message when output is not found (#824)

This commit is contained in:
Vladimir Paramuzov 2020-06-09 12:26:28 +03:00 committed by GitHub
parent d02b9a9b81
commit b4546ad1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4910,6 +4910,12 @@ void Program::AddOutputPrimitive(cldnn::topology& topology, std::string outputNa
// Find correct output ID. Start with name stored in IR.
std::string outputID = outLayerName;
// This can happen when an output has invalid connections with previous layer and
// it's not handled by CreateSingleLayerPrimitive method
if (primitiveIDs.find(outLayerName) == primitiveIDs.end()) {
THROW_IE_EXCEPTION << "Can't find output with name " << outLayerName;
}
std::string finalID = primitiveIDs.at(outLayerName);
while (outputID != finalID) {