-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Torch Profiling with DeepEP PD Disaggregation #5462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
liz-badada
wants to merge
11
commits into
sgl-project:main
from
liz-badada:PD_Dissaggregation_Torch_Profiling
Closed
Torch Profiling with DeepEP PD Disaggregation #5462
liz-badada
wants to merge
11
commits into
sgl-project:main
from
liz-badada:PD_Dissaggregation_Torch_Profiling
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
LGTM |
Contributor
|
please fix the lint |
ch-wan
reviewed
May 7, 2025
| self.decode_servers = decode_servers | ||
| self.profiling = False | ||
|
|
||
| profile_dir = os.getenv("SGLANG_TORCH_PROFILER_DIR", "./tmp") |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is changing the output directory necessary?
ch-wan
reviewed
May 7, 2025
| self.profiling = False | ||
|
|
||
| profile_dir = os.getenv("SGLANG_TORCH_PROFILER_DIR", "./tmp") | ||
| os.makedirs(profile_dir, exist_ok=True) |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating profile_dir is not the job of lb.
This was referenced May 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Support torch profiling when enable SGLang PD Disaggregation. Will Generate prefill & decode profile separately.
Test based on #5435
Modifications
Add start_profile / stop_profile request to mini_lb.py
Examples (TP16 + DP16 Attn + DeepEP on H100)
Prepare ./pd_node*.json first.
Server
Proxy
Bench with Profiling
SGLANG_TORCH_PROFILER_DIR=./profile_log python -m sglang.bench_serving --backend sglang --model ~/.cache/huggingface/hub/models--chwan--DeepSeek-V3-5layer/snapshots/38a0c0ee55158e7d2ac9a6af1de94c4dfe084872/ --host 127.0.0.1 --port 8000 --num-prompts 20 --dataset-name random --random-input-len 1000 --random-output-len 4 --profileevent_loop_normal_disagg_prefill

event_loop_normal_disagg_decode

Note
Known bug from PyTroch Profiler UTF-8 decode: pytorch/pytorch#64345
Checklist