From fadd306ded52ff5ba6dc2e96d3f8fa65869679b2 Mon Sep 17 00:00:00 2001 From: "yuan.xiong" Date: Fri, 8 Nov 2024 13:41:53 +0800 Subject: [PATCH] Update const_data map of one-hot instead of re-initialize it Signed-off-by: yuan.xiong --- src/plugins/intel_gpu/src/graph/one_hot.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/one_hot.cpp b/src/plugins/intel_gpu/src/graph/one_hot.cpp index e9613f360fd380..bb90e3bf1276b5 100644 --- a/src/plugins/intel_gpu/src/graph/one_hot.cpp +++ b/src/plugins/intel_gpu/src/graph/one_hot.cpp @@ -71,9 +71,7 @@ std::vector one_hot_inst::calc_output_layouts(const one_hot_node& /*node std::unordered_map const_data = {}; if (depth != 0) { auto depth_tensor = ov::Tensor(ov::element::i64, ov::Shape{1}, static_cast(&depth)); - const_data = { - {1, depth_tensor} - }; + const_data[1] = depth_tensor; } else if (memory_deps.count(1) > 0) { auto depth_mem = memory_deps.at(1);