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 9, 2020
1 parent 71d41a9 commit c805f91
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 c805f91

Please sign in to comment.