提交 83e4bd29 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Virgile Andreani

Apply rule RUF046

上级 861816d9
......@@ -1298,22 +1298,22 @@ class ProfileStats:
print(
(
f" CPU: {int(round(new_max_running_max_memory_size[1] / 1024.0))}KB "
f"({int(round(max_running_max_memory_size[1] / 1024.0))}KB)"
f" CPU: {round(new_max_running_max_memory_size[1] / 1024.0)}KB "
f"({round(max_running_max_memory_size[1] / 1024.0)}KB)"
),
file=file,
)
print(
(
f" GPU: {int(round(new_max_running_max_memory_size[2] / 1024.0))}KB "
f"({int(round(max_running_max_memory_size[2] / 1024.0))}KB)"
f" GPU: {round(new_max_running_max_memory_size[2] / 1024.0)}KB "
f"({round(max_running_max_memory_size[2] / 1024.0)}KB)"
),
file=file,
)
print(
(
f" CPU + GPU: {int(round(new_max_running_max_memory_size[0] / 1024.0))}KB "
f"({int(round(max_running_max_memory_size[0] / 1024.0))}KB)"
f" CPU + GPU: {round(new_max_running_max_memory_size[0] / 1024.0)}KB "
f"({round(max_running_max_memory_size[0] / 1024.0)}KB)"
),
file=file,
)
......@@ -1334,15 +1334,15 @@ class ProfileStats:
file=file,
)
print(
f" CPU: {int(round(new_max_node_memory_size[1] / 1024.0))}KB",
f" CPU: {round(new_max_node_memory_size[1] / 1024.0)}KB",
file=file,
)
print(
f" GPU: {int(round(new_max_node_memory_size[2] / 1024.0))}KB",
f" GPU: {round(new_max_node_memory_size[2] / 1024.0)}KB",
file=file,
)
print(
f" CPU + GPU: {int(round(new_max_node_memory_size[0] / 1024.0))}KB",
f" CPU + GPU: {round(new_max_node_memory_size[0] / 1024.0)}KB",
file=file,
)
print("---", file=file)
......@@ -1350,7 +1350,7 @@ class ProfileStats:
if min_max_peak:
print(
" Minimum peak from all valid apply node order is "
f"{int(round(min_max_peak / 1024.0))}KB(took {min_peak_time:3f}s to compute)",
f"{round(min_max_peak / 1024.0)}KB(took {min_peak_time:3f}s to compute)",
file=file,
)
......
......@@ -255,7 +255,7 @@ class TestBroadcast:
cop = Elemwise
openmp_minsize = 2 * config.openmp_elemwise_minsize
openmp_minsize_sqrt = int(math.ceil(math.sqrt(openmp_minsize)))
openmp_minsize_sqrt = math.ceil(math.sqrt(openmp_minsize))
# The order is important if you change them.
linkers = [PerformLinker, CLinker]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论