SWDEV-296922 : Incorrect rounding due to integer division in rocprofiler metrics
Changed derived metrics to double from int64.
Fixed standalone test due to int64 to float change
Fixed intercept test due to int64 to float change.
Change-Id: I49631c187406ae9dd94a869b3bb13772012e8cdf
[ROCm/rocprofiler commit: f9017cbdc5]
Ta zmiana jest zawarta w:
%! (template.HTML=
Chun Yang)złożyło 2021-09-23 14:52:35 -07:00
1 rodzic
d6a648e396
złożenie
62a76c8ebb
6 plików zmienionych
+22
-8
Żadne pliki nie pasują do Twojego wyszukiwania
@@ -351,6 +351,9 @@ void output_results(const context_entry_t* entry, const char* label) {
|
||||
case ROCPROFILER_DATA_KIND_INT64:
|
||||
fprintf(file, "(%lu)\n", p->data.result_int64);
|
||||
break;
|
||||
case ROCPROFILER_DATA_KIND_DOUBLE:
|
||||
fprintf(file, "(%.10lf)\n", p->data.result_double);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "RPL-tool: undefined data kind(%u)\n", p->data.kind);
|
||||
abort();
|
||||
@@ -358,12 +361,13 @@ void output_results(const context_entry_t* entry, const char* label) {
|
||||
}
|
||||
}
|
||||
|
||||
// Output group intermeadate profiling results, created internally for complex metrics
|
||||
// Output group intermediate profiling results, created internally for complex metrics
|
||||
void output_group(const context_entry_t* entry, const char* label) {
|
||||
const rocprofiler_group_t* group = &(entry->group);
|
||||
context_entry_t group_entry = *entry;
|
||||
for (unsigned i = 0; i < group->feature_count; ++i) {
|
||||
if (group->features[i]->data.kind == ROCPROFILER_DATA_KIND_INT64) {
|
||||
if (group->features[i]->data.kind == ROCPROFILER_DATA_KIND_INT64 ||
|
||||
group->features[i]->data.kind == ROCPROFILER_DATA_KIND_DOUBLE) {
|
||||
group_entry.features = group->features[i];
|
||||
group_entry.feature_count = 1;
|
||||
output_results(&group_entry, label);
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika