Skip to content

Commit

Permalink
Update const_data map of one-hot instead of re-initialize it
Browse files Browse the repository at this point in the history
Signed-off-by: yuan.xiong <[email protected]>
  • Loading branch information
yuanxion committed Nov 21, 2024
1 parent 0ab78a2 commit fadd306
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/intel_gpu/src/graph/one_hot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ std::vector<layout> one_hot_inst::calc_output_layouts(const one_hot_node& /*node
std::unordered_map<size_t, ov::Tensor> const_data = {};
if (depth != 0) {
auto depth_tensor = ov::Tensor(ov::element::i64, ov::Shape{1}, static_cast<void*>(&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);

Expand Down

0 comments on commit fadd306

Please sign in to comment.