diff options
author | Davide Grohmann <davide.grohmann@arm.com> | 2022-04-25 12:52:38 +0200 |
---|---|---|
committer | Davide Grohmann <davide.grohmann@arm.com> | 2022-05-02 09:40:15 +0200 |
commit | 82d225899bd3d4fd07d70cac80f50c1b288dc4a3 (patch) | |
tree | d0edc8d0fa059bba99e00377feab1aad42385590 /utils/inference_runner | |
parent | 415de582dcf6f06dc71c9c48eeed0a01bfefc222 (diff) | |
download | ethos-u-linux-driver-stack-82d225899bd3d4fd07d70cac80f50c1b288dc4a3.tar.gz |
Add support for rejected inference responses
Change-Id: I62e13df69c712ed4cf70766429b4cb13fc9c9dcb
Diffstat (limited to 'utils/inference_runner')
-rw-r--r-- | utils/inference_runner/inference_runner.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/inference_runner/inference_runner.cpp b/utils/inference_runner/inference_runner.cpp index b6a5cdb..21e133c 100644 --- a/utils/inference_runner/inference_runner.cpp +++ b/utils/inference_runner/inference_runner.cpp @@ -254,17 +254,18 @@ int main(int argc, char *argv[]) { int ofmIndex = 0; for (auto &inference : inferences) { + cout << "Inference status: " << inference->status() << endl; /* make sure the wait completes ok */ try { + cout << "Wait for inference" << endl; inference->wait(timeout); } catch (std::exception &e) { cout << "Failed to wait for inference completion: " << e.what() << endl; exit(1); } - string status = inference->failed() ? "failed" : "success"; - cout << "Inference status: " << status << endl; + cout << "Inference status: " << inference->status() << endl; string ofmFilename = ofmArg + "." + to_string(ofmIndex); ofstream ofmStream(ofmFilename, ios::binary); @@ -273,7 +274,7 @@ int main(int argc, char *argv[]) { exit(1); } - if (!inference->failed()) { + if (inference->status() == InferenceStatus::OK) { /* The inference completed and has ok status */ for (auto &ofmBuffer : inference->getOfmBuffers()) { cout << "OFM size: " << ofmBuffer->size() << endl; |