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
change
sglang
Commits
9efb2993
"vscode:/vscode.git/clone" did not exist on "e290f87ca949c077803d2da02c48173607ce70e4"
Unverified
Commit
9efb2993
authored
Jun 28, 2025
by
fzyzcjy
Committed by
GitHub
Jun 27, 2025
Browse files
Tiny add logs for expert location updater (#7308)
parent
a5317b2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
python/sglang/srt/model_executor/expert_location_updater.py
python/sglang/srt/model_executor/expert_location_updater.py
+16
-0
No files found.
python/sglang/srt/model_executor/expert_location_updater.py
View file @
9efb2993
...
@@ -30,6 +30,9 @@ from sglang.srt.utils import get_bool_env_var
...
@@ -30,6 +30,9 @@ from sglang.srt.utils import get_bool_env_var
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
_LOG_INPUT
=
get_bool_env_var
(
"SGLANG_EXPERT_LOCATION_UPDATER_LOG_INPUT"
)
class
ExpertLocationUpdater
:
class
ExpertLocationUpdater
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
_first_execution
=
True
self
.
_first_execution
=
True
...
@@ -175,6 +178,19 @@ def update_expert_weights_single_layer(
...
@@ -175,6 +178,19 @@ def update_expert_weights_single_layer(
assert
isinstance
(
old_physical_to_logical_map
,
list
)
assert
isinstance
(
old_physical_to_logical_map
,
list
)
assert
isinstance
(
new_physical_to_logical_map
,
list
)
assert
isinstance
(
new_physical_to_logical_map
,
list
)
if
_LOG_INPUT
:
logger
.
info
(
"update_expert_weights_single_layer "
f
"
{
[
x
.
shape
for
x
in
routed_experts_weights
]
=
}
"
f
"
{
[
x
.
shape
for
x
in
temp_buffers
]
=
}
"
f
"
{
old_physical_to_logical_map
=
}
"
f
"
{
new_physical_to_logical_map
=
}
"
f
"
{
num_local_physical_experts
=
}
"
f
"
{
num_gpu_per_node
=
}
"
f
"
{
rank
=
}
"
f
"
{
world_size
=
}
"
)
output_logs
=
[]
if
debug
else
None
output_logs
=
[]
if
debug
else
None
num_physical_experts
=
len
(
old_physical_to_logical_map
)
num_physical_experts
=
len
(
old_physical_to_logical_map
)
...
...
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