未验证 提交 a4f3c0e9 编写于 作者: C chenjian 提交者: GitHub

fix divide zero error when cpu only (#41794)

上级 5087fe20
...@@ -869,7 +869,7 @@ def _build_table(statistic_data, ...@@ -869,7 +869,7 @@ def _build_table(statistic_data,
'{} / - / - / - / {}'.format( '{} / - / - / - / {}'.format(
format_time( format_time(
other_gpu_time, unit=time_unit), other_gpu_time, unit=time_unit),
format_ratio(float(other_gpu_time) / gpu_total_time)) format_ratio(float(other_gpu_time) / total_time))
] ]
all_row_values.append(row_values) all_row_values.append(row_values)
# Calculate the column width # Calculate the column width
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册