Unverified Commit fd7a72d6 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Super tiny allow profile activities in bench_serving (#12549)

parent 21a8fa16
......@@ -615,7 +615,10 @@ async def async_request_profile(api_url: str) -> RequestFuncOutput:
async with _create_bench_client_session() as session:
output = RequestFuncOutput()
try:
async with session.post(url=api_url) as response:
body = {
"activities": getattr(args, "profile_activities", []),
}
async with session.post(url=api_url, json=body) as response:
if response.status == 200:
output.success = True
else:
......@@ -2527,6 +2530,14 @@ if __name__ == "__main__":
help="Use Torch Profiler. The endpoint must be launched with "
"SGLANG_TORCH_PROFILER_DIR to enable profiler.",
)
# TODO unify all these
parser.add_argument(
"--profile-activities",
type=str,
nargs="+",
default=["CPU", "GPU"],
choices=["CPU", "GPU", "CUDA_PROFILER"],
)
parser.add_argument(
"--lora-name",
type=str,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment