[GPU] fix coverity control flow issue (#11585) (#11585)

- Coverity CID: 1488473
- Coverity CID: 1486904
This commit is contained in:
Paul Youngsoo Ahn
2022-05-10 09:15:03 +09:00
committed by GitHub
parent eddd31f58f
commit 35b8972da3
2 changed files with 3 additions and 3 deletions

View File

@@ -37,8 +37,8 @@ void eltwise_remove_stride::conv_stride_extend(program& p, program_node& node, c
c->with_output_size = false;
node.recalc_output_layout(true);
} else {
bool can_shrink_x = (filter_size.spatial[0] - (conv->stride[1] + (tensor.spatial[0] - 1))) >= 0;
bool can_shrink_y = (filter_size.spatial[1] - (conv->stride[0] + (tensor.spatial[1] - 1))) >= 0;
bool can_shrink_x = (filter_size.spatial[0] >= (conv->stride[1] + (tensor.spatial[0] - 1)));
bool can_shrink_y = (filter_size.spatial[1] >= (conv->stride[0] + (tensor.spatial[1] - 1)));
if (can_shrink_x && can_shrink_y) {
auto c = const_cast<convolution*>(&(*conv));
c->stride[1] += tensor.spatial[0] - 1;

View File

@@ -258,7 +258,7 @@ LabelDimMap compute_label_dim_map(const ngraph::Rank& input_rank,
const size_t input_rank_length = static_input_rank ? input_rank.get_length() : labels.size();
NGRAPH_CHECK(input_rank_length >= labels.size());
const size_t num_broadcasted_dims = input_rank_length - labels.size() + 1;
NGRAPH_CHECK(num_broadcasted_dims >= 0);
NGRAPH_CHECK(num_broadcasted_dims > 0);
LabelDimMap resulted_map;
size_t current_dim = 0;