Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void scaled_dot_product_attention(const T* query,
}

const float default_scale_val = 1.0f / static_cast<float>(std::sqrt(query_shape[query_shape.size() - 1]));
const T scale_val = scale ? *scale : static_cast<T>(default_scale_val);
const T scale_val[1] = {scale ? *scale : static_cast<T>(default_scale_val)};

auto qk_shape = query_shape;
qk_shape[qk_shape.size() - 1] = key_shape[key_shape.size() - 2];
Expand All @@ -109,7 +109,7 @@ void scaled_dot_product_attention(const T* query,
ov::reference::matmul<T>(query, key, qk_data.data(), query_shape, key_shape, qk_shape, false, true);

ov::reference::multiply<T>(qk_data.data(),
&scale_val,
scale_val,
qk_data.data(),
qk_shape,
Shape{1},
Expand Down Expand Up @@ -172,4 +172,4 @@ void scaled_dot_product_attention(const T* query,
ov::reference::matmul<T>(qk_data_softmax.data(), value, output, qk_shape, value_shape, output_shape, false, false);
}
} // namespace reference
} // namespace ov
} // namespace ov
2 changes: 2 additions & 0 deletions src/core/src/any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ void Any::impl_check() const {

const std::type_info& Any::type_info() const {
impl_check();
// `impl_check' asserts valid deference
// coverity[dereference:FALSE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need these comments? Is it not enough to close coverity issue as false positive ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ticket closed on Coverity can pop-up again if code changes e.g. this issue will at different line.
If this comment is working it should be always ignored

return _impl->type_info();
}

Expand Down
2 changes: 2 additions & 0 deletions src/core/src/runtime/itensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ bool ITensor::is_continuous() const {
}

const auto default_last = default_strides.rend();
// It assumed that `default_strides' and `strides' have the same size, thus `default_stride' iterator is valid
// coverity[deref_iterator:SUPPRESS]
return (default_stride == default_last) || (*default_stride < *stride && (get_shape()[0] == 1) &&
std::all_of(default_stride, default_last, cmp::Equal(*default_stride)));
}
Expand Down
3 changes: 3 additions & 0 deletions src/core/xml_util/src/xml_deserialize_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ std::unordered_set<std::string> deserialize_tensor_names(const std::string_view&
*name_inserter = std::regex_replace(std::string(name_view), escaped_delim, delim);
}
start = pos;
// There's no real case when `pos' equals zero and following test `delim_pos != std::string::npos' protects
// against it.
// coverity[ overflow_const:SUPPRESS]
} else if (auto delim_pos = pos - 1; delim_pos != std::string::npos && tensor_names[delim_pos] == esc_char) {
++pos;
} else {
Expand Down
Loading