Skip to content

Commit

Permalink
[GNA] Workaround support for callbacks (openvinotoolkit#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorloff authored May 29, 2020
1 parent e2729b8 commit 9af51a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions inference-engine/src/gna_plugin/gna_infer_request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class GNAInferRequest : public InferenceEngine::AsyncInferRequestInternal {
// execute input pre-processing.
execDataPreprocessing(_inputs);
inferRequestIdx = plg->QueueInference(_inputs, _outputs);
// workaround to unblock callback-based flows
if (_callback) {
auto infer_request = _publicInterface.lock();
IE_ASSERT(infer_request != nullptr);
auto res = Wait(0);
_callback(infer_request, res);
}
}

InferenceEngine::StatusCode Wait(int64_t millis_timeout) override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
std::vector<std::string> disabledTestPatterns() {
return {
// TODO: FIX BUG 31661
".*Behavior.*Callback.*"
".*Behavior.*CallbackThrowException.*"
};
}

0 comments on commit 9af51a1

Please sign in to comment.