Skip to content

Commit

Permalink
[GNA] Fix cases when Gna2ModelGetLastError() returns unknown error (#…
Browse files Browse the repository at this point in the history
…1255)

Co-authored-by: kmagiers <[email protected]>
  • Loading branch information
kmagiers and kmagiers authored Aug 10, 2020
1 parent f588423 commit cb8892c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inference-engine/src/gna_plugin/gna_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ void GNADeviceHelper::checkGna2Status(Gna2Status status, const Gna2Model& gnaMod
}

Gna2ModelError error;
Gna2ModelGetLastError(&error);
auto getLastErrorStatus = Gna2ModelGetLastError(&error);
if (!Gna2StatusIsSuccessful(getLastErrorStatus)) {
THROW_GNA_EXCEPTION << "\nUnsuccessful Gna2Status: (" << status << ") " << gna2StatusBuffer.data();
}

std::stringstream ss;
ss << "\n GNA Library Error:\n";
Expand Down

0 comments on commit cb8892c

Please sign in to comment.