[GNA] Workaround support for callbacks (#591)
authorDenis Orlov <denis.orlov@intel.com>
Fri, 29 May 2020 21:43:42 +0000 (00:43 +0300)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 21:43:42 +0000 (00:43 +0300)
inference-engine/src/gna_plugin/gna_infer_request.hpp
inference-engine/tests/functional/plugin/gna/shared_tests_instances/skip_tests_config.cpp

index 17688f4688a5ce86e5d769b32eee179c29bd673d..9641c17011689c893ca9321fe255a7d8b44ba612 100644 (file)
@@ -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 {
index c17bf7445ceb9d55a91ebe5ea71251a7a89668f9..5348638b62d610733efaaf2ea2d1c205c40d5e96 100644 (file)
@@ -10,6 +10,6 @@
 std::vector<std::string> disabledTestPatterns() {
     return {
         // TODO: FIX BUG 31661
-        ".*Behavior.*Callback.*"
+        ".*Behavior.*CallbackThrowException.*"
     };
 }