Skip to content

Commit 4926f1c

Browse files
committed
Format code.
1 parent f7ba459 commit 4926f1c

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

graph_net/paddle/backend/cinn_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ def synchronize(self):
2121
or paddle.device.is_compiled_with_rocm()
2222
or paddle.device.is_compiled_with_xpu()
2323
):
24-
paddle.device.synchronize()
24+
paddle.device.synchronize()

graph_net/paddle/backend/nope_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def synchronize(self):
1212
or paddle.device.is_compiled_with_rocm()
1313
or paddle.device.is_compiled_with_xpu()
1414
):
15-
paddle.device.synchronize()
15+
paddle.device.synchronize()

graph_net/paddle/test_compiler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def get_hardward_name(args):
5151
hardware = next(
5252
match.group(2)
5353
for line in output.splitlines()
54-
if (match := re.match(r"XPU\s+(\d+):\s+(.+?)\s+\(UUID:\s*([^)]+)\)", line))
54+
if (
55+
match := re.match(
56+
r"XPU\s+(\d+):\s+(.+?)\s+\(UUID:\s*([^)]+)\)", line
57+
)
58+
)
5559
)
5660
except Exception as e:
5761
pass

graph_net/test_compiler_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def get_device_utilization(device_id, device_count, synchronizer_func):
8686
line
8787
for line in output.split("\n")
8888
if line.strip()
89-
and (line.split(", ")[0] == selected_gpu_uuid)
90-
and (line.split(", ")[1] != current_pid)
89+
if line.split(", ")[0] == selected_gpu_uuid
90+
if line.split(", ")[1] != current_pid
9191
]
9292
# Note: in docker container, the current_pid maybe different from that captured by nvidia-smi.
9393
print(

0 commit comments

Comments
 (0)