From 8871a29c25d7f0da9b21512e9939d44ea0f3524b Mon Sep 17 00:00:00 2001 From: "River,Li" Date: Wed, 28 Jun 2023 21:33:04 +0800 Subject: [PATCH] Fixed incorrect tensor name in e2e test Fixe issue: e2e ONNX_Customized_Cascade_Rcnn_api_2_True_batch_1_device_CPU_precision_FP325den8cnk --- src/plugins/intel_cpu/src/plugin.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index 4e6576e04aa..642ae5269d2 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -485,6 +485,17 @@ Engine::compile_model(const std::shared_ptr& model, const ov::A GetPerformanceStreams(conf, cloned_model); } + if ((cloned_model->inputs().size() != model->inputs().size()) || + (cloned_model->outputs().size() != model->outputs().size())) { + OPENVINO_THROW("Input/output port size mismatched!"); + } + // Make output ports have the same tensor names with original model + for (size_t idx = 0; idx < cloned_model->outputs().size(); idx++) { + auto new_result = cloned_model->output(idx); + auto orig_result = model->output(idx); + new_result.get_tensor().set_names(orig_result.get_tensor().get_names()); + } + // SSE runtime check is needed for some ATOM machine, which is x86-64 but w/o SSE static Xbyak::util::Cpu cpu; if (cpu.has(Xbyak::util::Cpu::tSSE)) {