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
93e53f6e
"torchvision/vscode:/vscode.git/clone" did not exist on "174e135d54158adb892d43ee2a2bf3217887c2d1"
Unverified
Commit
93e53f6e
authored
May 26, 2025
by
fzyzcjy
Committed by
GitHub
May 25, 2025
Browse files
Logging and minor fixes to two batch overlap and EPLB (#6595)
parent
a191a0e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
python/sglang/srt/managers/expert_location.py
python/sglang/srt/managers/expert_location.py
+4
-2
python/sglang/srt/two_batch_overlap.py
python/sglang/srt/two_batch_overlap.py
+14
-1
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+1
-0
No files found.
python/sglang/srt/managers/expert_location.py
View file @
93e53f6e
...
...
@@ -152,8 +152,10 @@ class ExpertLocationMetadata:
return
ExpertLocationMetadata
.
_init_raw
(
ep_size
=
common
[
"ep_size"
],
physical_to_logical_map
=
physical_to_logical_map
,
logical_to_all_physical_map
=
logical_to_all_physical_map
,
physical_to_logical_map
=
physical_to_logical_map
.
to
(
server_args
.
device
),
logical_to_all_physical_map
=
logical_to_all_physical_map
.
to
(
server_args
.
device
),
)
@
staticmethod
...
...
python/sglang/srt/two_batch_overlap.py
View file @
93e53f6e
import
dataclasses
import
logging
from
typing
import
TYPE_CHECKING
,
Dict
,
List
,
Optional
,
Sequence
import
torch
...
...
@@ -11,11 +12,15 @@ from sglang.srt.managers.schedule_batch import global_server_args_dict
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
from
sglang.srt.operations
import
execute_operations
,
execute_overlapped_operations
from
sglang.srt.operations_strategy
import
OperationsStrategy
from
sglang.srt.utils
import
BumpAllocator
,
DeepEPMode
from
sglang.srt.utils
import
BumpAllocator
,
DeepEPMode
,
get_bool_env_var
if
TYPE_CHECKING
:
from
sglang.srt.model_executor.cuda_graph_runner
import
CudaGraphRunner
_tbo_debug
=
get_bool_env_var
(
"SGLANG_TBO_DEBUG"
)
logger
=
logging
.
getLogger
(
__name__
)
# -------------------------------- Compute Basic Info ---------------------------------------
...
...
@@ -178,6 +183,14 @@ class TboForwardBatchPreparer:
extend_seq_lens
=
batch
.
extend_seq_lens_cpu
,
)
if
_tbo_debug
:
logger
.
info
(
f
"TboForwardBatchPreparer.prepare "
f
"tbo_split_seq_index=
{
batch
.
tbo_split_seq_index
}
"
f
"tbo_split_token_index=
{
tbo_split_token_index
}
"
f
"extend_seq_lens=
{
batch
.
extend_seq_lens_cpu
}
"
)
assert
isinstance
(
batch
.
attn_backend
,
TboAttnBackend
)
attn_backend_child_a
,
attn_backend_child_b
=
batch
.
attn_backend
.
children
...
...
python/sglang/srt/utils.py
View file @
93e53f6e
...
...
@@ -44,6 +44,7 @@ from functools import lru_cache
from
importlib.metadata
import
PackageNotFoundError
,
version
from
importlib.util
import
find_spec
from
io
import
BytesIO
from
json
import
JSONDecodeError
from
multiprocessing.reduction
import
ForkingPickler
from
pathlib
import
Path
from
typing
import
(
...
...
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