From bab74f78351f26c5c432cc42ea6f33c03f3a4d3d Mon Sep 17 00:00:00 2001 From: Denis Orlov Date: Sat, 30 May 2020 00:43:42 +0300 Subject: [PATCH] [GNA] Workaround support for callbacks (#591) --- inference-engine/src/gna_plugin/gna_infer_request.hpp | 7 +++++++ .../gna/shared_tests_instances/skip_tests_config.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/inference-engine/src/gna_plugin/gna_infer_request.hpp b/inference-engine/src/gna_plugin/gna_infer_request.hpp index 17688f4688a5ce..9641c17011689c 100644 --- a/inference-engine/src/gna_plugin/gna_infer_request.hpp +++ b/inference-engine/src/gna_plugin/gna_infer_request.hpp @@ -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 { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/skip_tests_config.cpp index c17bf7445ceb9d..5348638b62d610 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/skip_tests_config.cpp @@ -10,6 +10,6 @@ std::vector disabledTestPatterns() { return { // TODO: FIX BUG 31661 - ".*Behavior.*Callback.*" + ".*Behavior.*CallbackThrowException.*" }; }