Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable profiling for AMD perf tests (keep profiling for NVIDIA)
  • Loading branch information
michaelzhang-ai committed Feb 2, 2026
commit 146e657f84ce8c8cd85bff22fa53af528c91e684
20 changes: 16 additions & 4 deletions python/sglang/test/nightly_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def build_benchmark_command(
json_output_file: str,
extra_args: Optional[List[str]] = None,
server_args: Optional[List[str]] = None,
enable_profile: bool = True,
) -> List[str]:
"""Build the benchmark command with all required arguments.

Expand All @@ -106,6 +107,7 @@ def build_benchmark_command(
json_output_file: Path to JSON output file
extra_args: Optional extra arguments to append to command
server_args: Optional server launch arguments to record in metrics
enable_profile: Whether to enable profiling (default True for NVIDIA)

Returns:
List of command arguments ready for subprocess.run()
Expand All @@ -125,15 +127,22 @@ def build_benchmark_command(
"--output-len",
*[str(x) for x in output_lens],
"--show-report",
"--profile",
"--profile-by-stage",
"--profile-output-dir",
profile_path_prefix,
f"--pydantic-result-filename={json_output_file}",
"--no-append-to-github-summary",
"--trust-remote-code",
]

# Add profiling flags only if enabled (disabled for AMD tests)
if enable_profile and profile_path_prefix:
command.extend(
[
"--profile",
"--profile-by-stage",
"--profile-output-dir",
profile_path_prefix,
]
)

if extra_args:
command.extend(extra_args)

Expand Down Expand Up @@ -218,6 +227,7 @@ def run_benchmark_for_model(
other_args: Optional[List[str]] = None,
variant: str = "",
extra_bench_args: Optional[List[str]] = None,
enable_profile: bool = True,
) -> Tuple[List[BenchmarkResult], bool, Optional[float]]:
"""Run a complete benchmark for a single model with server management.

Expand All @@ -236,6 +246,7 @@ def run_benchmark_for_model(
other_args: Arguments to pass to server launch
variant: Optional variant suffix (e.g., "basic", "mtp")
extra_bench_args: Extra arguments for the benchmark command
enable_profile: Whether to enable profiling (default True for NVIDIA)

Returns:
Tuple of (list of BenchmarkResult objects, success_bool, avg_spec_accept_length or None)
Expand Down Expand Up @@ -273,6 +284,7 @@ def run_benchmark_for_model(
json_output_file,
extra_args=bench_args,
server_args=other_args,
enable_profile=enable_profile,
)

result, cmd_success = self.run_benchmark_command(command, model_description)
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_deepseek_v31_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def test_bench_one_batch(self):
other_args=variant_config["other_args"],
variant=variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def test_bench_one_batch(self):
other_args=self.variant_config["other_args"],
variant=self.variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def test_bench_one_batch(self):
other_args=self.variant_config["other_args"],
variant=self.variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_deepseek_v3_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def test_bench_one_batch(self):
other_args=variant_config["other_args"],
variant=variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_grok1_fp8_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_bench_grok1_fp8(self):
other_args=self.model_config["other_args"],
variant=self.model_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_grok1_int4_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def test_bench_grok1_int4(self):
other_args=self.model_config["other_args"],
variant=self.model_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_grok2_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def test_bench_grok2(self):
other_args=self.model_config["other_args"],
variant=self.model_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def test_bench_one_batch(self):
input_lens=self.input_lens,
output_lens=self.output_lens,
other_args=other_args,
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi30x/test_vlms_perf_amd.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_bench_one_batch(self):
output_lens=self.output_lens,
other_args=other_args,
extra_bench_args=extra_bench_args,
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_bench_one_batch(self):
other_args=variant_config["other_args"],
variant=variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def test_bench_one_batch(self):
other_args=self.variant_config["other_args"],
variant=self.variant_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def _run_benchmark_with_timeout(
profile_path_prefix,
json_output_file,
extra_args=bench_args,
enable_profile=False, # Disable profiling for AMD tests
)
_, cmd_success = runner.run_benchmark_command(command, model_description)
if not cmd_success:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_grok1_int4_perf(self):
other_args=self.model_config["other_args"],
variant=self.model_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down
1 change: 1 addition & 0 deletions test/registered/amd/perf/mi35x/test_grok2_perf_mi35x.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_grok2_perf(self):
other_args=self.model_config["other_args"],
variant=self.model_config["name"],
extra_bench_args=["--trust-remote-code"],
enable_profile=False, # Disable profiling for AMD tests
)
results = result_tuple[0]
success = result_tuple[1]
Expand Down