Skip to content

Commit

Permalink
fixed assertion failure in kernel aggregation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zma2 committed May 24, 2022
1 parent 915e04d commit 40f1236
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.45.0
0.45.1
16 changes: 15 additions & 1 deletion tools/oneprof/finalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,20 @@ class Finalizer {
}
return total;
}
case ZET_VALUE_TYPE_BOOL8: {
// how to aggregate bool values?
zet_typed_value_t total;
total.type = ZET_VALUE_TYPE_BOOL8;
total.value.b8 = 0;

for (int j = 0; j < report_count; ++j) {
report = report_list.data() + j * report_size;
zet_typed_value_t value = report[metric_id];
PTI_ASSERT(value.type == ZET_VALUE_TYPE_BOOL8);
total.value.b8 |= value.value.b8;
}
return total;
}
default: {
PTI_ASSERT(0);
break;
Expand Down Expand Up @@ -1125,4 +1139,4 @@ class Finalizer {
Logger logger_;
};

#endif // PTI_TOOLS_ONEPROF_FINALIZER_H_
#endif // PTI_TOOLS_ONEPROF_FINALIZER_H_

0 comments on commit 40f1236

Please sign in to comment.