[SWDEV-484495] Fix int truncation in CSV output (#1098)
CSV output truncates doubles to ints when it shouldn't. Derived metrics
are (mostly) doubles and lose precision (or become worthless) if treated
as an int. Converted these to double to match the format we return from
rocprof-sdk.
Co-authored-by: Benjamin Welton <ben@amd.com>
[ROCm/rocprofiler-sdk commit: 4f05850efd]
这个提交包含在:
1 父节点
c470fd1cc4
当前提交
ee620bf7dc
3 个文件已更改
+4
-4
没有与搜索条件相匹配的文件
@@ -487,7 +487,7 @@ generate_csv(tool_table* too
|
||||
for(const auto& record : data)
|
||||
{
|
||||
auto kernel_id = record.dispatch_data.dispatch_info.kernel_id;
|
||||
auto counter_name_value = std::map<std::string, uint64_t>{};
|
||||
auto counter_name_value = std::map<std::string, double>{};
|
||||
for(uint64_t i = 0; i < record.counter_count; i++)
|
||||
{
|
||||
const auto& count = record.records.at(i);
|
||||
@@ -496,7 +496,7 @@ generate_csv(tool_table* too
|
||||
auto search = counter_name_value.find(counter_name);
|
||||
if(search == counter_name_value.end())
|
||||
counter_name_value.emplace(
|
||||
std::pair<std::string, uint64_t>{counter_name, rec.counter_value});
|
||||
std::pair<std::string, double>{counter_name, rec.counter_value});
|
||||
else
|
||||
search->second = search->second + rec.counter_value;
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户