[diffusion] profiling: simplify --perf-dump-path JSON output (remove duplicate denoise steps) (#15537)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot]
parent
26704c23c0
commit
42bff706df
@@ -67,6 +67,8 @@ Besides profiler traces, you can also dump a lightweight JSON report that contai
|
|||||||
|
|
||||||
This is useful to quickly identify which stage dominates end-to-end latency, and whether denoising steps have uniform runtimes (and if not, which step has an abnormal spike).
|
This is useful to quickly identify which stage dominates end-to-end latency, and whether denoising steps have uniform runtimes (and if not, which step has an abnormal spike).
|
||||||
|
|
||||||
|
The dumped JSON contains a `denoise_steps_ms` field formatted as an array of objects, each with a `step` key (the step index) and a `duration_ms` key.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -207,10 +207,9 @@ class PerformanceLogger:
|
|||||||
for name, duration_ms in timings.stages.items()
|
for name, duration_ms in timings.stages.items()
|
||||||
]
|
]
|
||||||
|
|
||||||
denoise_steps_ms = list(timings.steps)
|
denoise_steps_ms = [
|
||||||
denoise_steps = [
|
{"step": idx, "duration_ms": duration_ms}
|
||||||
{"index": idx, "duration_ms": duration_ms}
|
for idx, duration_ms in enumerate(timings.steps)
|
||||||
for idx, duration_ms in enumerate(denoise_steps_ms)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
report = {
|
report = {
|
||||||
@@ -221,7 +220,6 @@ class PerformanceLogger:
|
|||||||
"total_duration_ms": timings.total_duration_ms,
|
"total_duration_ms": timings.total_duration_ms,
|
||||||
"steps": formatted_steps,
|
"steps": formatted_steps,
|
||||||
"denoise_steps_ms": denoise_steps_ms,
|
"denoise_steps_ms": denoise_steps_ms,
|
||||||
"denoise_steps": denoise_steps,
|
|
||||||
"meta": meta or {},
|
"meta": meta or {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user