Skip to content

Commit

Permalink
[GNA] Fix cases when Gna2ModelGetLastError() returns unknown error
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiers committed Jul 30, 2020
1 parent 861bcc2 commit b737af1
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 b737af1

Please sign in to comment.