Skip to content

Commit 8cd9781

Browse files
authored
NPUW: Address coverity issues (#32464)
### Tickets: - EISW-187866
1 parent 6b705eb commit 8cd9781

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/plugins/intel_npu/src/plugin/npuw/partitioning/online/utils/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ std::vector<std::string> ov::npuw::online::util::getNoFolds(const std::string& n
217217
}
218218

219219
std::vector<std::string> nofolds;
220-
std::string s = std::move(nofolds_unparsed);
220+
std::string s(nofolds_unparsed);
221221

222222
size_t pos = 0;
223223
size_t start = 0;

src/plugins/intel_npu/src/plugin/npuw/perf.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class metric {
6464
}
6565
vmin = std::min(vmin, t);
6666
vmax = std::max(vmax, t);
67-
records.push_back(std::move(t));
6867
total += t;
68+
records.push_back(std::move(t));
6969
}
7070

7171
float avg() const {
@@ -184,7 +184,12 @@ struct Profile {
184184

185185
~Profile() {
186186
if (report_on_die) {
187-
report();
187+
try {
188+
// avg() & others may throw exceptions if
189+
// enabled behavior is broken
190+
report();
191+
} catch (...) {
192+
}
188193
}
189194
}
190195
};

0 commit comments

Comments
 (0)