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

Apply rule RUF046

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