Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Throws ov::Cancelled to uplevel instead of ov::Exception (#26962)

Fang Xub3c3d3b08b65
diff --git a/src/plugins/intel_cpu/src/graph.cpp b/src/plugins/intel_cpu/src/graph.cpp
index dc0f953efe7..fa3502468a9 100644
--- a/src/plugins/intel_cpu/src/graph.cpp
+++ b/src/plugins/intel_cpu/src/graph.cpp
@@ -44,6 +44,7 @@
#include <oneapi/dnnl/dnnl.hpp>
#include "common/primitive_desc_iface.hpp"
+#include "openvino/runtime/exception.hpp"
#include "openvino/runtime/threading/cpu_streams_executor.hpp"
#include "openvino/core/parallel.hpp"
@@ -1330,6 +1331,8 @@ inline void Graph::ExecuteNodeWithCatch(const NodePtr& node, SyncInferRequest* r
try {
ExecuteNode(node, request, numaId);
+ } catch (const ov::Cancelled&) {
+ throw;
} catch (const std::exception& exp) {
OPENVINO_THROW(*node, exp.what());
}