Skip to content

Commit aad0b5f

Browse files
authored
[Snippets] Fix uncaught exception coverity issues (openvinotoolkit#29134)
### Details: - Fix "Uncaught exception" coverity remarks with CID 1590971 and 1590972 ### Tickets: - 162506
1 parent 6b7bc52 commit aad0b5f

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

src/common/snippets/include/snippets/pass/propagate_precision.hpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,17 @@ class PropagatePrecision: public ov::pass::ModelPass {
2323
PropagatePrecision(const std::shared_ptr<const TargetMachine>& target_machine);
2424
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
2525

26-
static std::vector<element::Type> get_precisions(
27-
const std::vector<element::Type>& input_precisions,
28-
const std::set<std::vector<element::Type>>& supported_precisions) noexcept;
26+
static std::vector<element::Type> get_precisions(const std::vector<element::Type>& input_precisions,
27+
const std::set<std::vector<element::Type>>& supported_precisions);
2928

3029
// if can_be_removed returns true then actual convertion (actual_before => actual_after)
3130
// can be replaced to required (actual_before => required_after)
32-
static bool can_be_removed(
33-
const element::Type& actual_before,
34-
const element::Type& actual_after,
35-
const element::Type& required_after) noexcept;
31+
static bool can_be_removed(const element::Type& actual_before,
32+
const element::Type& actual_after,
33+
const element::Type& required_after);
3634

3735
// if can_be_fused returns true then actual convertion can be replaced to required
38-
static bool can_be_fused(
39-
const element::Type& actual,
40-
const element::Type& required) noexcept;
36+
static bool can_be_fused(const element::Type& actual, const element::Type& required);
4137

4238
static bool validate_and_infer_types_and_restore_outputs(const std::shared_ptr<ov::Node>& op);
4339

src/common/snippets/src/pass/propagate_precision.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -244,20 +244,17 @@ bool ov::snippets::pass::PropagatePrecision::validate_and_infer_types_and_restor
244244
return was_updated;
245245
}
246246

247-
bool ov::snippets::pass::PropagatePrecision::can_be_removed(
248-
const element::Type& actual_before,
249-
const element::Type& actual_after,
250-
const element::Type& required_after) noexcept {
247+
bool ov::snippets::pass::PropagatePrecision::can_be_removed(const element::Type& actual_before,
248+
const element::Type& actual_after,
249+
const element::Type& required_after) {
251250
if (actual_before != required_after) {
252251
return false;
253252
}
254253

255254
return can_be_fused(actual_after, actual_before);
256255
}
257256

258-
bool ov::snippets::pass::PropagatePrecision::can_be_fused(
259-
const element::Type& actual,
260-
const element::Type& required) noexcept {
257+
bool ov::snippets::pass::PropagatePrecision::can_be_fused(const element::Type& actual, const element::Type& required) {
261258
if (actual == required) {
262259
return true;
263260
}
@@ -281,7 +278,7 @@ bool ov::snippets::pass::PropagatePrecision::can_be_fused(
281278

282279
std::vector<ov::element::Type> ov::snippets::pass::PropagatePrecision::get_precisions(
283280
const std::vector<element::Type>& input_precisions,
284-
const std::set<std::vector<element::Type>>& supported_precisions_pack) noexcept {
281+
const std::set<std::vector<element::Type>>& supported_precisions_pack) {
285282
bool was_found = false;
286283
for (const auto& supported_precisions : supported_precisions_pack) {
287284
for (size_t i = 0; i < supported_precisions.size(); ++i) {

0 commit comments

Comments
 (0)