From 5788c73790c881daf39398de4631f8eefa6ca2a0 Mon Sep 17 00:00:00 2001 From: hyunback Date: Thu, 28 Nov 2024 17:55:34 +0900 Subject: [PATCH] Fix build warnning-error in windows. Signed-off-by: hyunback --- src/plugins/intel_gpu/src/graph/program_node.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/program_node.cpp b/src/plugins/intel_gpu/src/graph/program_node.cpp index bf3872e7293afc..202e1476d71a4c 100644 --- a/src/plugins/intel_gpu/src/graph/program_node.cpp +++ b/src/plugins/intel_gpu/src/graph/program_node.cpp @@ -1542,14 +1542,15 @@ void program_node::create_onednn_primitive_attributes( size_t rank = cldnn::format::dimension(in.format); auto in_pshape = in.get_partial_shape(); auto out_pshape = get_output_layout().get_partial_shape(); - int ones_to_add = 0; + size_t ones_to_add = 0; if (is_type()) { auto prim = this->as().get_primitive(); if (prim->input_size == in_pshape.size()) { ones_to_add = std::max(out_pshape.size(), static_cast(rank)) - in_pshape.size(); } else { - ones_to_add = in_pshape.size() - prim->input_size; + if (in_pshape.size() > prim->input_size) + ones_to_add = in_pshape.size() - prim->input_size; } if (ones_to_add > 0) { layout new_layout = in;