rich7421 commited on
Commit
1f67815
·
verified ·
1 Parent(s): a99c4e5

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -58,3 +58,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ profiles/perf_compile.nsys-rep filter=lfs diff=lfs merge=lfs -text
62
+ profiles/perf.sqlite filter=lfs diff=lfs merge=lfs -text
63
+ profiles/perf.nsys-rep filter=lfs diff=lfs merge=lfs -text
64
+ profiles/perf_compile.sqlite filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ tags:
4
+ - profiling
5
+ - nsight-systems
6
+ - pytorch
7
+ - video-generation
8
+ - sequence-parallelism
9
+ pretty_name: fastvideo nsys profile — Wan2.1-T2V-1.3B on 4× L40S (PCIe Gen4, no NVLink)
10
+ size_categories:
11
+ - 1B<n<10B
12
+ ---
13
+
14
+ # fastvideo / Wan2.1-T2V-1.3B — nsys profiles on 4× L40S (no NVLink)
15
+
16
+ This dataset hosts NVIDIA Nsight Systems profiles of [fastvideo](https://github.com/hao-ai-lab/FastVideo) running `Wan-AI/Wan2.1-T2V-1.3B-Diffusers` text-to-video inference on a 4× L40S node (PCIe Gen4 x16, no NVLink), plus the static plots and measurement summary used to discuss the trace.
17
+
18
+ The trace shows a **bandwidth-bound, same-stream-serialized** workload: compute kernels and NCCL `SendRecv` collectives share a single CUDA stream, so there is no compute/comm overlap to exploit — every NCCL byte directly inflates forward time.
19
+
20
+ ## Contents
21
+
22
+ ```
23
+ profiles/
24
+ perf.nsys-rep (605 MB) — non-compile baseline
25
+ perf.sqlite (2.1 GB) — non-compile baseline, exported
26
+ perf_compile.nsys-rep (506 MB) — torch.compile enabled
27
+ perf_compile.sqlite (1.8 GB) — torch.compile enabled, exported
28
+
29
+ plots/
30
+ 1_iter_duration_over_time.png — per-iter latency vs wall time (warmup shaded)
31
+ 2_iter_duration_histogram.png — steady-state distribution (σ = 21 ms / 0.66 %)
32
+ 3_stream7_one_iter.png — stream-7 timeline showing compute / NCCL alternation
33
+ 4_per_device_walltime.png — 47 % compute / 34 % NCCL / 18 % idle per GPU
34
+ 5_nccl_kernel_duration_hist.png — bimodal at 13 ms / 33 ms (two AllToAll4D sizes)
35
+ README.md — mentor-question Q&A walkthrough
36
+
37
+ analysis_measurements.md — raw §1–§9 measurements from perf_compile.sqlite
38
+ ```
39
+
40
+ ## Headline numbers (perf_compile.sqlite, full 677 s span, device 0)
41
+
42
+ | Metric | Value |
43
+ | --- | --- |
44
+ | `compute_only_ms` | 311 516 ms (46.0 %) |
45
+ | `nccl_only_ms` | 271 564 ms (40.1 %) |
46
+ | `idle_ms` | 94 265 ms (13.9 %) |
47
+ | `overlap_ms` | **0.02 ms (0.0 %)** |
48
+ | `same_stream_compute_pct` | 100 % on stream 7 |
49
+ | `same_stream_nccl_pct` | 100 % on stream 7 |
50
+ | Total NCCL payload | 8 936 GiB |
51
+ | NCCL message p50 / p99 | 13.18 / 39.55 MiB |
52
+ | Slowest iter | iter 311 / 3 087 ms (compile); iter 321 / 3 292 ms (no-compile) |
53
+ | Steady-state σ | 17.7 ms (compile) / 21.2 ms (no-compile) |
54
+
55
+ ## How to reproduce the measurements
56
+
57
+ ```bash
58
+ pip install nsys-ai
59
+
60
+ # Health + topology + bandwidth ceiling
61
+ nsys-ai analyze profile_health_manifest perf_compile.sqlite
62
+ nsys-ai analyze overlap_breakdown perf_compile.sqlite
63
+ nsys-ai analyze nccl_payload_breakdown perf_compile.sqlite
64
+ nsys-ai analyze iteration_timing perf_compile.sqlite
65
+ nsys-ai analyze nvtx_layer_breakdown perf_compile.sqlite
66
+
67
+ # Or just open the timeline in the browser
68
+ nsys-ai timeline-web perf_compile.sqlite
69
+ ```
70
+
71
+ The plots in `plots/` were generated from `perf.sqlite` via a matplotlib script that queries the parquet cache `nsys-ai` builds on first load (no LLM, no API).
72
+
73
+ ## Hardware / software
74
+
75
+ - 4× NVIDIA L40S, PCIe Gen4 x16, no NVLink (intra-node bus only)
76
+ - NCCL aggregate bus BW ≈ 24 GB/s (2 channels × 12 GB/s) measured during the same session
77
+ - PyTorch + fastvideo, Ulysses-style sequence parallelism (`all_to_all_4D` scatter=2/gather=1 pre-attn, scatter=1/gather=2 post-attn)
78
+ - Two passes per denoising step (CFG cond + uncond) — 90 denoising steps × 2 = 180 real forwards
79
+
80
+ ## License
81
+
82
+ Profile traces and derived artifacts are released under CC-BY-4.0.
analysis_measurements.md ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 1. Profile-level row counts (direct SQL)
2
+
3
+ ```
4
+ NVTX_EVENTS 10,457,403
5
+ CUPTI_ACTIVITY_KIND_KERNEL 1,079,198
6
+ CUPTI_ACTIVITY_KIND_RUNTIME 7,165,943
7
+ CUPTI_ACTIVITY_KIND_MEMCPY 663,807
8
+ CUPTI_ACTIVITY_KIND_SYNCHRONIZATION 2,737,429
9
+ CUPTI_ACTIVITY_KIND_OVERHEAD 188,445
10
+ NVTX_PAYLOAD_SCHEMAS 24 rows (6 distinct schemaId)
11
+ NVTX_PAYLOAD_SCHEMA_ENTRIES 68 rows
12
+ NVTX_EVENTS.binaryData 346,400 non-null
13
+ StringIds 7,989,142
14
+ ```
15
+
16
+ Kernel-table span: `MIN(start) → MAX(end)` = 677,543 ms (677.5 s wall).
17
+
18
+ Distinct deviceIds in `CUPTI_ACTIVITY_KIND_KERNEL`: `[0, 1, 2, 3]`.
19
+
20
+ ---
21
+
22
+ ## 2. `profile_health_manifest`
23
+
24
+ ```json
25
+ gpu: "unknown"
26
+ fingerprint: {
27
+ framework: "DeepSpeed",
28
+ distributed: true, // PR #127 fallback fired (kernel-table distinct deviceIds > 1)
29
+ multi_node: false,
30
+ nic_summary: "",
31
+ precision_notes: []
32
+ }
33
+ data_quality.auto_trim: {
34
+ applied: true,
35
+ trim_start_ns: 394,791,526,439,
36
+ trim_end_ns: 414,791,526,439,
37
+ window_ms: 20,000.0,
38
+ profile_full_span_ms: 677,543.7
39
+ }
40
+ data_quality.overhead_pct: 28.6
41
+ nvtx: {
42
+ has_nvtx: true,
43
+ iteration_count: 16, // manifest's own detection
44
+ median_iter_ms: 2.3,
45
+ slowest_iter_ms: 2,944.2,
46
+ top_regions: [
47
+ { name: "aten::to, op_id=1298527", total_ms: 2,310.5, count: 2 },
48
+ { name: "aten::_to_copy, op_id=1298528", total_ms: 2,310.5, count: 1 },
49
+ { name: "aten::copy_, op_id=1298530", total_ms: 2,310.5, count: 1 },
50
+ { name: "aten::to, op_id=1298528", total_ms: 2,310.3, count: 1 },
51
+ { name: "aten::_to_copy, op_id=1298529", total_ms: 2,310.3, count: 1 },
52
+ ]
53
+ }
54
+ suspected_bottleneck: "High CPU Synchronization Blocking (37.0% of span)"
55
+ ```
56
+
57
+ **All fields above describe the auto-trimmed 20-second window, not the full
58
+ 677.5-second profile.** Numbers below for `overlap_breakdown`, `sync_cost_analysis`,
59
+ and `nccl_payload_breakdown` cover the full profile.
60
+
61
+ ---
62
+
63
+ ## 3. `overlap_breakdown` (device 0, full profile)
64
+
65
+ ```
66
+ total_ms 677,344.6
67
+ compute_only_ms 311,515.7 (46.0 %)
68
+ nccl_only_ms 271,563.8 (40.1 %)
69
+ overlap_ms 0.02 ( 0.0 %)
70
+ idle_ms 94,265.1 (13.9 %)
71
+ sync_ms 214,805.6
72
+ compute_kernels 258,818
73
+ nccl_kernels 10,985
74
+ span_start_ns 39,565,504,542
75
+ span_end_ns 716,910,057,111
76
+
77
+ same_stream_diagnosis ["7"]
78
+ same_stream_compute_pct 100.0 // PR #127 addition
79
+ same_stream_nccl_pct 100.0 // PR #127 addition
80
+ present_devices [0, 1, 2, 3] // PR #127 addition
81
+ device_id 0
82
+ ```
83
+
84
+ ### 3a. Per-device kernel/stream layout (direct SQL across all 4 ranks)
85
+
86
+ ```
87
+ dev=0 stream=7 compute n=258,818 total=311,515.7 ms
88
+ nccl n= 10,985 total=271,563.8 ms
89
+ dev=1 stream=17 compute n=258,816 total=315,914.0 ms
90
+ nccl n= 10,985 total=267,733.3 ms
91
+ dev=2 stream=17 compute n=258,810 total=314,592.1 ms
92
+ nccl n= 10,985 total=268,910.4 ms
93
+ dev=3 stream=17 compute n=258,814 total=314,679.5 ms
94
+ nccl n= 10,985 total=268,502.0 ms
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 4. `sync_cost_analysis` (full profile)
100
+
101
+ ```
102
+ profile_span_ms 677,543.7
103
+ total_sync_wall_ms 214,805.6
104
+ sync_density_pct 31.7
105
+
106
+ sync_by_type_ms:
107
+ STREAM_SYNCHRONIZE 211,502.5
108
+ EVENT_SYNCHRONIZE 2,673.0
109
+ CONTEXT_SYNCHRONIZE 738.5
110
+ STREAM_WAIT_EVENT 157.1
111
+ ```
112
+
113
+ ---
114
+
115
+ ## 5. `memory_transfers` (full profile, summed across all devices)
116
+
117
+ ```
118
+ copyKind=1 H2D count=597,708 bytes=2,764,132 MB total_ms=324,398.0
119
+ copyKind=2 D2H count= 5,639 bytes= 108,113 MB total_ms= 70,941.1
120
+ copyKind=8 D2D count= 60,460 bytes=5,058,436 MB total_ms= 13,293.0
121
+ ```
122
+
123
+ ### 5a. Per-device breakdown (direct SQL `GROUP BY deviceId, copyKind`)
124
+
125
+ ```
126
+ dev=0 H2D 149,427 calls 659,021 MB 87,205.4 ms
127
+ D2H 1,412 calls 27,603 MB 18,047.6 ms
128
+ D2D 15,118 calls 1,206,183 MB 3,319.7 ms
129
+ dev=1 H2D 149,427 calls 659,021 MB 87,485.3 ms
130
+ D2H 1,409 calls 25,167 MB 17,570.1 ms
131
+ D2D 15,115 calls 1,206,025 MB 3,325.1 ms
132
+ dev=2 H2D 149,427 calls 659,021 MB 74,761.9 ms
133
+ D2H 1,409 calls 25,167 MB 17,666.5 ms
134
+ D2D 15,113 calls 1,205,920 MB 3,323.7 ms
135
+ dev=3 H2D 149,427 calls 659,021 MB 74,945.4 ms
136
+ D2H 1,409 calls 25,167 MB 17,656.9 ms
137
+ D2D 15,114 calls 1,205,972 MB 3,324.5 ms
138
+ ```
139
+
140
+ ---
141
+
142
+ ## 6. `nccl_payload_breakdown` (PR #128, full profile)
143
+
144
+ ```
145
+ total_payload_events 346,400
146
+ message_carrying_events 346,388
147
+ skipped_events 0
148
+ total_bytes_all 9,594,962,460,672 // 8,936.01 GiB
149
+ distinct_schemas 6
150
+ ```
151
+
152
+ | schema_id | category | calls | distinct_communicators | msg p50 | msg p99 | msg max | bytes total |
153
+ |---|---|---:|---:|---:|---:|---:|---:|
154
+ | 16777218 | init | 4 | 1 | — | — | — | — |
155
+ | 16777220 | collective | 724 | 1 | 52.73 MiB | 52.73 MiB | 52.73 MiB | 37.08 GiB |
156
+ | 16777225 | p2p | 172,832 | 1 | 13.18 MiB | 39.55 MiB | 39.55 MiB | 4,449.46 GiB |
157
+ | 16777226 | p2p | 172,832 | 1 | 13.18 MiB | 39.55 MiB | 39.55 MiB | 4,449.46 GiB |
158
+ | 16777227 | init | 4 | 1 | — | — | — | — |
159
+ | 16777230 | group_marker | 4 | 1 | — | — | — | — |
160
+
161
+ ### 6a. Schema field layouts (from `NVTX_PAYLOAD_SCHEMA_ENTRIES`)
162
+
163
+ ```
164
+ 16777218 (init, 24B): NCCL communicator ID, No. of ranks, Rank, CUDA device
165
+ 16777220 (collective, 16B): NCCL communicator ID, Message size [bytes]
166
+ 16777225 (p2p, 24B): NCCL communicator ID, Message size [bytes], Peer rank
167
+ 16777226 (p2p, 24B): NCCL communicator ID, Message size [bytes], Peer rank
168
+ 16777227 (init, 24B): NCCL communicator ID, No. of ranks, Rank, CUDA device
169
+ 16777230 (group_marker, 8B): NCCL communicator ID
170
+ ```
171
+
172
+ ---
173
+
174
+ ## 7. `iteration_timing` (full profile)
175
+
176
+ ```
177
+ total rows returned 984
178
+ rows with duration_ms > 1,000 180
179
+ median (over 180 rows) 2,933.3 ms
180
+ mean (over 180 rows) 2,936.7 ms
181
+ sum (over 180 rows) 528,610 ms (=528.6 s)
182
+ ```
183
+
184
+ ### 7a. Top 5 iterations by `duration_ms`
185
+
186
+ ```
187
+ iter=311 dur=3,087.4 ms kernels=1,172 compute=3,071.8 ms nccl_count=59 text=heuristic_step_311
188
+ iter=316 dur=2,991.4 ms kernels=1,234 compute=2,975.1 ms nccl_count=61 text=heuristic_step_316
189
+ iter=321 dur=2,985.8 ms kernels=1,212 compute=2,971.9 ms nccl_count=61 text=heuristic_step_321
190
+ iter=364 dur=2,983.1 ms kernels=1,234 compute=2,966.8 ms nccl_count=61 text=heuristic_step_364
191
+ iter=313 dur=2,981.9 ms kernels=1,238 compute=2,965.5 ms nccl_count=61 text=heuristic_step_313
192
+ ```
193
+
194
+ `text` prefix `heuristic_step_*` indicates the labels are synthesized by
195
+ `iteration_timing`'s kernel-gap detection heuristic, not present in the raw
196
+ NVTX_EVENTS (verified by `SELECT COUNT(*) FROM NVTX_EVENTS WHERE text LIKE 'heuristic_step%'` = 0).
197
+
198
+ ### 7b. `iteration_detail` on iter=311
199
+
200
+ ```
201
+ duration_ms 3,087.35
202
+ gpu_start_ns 109,428,571,984
203
+ gpu_end_ns 112,515,921,387
204
+ kernel_count 1,172
205
+ nccl_count 59
206
+ compute_ms 3,071.77
207
+ median_ms 0.79 // median of all 984 iteration_timing rows
208
+ vs_median +390,703.8 %
209
+ top_kernels:
210
+ ncclDevKernel_SendRecv 1,616.75 ms × 58 (54.7 %)
211
+ flash_fwd 920.48 ms × 58 (31.1 %)
212
+ cutlass_80_tensorop_bf16_s16816gemm 122.29 ms × 203 ( 4.1 %)
213
+ cutlass_80_tensorop_bf16_s16816gemm 56.86 ms × 29 ( 1.9 %)
214
+ at::elementwise_kernel 56.77 ms × 58 ( 1.9 %)
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 8. `top_kernels` (full profile, top 10 by total_ms)
220
+
221
+ ```
222
+ ncclDevKernel_SendRecv total_ms=1,051,241.5 inv=43,208 avg=24.33 tc=false
223
+ void flash::flash_fwd_kernel<...,(int)128,(int)128,(int)32...> 648,214.3 inv=43,200 avg=15.00 tc=true
224
+ void cutlass::Kernel2<cutlass_80_tensorop_bf16_s16816gemm_relu_bf16_256x128_32x3...> 95,138.0 inv=151,200 avg=0.63 tc=true
225
+ void at::native::elementwise_kernel<(int)128, (int)2, ...> 81,499.8 inv=77,100 avg=1.06 tc=false
226
+ sm86_xmma_fprop_implicit_gemm_tf32f32_tf32f32_f32_nhwckrsc_nchw_tilesize128x128x... 64,636.5 inv=7,200 avg=8.98 tc=true
227
+ void at::native::elementwise_kernel 45,290.6 inv=53,832 avg=0.84 tc=false
228
+ void cutlass::Kernel2<cutlass_80_tensorop_bf16_s16816gemm_relu_bf16_128x256_32x3...> 44,807.9 inv=21,600 avg=2.07 tc=true
229
+ void at::native::elementwise_kernel 29,725.7 inv=109,464 avg=0.27 tc=false
230
+ void cudnn::engines_precompiled::nchwToNhwcKernel 27,721.9 inv=16,752 avg=1.65 tc=false
231
+ void at::native::vectorized_elementwise_kernel 27,692.3 inv=29,124 avg=0.95 tc=false
232
+ ```
233
+
234
+ `total_ms` values are summed across all 4 device IDs (skill currently does not
235
+ expose per-device totals); per-rank averages = total ÷ 4.
236
+
237
+ ---
238
+
239
+ ## 9. `nvtx_layer_breakdown` (top 8 regions by total_gpu_ms)
240
+
241
+ ```
242
+ detection_method numbered_pattern
243
+ layer_depth 1
244
+ layer_count 673
245
+ confidence 1.0
246
+
247
+ total_gpu_ms kernels nccl% tc% nvtx_path (truncated to 65 chars)
248
+ 4,645.6 24,473 10.7 100.0 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=74092
249
+ 685.0 51 91.9 100.0 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=90955
250
+ 600.7 192 0.0 100.0 stage::DenoisingStage > aten::nonzero, op_id=1728365
251
+ 434.8 55 78.9 100.0 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=90929
252
+ 405.3 101 14.9 100.0 stage::DenoisingStage > aten::to, op_id=1613263
253
+ 354.8 113 14.2 100.0 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=908401
254
+ 339.5 112 14.1 100.0 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=907210
255
+ 333.2 107 13.8 91.9 stage::DenoisingStage > Torch-Compiled Region: 0/0, op_id=1722730
256
+ ```
257
+
258
+ ---
259
+
plots/1_iter_duration_over_time.png ADDED

Git LFS Details

  • SHA256: e947165b3ce5371a2c9abdbcb2828f77724b5320c17e6e9ddadfbcbf060fe854
  • Pointer size: 130 Bytes
  • Size of remote file: 95.6 kB
plots/2_iter_duration_histogram.png ADDED

Git LFS Details

  • SHA256: 0efa097b7bb707ebd6d4111bfe66e801b5a12a914f854a00082149360cf1b729
  • Pointer size: 130 Bytes
  • Size of remote file: 53.5 kB
plots/3_stream7_one_iter.png ADDED

Git LFS Details

  • SHA256: 24e55338590a6e16ab781109059cb33001616b6af5cdf7c092301fbe7d1c5c69
  • Pointer size: 130 Bytes
  • Size of remote file: 65.7 kB
plots/4_per_device_walltime.png ADDED

Git LFS Details

  • SHA256: 4882b5738c5e8655171caf4bd72f4f34b2f3a5dfa3cb4103a86007f062577644
  • Pointer size: 130 Bytes
  • Size of remote file: 60 kB
plots/5_nccl_kernel_duration_hist.png ADDED

Git LFS Details

  • SHA256: 32e944a35a9798d0416e1a08a95be2ab3660fbbce4af9cb74e59125962aa0ba8
  • Pointer size: 130 Bytes
  • Size of remote file: 66.6 kB
plots/README.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Mentor Q&A — fastvideo perf.sqlite (4× L40S, no NVLink)
2
+
3
+ Profile: `/home/rich-wsl/fastvideo/profile_results/perf.sqlite` — 2.04 GiB, 778 s GPU span.
4
+ Generated 2026-05-16 from nsys-ai cached parquets.
5
+
6
+ ## Q1. Can we see the nsys profile / graphs?
7
+
8
+ Yes — these 5 PNGs are static views of the profile. The full interactive timeline is also available via `nsys-ai timeline-web` (browser-based) if you want to scrub around. For the SSH-tunnel-free version, these screenshots cover the headline findings.
9
+
10
+ ## Q2. Which iter is the slowest?
11
+
12
+ **iter 321 — 3,292 ms — at t ≈ 143.7 s** (see Plot 1, red star).
13
+
14
+ It is +2.1 % over the median 3,224 ms. Looks like JIT warm-tail rather than a runtime stall.
15
+
16
+ ## Q3. Make sure it's not warm-up phase
17
+
18
+ Confirmed it isn't.
19
+
20
+ - Real denoising span: **t = 133 s → 793 s** (180 iters, blue cloud in Plot 1).
21
+ - Pre-denoise (TextEncoder + VAE encode/decode): t = 0 → 133 s (orange band in Plot 1).
22
+ - iter 321 sits ~10 s **after** real denoising begins → it is the first steady-state iter, hot-cache.
23
+ - σ = 21.2 ms across 180 iters (0.66 % of median) — distribution is extremely tight (Plot 2). No straggler outliers.
24
+
25
+ ## What the plots show
26
+
27
+ | File | What it shows |
28
+ | --- | --- |
29
+ | `1_iter_duration_over_time.png` | All 180 iters as scatter vs wall time. Warm-up phase shaded. Slowest iter starred. |
30
+ | `2_iter_duration_histogram.png` | Steady-state iter distribution. σ = 21.2 ms, ~Gaussian. |
31
+ | `3_stream7_one_iter.png` | Stream 7 timeline for the slowest iter, full + 200 ms zoom. **Blue (compute) and red (NCCL) strictly alternate on the same stream — no overlap possible.** |
32
+ | `4_per_device_walltime.png` | Per-GPU wall-time stack: 47 % compute / 34 % NCCL / 18 % idle on every device. **Load is balanced — no single-GPU bottleneck.** |
33
+ | `5_nccl_kernel_duration_hist.png` | NCCL kernel duration histogram. Two peaks at ~13 ms and ~33 ms → the two AllToAll4D message sizes (13 MiB pre-attn scatter, 40 MiB post-attn gather). |
34
+
35
+ ## Headline conclusion (already in report §1–§9)
36
+
37
+ GPU 0..3 are all spending **34 % of wall time inside NCCL kernels** that are **serialized with compute on the same stream**. Compute/NCCL overlap is structurally 0 % (Plot 3 zoom). The 18 % idle is host-side launch + sync gap, not network. PCIe Gen4 × no NVLink × 4 ranks is the upstream cause; the two land-able levers are (a) TGATE (token-gate CFG-skip, landed at −22 %) and (b) CFG batching (predicted −8…−15 %).
profiles/perf.nsys-rep ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46e24860eb6d98a9f504af3050401ab4f53632184827df27540232565f491bee
3
+ size 633737449
profiles/perf.sqlite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b81a2b1282256ff5356903a8bb27a9c57ca21db81b52d6f841ea8883d6616a07
3
+ size 2189783040
profiles/perf_compile.nsys-rep ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c012ba07b26054197dffeeeb2195f73765f65e58b8b6006cb5ea6f0eccecac2d
3
+ size 530098795
profiles/perf_compile.sqlite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec5a19dee22de14296aa6195e818d0e888df216d715ee7e2cd362489d4fa1f06
3
+ size 1882554368