Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions Magpie/modes/benchmark/tracelens_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
logger = logging.getLogger(__name__)

BACKUP_SUFFIX = ".tracelens.bak"
CLI_SPLIT_INFERENCE_TRACE = "TraceLens_split_inference_trace"
CLI_SPLIT_TRACE = "TraceLens_split_trace"
CLI_INFERENCE_REPORT = "TraceLens_generate_perf_report_pytorch_inference"
ATOM_MARK_TRACE_FLAG = "--mark-trace"
SGLANG_PROFILE_CUDA_GRAPH_FLAG = "--enable-profile-cuda-graph"
Expand Down Expand Up @@ -448,7 +448,7 @@ def analyze(

missing_cli = [
name
for name in (CLI_SPLIT_INFERENCE_TRACE, CLI_INFERENCE_REPORT)
for name in (CLI_SPLIT_TRACE, CLI_INFERENCE_REPORT)
if shutil.which(name) is None
]
if missing_cli:
Expand Down Expand Up @@ -882,7 +882,7 @@ def _run_splitter(self, rank0_trace: Path, split_dir: Path) -> Optional[str]:
envs = self.config.envs
split_dir.mkdir(parents=True, exist_ok=True)
cmd = [
CLI_SPLIT_INFERENCE_TRACE,
CLI_SPLIT_TRACE,
str(rank0_trace),
"-o",
str(split_dir),
Expand Down Expand Up @@ -919,7 +919,7 @@ def _run_splitter_in_container(
envs = self.config.envs
split_dir.mkdir(parents=True, exist_ok=True)
cmd = [
CLI_SPLIT_INFERENCE_TRACE,
CLI_SPLIT_TRACE,
self._container_path(rank0_trace, workspace),
"-o",
self._container_path(split_dir, workspace),
Expand Down Expand Up @@ -1809,7 +1809,7 @@ def is_tracelens_inference_enabled(config: BenchmarkConfig) -> bool:
__all__ = [
"ATOM_MARK_TRACE_FLAG",
"CLI_INFERENCE_REPORT",
"CLI_SPLIT_INFERENCE_TRACE",
"CLI_SPLIT_TRACE",
"InferencePhasePick",
"SGLANG_PROFILE_CUDA_GRAPH_FLAG",
"SGLANG_SHAPE_DISCOVERY_FLAG",
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/benchmarking/profiling-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ TraceLens provides automated analysis of torch profiler traces:

| Command | Description | Output |
|---------|-------------|--------|
| `TraceLens_`<br>`split_`<br>`inference`<br>`_trace` | Split vLLM/SGLang inference traces into phase windows | `torch_trace/trace_split/` |
| `TraceLens_`<br>`split_trace` | Split vLLM/SGLang inference traces into phase windows | `torch_trace/trace_split/` |
| `TraceLens_`<br>`generate_perf`<br>`_report_pytorch`<br>`_inference` | Inference-aware prefill/decode reports and compact roofline summaries | `tracelens/` |
| `TraceLens_`<br>`generate_perf`<br>`_report_pytorch` | Single-rank performance report | `tracelens_rank0_csvs/` |
| `TraceLens_`<br>`generate_multi`<br>`_rank_collective`<br>`_report_pytorch` | Multi-rank collective analysis | `tracelens_collective_csvs/` |
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmarks/benchmark_vllm_tracelens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ benchmark:

# TraceLens trace analysis - generates reports from torch traces
# Commands:
# - TraceLens_split_inference_trace
# - TraceLens_split_trace
# - TraceLens_generate_perf_report_pytorch_inference
# Set analysis_mode: pytorch for the legacy direct PyTorch report flow.
tracelens:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_benchmark_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ def test_tracelens_inference_analysis_runs_in_cpu_only_container(
def fake_run(cmd, **_kwargs):
docker_cmds.append(cmd)
bash_cmd = cmd[-1]
if "TraceLens_split_inference_trace" in bash_cmd:
if "TraceLens_split_trace" in bash_cmd:
split_dir = torch_trace_dir / "trace_split"
split_dir.mkdir(parents=True, exist_ok=True)
decode_trace = split_dir / "decode.trace.json.gz"
Expand Down
Loading