"examples/git@developer.sourcefind.cn:OpenDAS/colossalai.git" did not exist on "767579210009a43b55867af4a0ab403abe847e94"
Commit 4f26fabe authored by HELSON's avatar HELSON Committed by Frank Lee
Browse files

fixed strings in profiler outputs (#325)

parent de0468c7
......@@ -38,11 +38,11 @@ def _format_memory(nbytes):
MB = 1024 * KB
GB = 1024 * MB
if (abs(nbytes) >= GB):
return '{:.2f} Gb'.format(nbytes * 1.0 / GB)
return '{:.2f} GB'.format(nbytes * 1.0 / GB)
elif (abs(nbytes) >= MB):
return '{:.2f} Mb'.format(nbytes * 1.0 / MB)
return '{:.2f} MB'.format(nbytes * 1.0 / MB)
elif (abs(nbytes) >= KB):
return '{:.2f} Kb'.format(nbytes * 1.0 / KB)
return '{:.2f} KB'.format(nbytes * 1.0 / KB)
else:
return str(nbytes) + ' b'
......@@ -52,9 +52,9 @@ def _format_bandwith(volme: float, time_us: int):
mb_per_sec = volme / time_us * sec_div_mb
if mb_per_sec >= 1024.0:
return '{:.3f} Gb/s'.format(mb_per_sec / 1024.0)
return '{:.3f} GB/s'.format(mb_per_sec / 1024.0)
else:
return '{:.3f} Mb/s'.format(mb_per_sec)
return '{:.3f} MB/s'.format(mb_per_sec)
class CommEvent(object):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment