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
0ca55744
Commit
0ca55744
authored
Mar 07, 2026
by
one
Browse files
[xcl-lens] Move instance members to class members
parent
3e48fc9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
46 deletions
+47
-46
projects/xcl-lens/src/xcl_lens/parser/rccl.py
projects/xcl-lens/src/xcl_lens/parser/rccl.py
+47
-46
No files found.
projects/xcl-lens/src/xcl_lens/parser/rccl.py
View file @
0ca55744
import
re
from
typing
import
Final
import
pandas
as
pd
class
RcclLogParser
:
def
__init__
(
self
,
verbose
=
False
,
hosts
=
None
,
ranks
=
None
):
# Deduplicated set of (host, rank, content) tuples
self
.
log_entries
:
set
[
tuple
[
str
,
int
,
str
]]
=
set
()
# Verbosity flag used by report sections
self
.
_verbose
=
verbose
# Filters
self
.
_hosts
=
hosts
if
hosts
is
not
None
else
[]
self
.
_ranks
=
[
int
(
r
)
for
r
in
ranks
]
if
ranks
is
not
None
else
[]
# Pattern -> output string or as-is
self
.
sys_patterns
=
{
sys_patterns
:
Final
=
{
r
"kernel version"
:
None
,
r
"ROCr version"
:
None
,
r
"RCCL version"
:
None
,
...
...
@@ -29,7 +19,7 @@ class RcclLogParser:
}
# Pattern -> column with strict validation
self
.
graph_info_fields
=
{
graph_info_fields
:
Final
=
{
r
"Pattern"
:
(
"Pattern"
,
r
"\d+"
),
r
"crossNic"
:
(
"crossNic"
,
r
"\d+"
),
r
"nChannels"
:
(
"nChannels"
,
r
"\d+"
),
...
...
@@ -39,7 +29,7 @@ class RcclLogParser:
}
# Pattern -> column with strict validation
self
.
cl_transfer_fields
=
{
cl_transfer_fields
:
Final
=
{
r
"protocol"
:
(
"protocol"
,
r
"Simple|LL|LL128"
),
r
"nbytes"
:
(
"nbytes"
,
r
"\d+"
),
r
"algorithm"
:
(
"algorithm"
,
r
"Tree|Ring"
),
...
...
@@ -51,7 +41,7 @@ class RcclLogParser:
}
# Pattern -> column with strict validation
self
.
p2p_fields
=
{
p2p_fields
:
Final
=
{
r
"p2p : rank"
:
(
"local"
,
r
"\d+"
),
r
"send rank"
:
(
"send"
,
r
"\d+"
),
r
"recv rank"
:
(
"recv"
,
r
"\d+"
),
...
...
@@ -61,6 +51,17 @@ class RcclLogParser:
r
"protocol"
:
(
"protocol"
,
r
"Simple|LL|LL128"
),
}
def
__init__
(
self
,
verbose
=
False
,
hosts
=
None
,
ranks
=
None
):
# Deduplicated set of (host, rank, content) tuples
self
.
log_entries
:
set
[
tuple
[
str
,
int
,
str
]]
=
set
()
# Verbosity flag used by report sections
self
.
_verbose
=
verbose
# Filters
self
.
_hosts
=
hosts
if
hosts
is
not
None
else
[]
self
.
_ranks
=
[
int
(
r
)
for
r
in
ranks
]
if
ranks
is
not
None
else
[]
def
collect
(
self
,
line
):
self
.
_preprocess_line
(
line
)
...
...
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