[GNA] Fix cases when Gna2ModelGetLastError() returns unknown error (#1255)

Co-authored-by: kmagiers <kmagiers@intel.com>
This commit is contained in:
Kamil Magierski 2020-08-10 14:23:25 +02:00 committed by GitHub
parent f5884231d3
commit cb8892ca2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";