Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
hg-misc-tools
Commits
2a00b13f
Commit
2a00b13f
authored
Mar 07, 2026
by
one
Browse files
[xcl-lens] Formatting
parent
14cbf98a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
projects/xcl-lens/src/xcl_lens/parser/rccl.py
projects/xcl-lens/src/xcl_lens/parser/rccl.py
+6
-5
No files found.
projects/xcl-lens/src/xcl_lens/parser/rccl.py
View file @
2a00b13f
...
@@ -135,9 +135,7 @@ class RcclLogParser:
...
@@ -135,9 +135,7 @@ class RcclLogParser:
# Part 1: NET/IB : GPU Direct RDMA Enabled for HCA <hca_no> '<hca_id>'
# Part 1: NET/IB : GPU Direct RDMA Enabled for HCA <hca_no> '<hca_id>'
ib_rows
=
[]
ib_rows
=
[]
pattern_ib
=
re
.
compile
(
pattern_ib
=
re
.
compile
(
r
"NET/IB\s+:\s+GPU Direct RDMA Enabled for HCA\s+(\d+)\s+'([^']+)'"
)
r
"NET/IB\s+:\s+GPU Direct RDMA Enabled for HCA\s+(\d+)\s+'([^']+)'"
)
for
(
host
,
rank
,
content
),
_
in
self
.
log_entries
.
items
():
for
(
host
,
rank
,
content
),
_
in
self
.
log_entries
.
items
():
m
=
pattern_ib
.
search
(
content
)
m
=
pattern_ib
.
search
(
content
)
if
m
:
if
m
:
...
@@ -169,7 +167,8 @@ class RcclLogParser:
...
@@ -169,7 +167,8 @@ class RcclLogParser:
# Part 2: GPU Direct RDMA Enabled for GPU <gpu> / HCA <hca_no> (distance <expr>), read <0|1>
# Part 2: GPU Direct RDMA Enabled for GPU <gpu> / HCA <hca_no> (distance <expr>), read <0|1>
gpu_rows
=
[]
gpu_rows
=
[]
pattern_gpu
=
re
.
compile
(
pattern_gpu
=
re
.
compile
(
r
"GPU Direct RDMA Enabled for GPU\s+(\S+)\s*/\s*HCA\s+(\d+)\s*\(distance\s+([^)]*)\),\s*read\s+([01])"
r
"GPU Direct RDMA Enabled for GPU\s+(\S+)\s*/\s*"
r
"HCA\s+(\d+)\s*\(distance\s+([^)]*)\),\s*read\s+([01])"
)
)
for
(
host
,
rank
,
content
),
_
in
self
.
log_entries
.
items
():
for
(
host
,
rank
,
content
),
_
in
self
.
log_entries
.
items
():
m
=
pattern_gpu
.
search
(
content
)
m
=
pattern_gpu
.
search
(
content
)
...
@@ -212,7 +211,9 @@ class RcclLogParser:
...
@@ -212,7 +211,9 @@ class RcclLogParser:
else
:
else
:
print
(
" (No data found)
\n
"
)
print
(
" (No data found)
\n
"
)
def
_extract_and_print
(
self
,
title
,
filter_func
,
fields
,
mandatory
,
verbose_cols
,
sort_cols
,
move_rank
=
True
):
def
_extract_and_print
(
self
,
title
,
filter_func
,
fields
,
mandatory
,
verbose_cols
,
sort_cols
,
move_rank
=
True
):
"""
"""
Generic function to extract structured data from log lines and print as a table.
Generic function to extract structured data from log lines and print as a table.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment