Spaces:
Sleeping
Sleeping
File size: 27,351 Bytes
490d677 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | {
"findings": [
{
"evidence": [
"Top kernel `computeKernel` is 42.6% of total kernel time."
],
"recommendation": [
"Focus optimization effort on this kernel first."
],
"severity": "medium",
"title": "Single kernel is a large share of GPU time"
},
{
"evidence": [
"Top sync-like call `cudaStreamSynchronize` total 0.80 ms across 1 calls.",
"All sync-like calls total 1.50 ms."
],
"recommendation": [
"Look for `cudaDeviceSynchronize` / stream waits in your serving loop and remove unnecessary barriers.",
"Prefer async launches and overlap CPU work with GPU execution; avoid per-token synchronization."
],
"severity": "medium",
"title": "CPU\u2194GPU synchronization detected (runtime API)"
}
],
"generated_at": "2026-03-11T03:52:08.704882+00:00",
"metrics": {
"barriers": {
"barriers": [
{
"api_name": "cudaStreamSynchronize",
"avg_duration_us": 800.0,
"barrier_kind": "sync_api",
"count": 1,
"max_duration_us": 800.0,
"total_time_ms": 0.8
},
{
"api_name": "cudaDeviceSynchronize",
"avg_duration_us": 700.0,
"barrier_kind": "sync_api",
"count": 1,
"max_duration_us": 700.0,
"total_time_ms": 0.7
},
{
"api_name": "cudaMemcpy",
"avg_duration_us": 600.0,
"barrier_kind": "blocking_memcpy",
"count": 1,
"max_duration_us": 600.0,
"total_time_ms": 0.6
},
{
"api_name": "cpu_launcher_gap",
"avg_duration_us": 200.0,
"barrier_kind": "cpu_launcher_gap",
"count": 1,
"max_duration_us": 200.0,
"total_time_ms": 0.2
}
],
"barriers_by_pid": [
{
"api_name": "cudaStreamSynchronize",
"avg_duration_us": 800.0,
"barrier_kind": "sync_api",
"count": 1,
"max_duration_us": 800.0,
"pid": 111,
"total_time_ms": 0.8
},
{
"api_name": "cudaMemcpy",
"avg_duration_us": 600.0,
"barrier_kind": "blocking_memcpy",
"count": 1,
"max_duration_us": 600.0,
"pid": 111,
"total_time_ms": 0.6
},
{
"api_name": "cpu_launcher_gap",
"avg_duration_us": 200.0,
"barrier_kind": "cpu_launcher_gap",
"count": 1,
"max_duration_us": 200.0,
"pid": 111,
"total_time_ms": 0.2
},
{
"api_name": "cudaDeviceSynchronize",
"avg_duration_us": 700.0,
"barrier_kind": "sync_api",
"count": 1,
"max_duration_us": 700.0,
"pid": 222,
"total_time_ms": 0.7
}
],
"launcher_gap_threshold_us": 50.0,
"notes": [],
"pids": [
{
"barrier_event_count": 3,
"pid": 111,
"top_barrier": "cudaStreamSynchronize",
"top_barrier_kind": "sync_api",
"total_barrier_time_ms": 1.6
},
{
"barrier_event_count": 1,
"pid": 222,
"top_barrier": "cudaDeviceSynchronize",
"top_barrier_kind": "sync_api",
"total_barrier_time_ms": 0.7
}
],
"present": true,
"sql": {
"runtime_barriers": "SELECT (CAST(r.globalTid / 16777216 AS INT) % 16777216) AS pid, s.value AS api_name, r.start AS start_ns, r.end AS end_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE r.end IS NOT NULL AND r.end > r.start AND (LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ?) ORDER BY pid, start_ns"
}
},
"by_pid": {
"kernels": {
"kernel_table": "CUPTI_ACTIVITY_KIND_KERNEL",
"kernels": [
{
"avg_duration_us": 1000.0,
"call_count": 2,
"device_id": 0,
"kernel_name": "computeKernel",
"pct_of_pid_kernel_time": 50.0,
"pct_of_total_kernel_time": 32.78688524590164,
"pid": 111,
"pid_pct_of_total_kernel_time": 65.57377049180327,
"pid_total_kernel_time_ms": 4.0,
"total_time_ms": 2.0
},
{
"avg_duration_us": 2000.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclAllReduceRingKernel",
"pct_of_pid_kernel_time": 50.0,
"pct_of_total_kernel_time": 32.78688524590164,
"pid": 111,
"pid_pct_of_total_kernel_time": 65.57377049180327,
"pid_total_kernel_time_ms": 4.0,
"total_time_ms": 2.0
},
{
"avg_duration_us": 1500.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclBroadcastRingKernel",
"pct_of_pid_kernel_time": 71.42857142857143,
"pct_of_total_kernel_time": 24.59016393442623,
"pid": 222,
"pid_pct_of_total_kernel_time": 34.42622950819672,
"pid_total_kernel_time_ms": 2.1,
"total_time_ms": 1.5
},
{
"avg_duration_us": 600.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "computeKernel",
"pct_of_pid_kernel_time": 28.57142857142857,
"pct_of_total_kernel_time": 9.836065573770492,
"pid": 222,
"pid_pct_of_total_kernel_time": 34.42622950819672,
"pid_total_kernel_time_ms": 2.1,
"total_time_ms": 0.6
}
],
"notes": [],
"pid_quality": {
"pid0_fraction": 0.0,
"pid0_rows": 0,
"pid_ge_10m_fraction": 0.0,
"pid_ge_10m_rows": 0,
"present": true,
"rows_with_pid": 5
},
"pid_source": "globalPid",
"pids": [
{
"kernel_count": 3,
"pct_of_total_kernel_time": 65.57377049180327,
"pid": 111,
"total_kernel_time_ms": 4.0,
"total_kernel_time_ns": 4000000
},
{
"kernel_count": 2,
"pct_of_total_kernel_time": 34.42622950819672,
"pid": 222,
"total_kernel_time_ms": 2.1,
"total_kernel_time_ns": 2100000
}
],
"present": true,
"sql": {
"kernels": "SELECT (CAST(k.globalPid / 16777216 AS INT) % 16777216) AS pid, s.value AS kernel_name, k.deviceId AS device_id, COUNT(*) AS call_count, SUM(k.end-k.start) AS total_ns, AVG(k.end-k.start) AS avg_ns FROM CUPTI_ACTIVITY_KIND_KERNEL k JOIN StringIds s ON s.id = k.demangledName WHERE ((CAST(k.globalPid / 16777216 AS INT) % 16777216)) IN (?,?) GROUP BY pid, kernel_name, device_id ORDER BY pid, total_ns DESC",
"pid_quality": "SELECT COUNT(*) AS rows_with_pid, SUM(CASE WHEN (CAST(k.globalPid / 16777216 AS INT) % 16777216) = 0 THEN 1 ELSE 0 END) AS pid0_rows, SUM(CASE WHEN (CAST(k.globalPid / 16777216 AS INT) % 16777216) >= 10000000 THEN 1 ELSE 0 END) AS pid_ge_10m_rows FROM CUPTI_ACTIVITY_KIND_KERNEL k WHERE k.globalPid IS NOT NULL",
"top_pids": "SELECT (CAST(k.globalPid / 16777216 AS INT) % 16777216) AS pid, SUM(k.end-k.start) AS total_ns, COUNT(*) AS kernel_count FROM CUPTI_ACTIVITY_KIND_KERNEL k WHERE k.globalPid IS NOT NULL GROUP BY pid ORDER BY total_ns DESC LIMIT ?"
}
},
"nvtx": {
"notes": [
"No NVTX ranges found."
],
"present": false,
"sql": {}
},
"nvtx_kernel_phases": null,
"sync": {
"notes": [],
"pid_source": "globalTid",
"pids": [
{
"pid": 111,
"sync_total_time_ms": 0.8
},
{
"pid": 222,
"sync_total_time_ms": 0.7
}
],
"present": true,
"runtime_table": "CUPTI_ACTIVITY_KIND_RUNTIME",
"sql": {
"sync_by_pid": "SELECT (CAST(r.globalTid / 16777216 AS INT) % 16777216) AS pid, s.value AS api_name, COUNT(*) AS call_count, SUM(r.end-r.start) AS total_ns, AVG(r.end-r.start) AS avg_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE ((s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?)) AND (r.globalTid IS NOT NULL) GROUP BY pid, api_name ORDER BY total_ns DESC LIMIT ?"
},
"sync_calls": [
{
"api_name": "cudaStreamSynchronize",
"avg_duration_us": 800.0,
"call_count": 1,
"pid": 111,
"total_time_ms": 0.8
},
{
"api_name": "cudaDeviceSynchronize",
"avg_duration_us": 700.0,
"call_count": 1,
"pid": 222,
"total_time_ms": 0.7
}
]
}
},
"gpu_idle": {
"devices": [
{
"busy_ms": 4.5,
"device_id": 0,
"idle_ms": 1.0,
"idle_pct_of_window": 18.181818181818183,
"window_ms": 5.5
}
],
"gaps": [
{
"device_id": 0,
"gap_end_ns": 4000000,
"gap_ms": 1.0,
"gap_start_ns": 3000000
}
],
"notes": [],
"sql": {
"events": "SELECT start, end, deviceId AS device_id FROM CUPTI_ACTIVITY_KIND_KERNEL ORDER BY device_id, start"
},
"table": "CUPTI_ACTIVITY_KIND_KERNEL"
},
"launch_storm": {
"is_launch_storm": false,
"launches_per_s": 909.0909090909091,
"median_kernel_us": 1000.0,
"notes": [],
"p50_kernel_us": 1000.0,
"p90_kernel_us": 1800.0,
"p99_kernel_us": 1980.0,
"pct_under_10us": 0.0,
"pct_under_20us": 0.0,
"pct_under_5us": 0.0,
"sql": {
"tiny_kernels": "SELECT s.value AS kernel_name, COUNT(*) AS call_count, AVG(k.end-k.start) AS avg_dur_ns FROM CUPTI_ACTIVITY_KIND_KERNEL k JOIN StringIds s ON s.id = k.demangledName WHERE (k.end-k.start) <= ? GROUP BY kernel_name ORDER BY call_count DESC LIMIT ?"
},
"storm_thresholds": {
"launches_per_s_threshold_1": 50000.0,
"launches_per_s_threshold_2": 100000.0,
"p50_kernel_us_threshold_1": 10.0,
"p50_kernel_us_threshold_2": 20.0
},
"tiny_kernel_us": 5.0,
"tiny_kernels": [],
"total_launches": 5,
"window_s": 0.0055
},
"nccl": {
"event_count": 2,
"notes": [
"Using NCCL kernel names as NCCL windows; collective names may be inferred only from kernel names."
],
"ops": [
{
"avg_duration_us": 2000.0,
"compute_overlap_ms": 1.0,
"compute_overlap_pct": 50.0,
"count": 1,
"max_duration_ms": 2.0,
"op_name": "allreduce",
"raw_name_example": "ncclAllReduceRingKernel",
"source": "kernel",
"straggler": "pid:111",
"straggler_max_ms": 2.0,
"straggler_total_ms": 2.0,
"total_time_ms": 2.0
},
{
"avg_duration_us": 1500.0,
"compute_overlap_ms": 0.6,
"compute_overlap_pct": 40.0,
"count": 1,
"max_duration_ms": 1.5,
"op_name": "broadcast",
"raw_name_example": "ncclBroadcastRingKernel",
"source": "kernel",
"straggler": "pid:222",
"straggler_max_ms": 1.5,
"straggler_total_ms": 1.5,
"total_time_ms": 1.5
}
],
"pids": [
{
"max_duration_ms": 2.0,
"nccl_event_count": 1,
"pid": 111,
"top_nccl_op": "allreduce",
"total_nccl_time_ms": 2.0
},
{
"max_duration_ms": 1.5,
"nccl_event_count": 1,
"pid": 222,
"top_nccl_op": "broadcast",
"total_nccl_time_ms": 1.5
}
],
"present": true,
"source": "kernel",
"sql": {
"compute_overlap": "SELECT k.start AS start_ns, k.end AS end_ns, s.value AS kernel_name FROM CUPTI_ACTIVITY_KIND_KERNEL k JOIN StringIds s ON s.id = k.demangledName WHERE k.end IS NOT NULL AND k.end > k.start ORDER BY k.start",
"nccl_kernels": "SELECT (CAST(k.globalPid / 16777216 AS INT) % 16777216) AS pid, k.deviceId AS device_id, s.value AS kernel_name, k.start AS start_ns, k.end AS end_ns FROM CUPTI_ACTIVITY_KIND_KERNEL k JOIN StringIds s ON s.id = k.demangledName WHERE k.end IS NOT NULL AND k.end > k.start AND (LOWER(s.value) LIKE ?) ORDER BY k.start",
"nccl_runtime": "SELECT (CAST(r.globalTid / 16777216 AS INT) % 16777216) AS pid, s.value AS api_name, r.start AS start_ns, r.end AS end_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE r.end IS NOT NULL AND r.end > r.start AND (LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ? OR LOWER(s.value) LIKE ?) ORDER BY r.start"
},
"windows": [
{
"end_ns": 3000000,
"start_ns": 1000000
},
{
"end_ns": 5500000,
"start_ns": 4000000
}
]
},
"nvlink_during_nccl": {
"capture_instructions": [
"NVLink counters not found in the SQLite export.",
"List supported metric sets first: `nsys profile --gpu-metrics-devices=all --gpu-metrics-set=help`.",
"Then re-capture with GPU Metrics enabled, for example: `sudo nsys profile --trace=nccl,cuda,nvtx,osrt --cuda-trace-scope=process-tree --gpu-metrics-devices=all --gpu-metrics-set=<supported-set> --gpu-metrics-frequency=10000 --cuda-graph-trace=node -o trace <app>`.",
"Export again with SQLite output: `nsys export --type sqlite --output trace.sqlite --force-overwrite=true --lazy=false trace.nsys-rep`."
],
"missing_counters": true,
"notes": [
"GPU metric tables were not found in this export."
],
"present": false,
"rows": [],
"sql": {}
},
"nvtx": {
"instances": [],
"notes": [
"No NVTX table found."
],
"ranges": [],
"sql": {},
"table": null
},
"nvtx_coverage_warn_threshold": 0.7,
"nvtx_kernel_phases": null,
"nvtx_kernel_time": {
"notes": [
"Need kernel + runtime + NVTX tables for NVTX\u2192kernel attribution."
],
"present": false,
"ranges": [],
"sql": {}
},
"nvtx_phases": null,
"per_pid": {
"notes": [],
"pid_source": "globalPid",
"pids": [
{
"launch_storm": {
"is_launch_storm": false,
"launches_per_s": 1000.0,
"median_kernel_us": 1000.0,
"p50_kernel_us": 1000.0,
"p90_kernel_us": 2000.0,
"p99_kernel_us": 2000.0,
"pct_under_10us": 0.0,
"pct_under_20us": 0.0,
"pct_under_5us": 0.0,
"storm_thresholds": {
"launches_per_s_threshold_1": 50000.0,
"launches_per_s_threshold_2": 100000.0,
"p50_kernel_us_threshold_1": 10.0,
"p50_kernel_us_threshold_2": 20.0
},
"total_launches": 3,
"window_s": 0.003
},
"nvtx": {
"notes": [
"No NVTX table."
],
"present": false,
"ranges": [],
"table": null
},
"pid": 111,
"sync": {
"notes": [],
"present": true,
"sql": "SELECT s.value AS api_name, COUNT(*) AS call_count, SUM(r.end-r.start) AS total_time_ns, AVG(r.end-r.start) AS avg_time_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE ((r.globalTid >> 24) & 16777215) = ? AND ((s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?)) GROUP BY api_name ORDER BY total_time_ns DESC LIMIT 50",
"sync_calls": [
{
"api_name": "cudaStreamSynchronize",
"avg_duration_us": 800.0,
"call_count": 1,
"total_time_ms": 0.8
}
],
"table": "CUPTI_ACTIVITY_KIND_RUNTIME"
},
"top_kernels": {
"kernels": [
{
"avg_duration_us": 1000.0,
"call_count": 2,
"device_id": 0,
"kernel_name": "computeKernel",
"total_time_ms": 2.0
},
{
"avg_duration_us": 2000.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclAllReduceRingKernel",
"total_time_ms": 2.0
}
],
"table": "CUPTI_ACTIVITY_KIND_KERNEL",
"tiny_kernels": []
}
},
{
"launch_storm": {
"is_launch_storm": false,
"launches_per_s": 1333.3333333333333,
"median_kernel_us": 600.0,
"p50_kernel_us": 600.0,
"p90_kernel_us": 1500.0,
"p99_kernel_us": 1500.0,
"pct_under_10us": 0.0,
"pct_under_20us": 0.0,
"pct_under_5us": 0.0,
"storm_thresholds": {
"launches_per_s_threshold_1": 50000.0,
"launches_per_s_threshold_2": 100000.0,
"p50_kernel_us_threshold_1": 10.0,
"p50_kernel_us_threshold_2": 20.0
},
"total_launches": 2,
"window_s": 0.0015
},
"nvtx": {
"notes": [
"No NVTX table."
],
"present": false,
"ranges": [],
"table": null
},
"pid": 222,
"sync": {
"notes": [],
"present": true,
"sql": "SELECT s.value AS api_name, COUNT(*) AS call_count, SUM(r.end-r.start) AS total_time_ns, AVG(r.end-r.start) AS avg_time_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE ((r.globalTid >> 24) & 16777215) = ? AND ((s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?)) GROUP BY api_name ORDER BY total_time_ns DESC LIMIT 50",
"sync_calls": [
{
"api_name": "cudaDeviceSynchronize",
"avg_duration_us": 700.0,
"call_count": 1,
"total_time_ms": 0.7
}
],
"table": "CUPTI_ACTIVITY_KIND_RUNTIME"
},
"top_kernels": {
"kernels": [
{
"avg_duration_us": 1500.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclBroadcastRingKernel",
"total_time_ms": 1.5
},
{
"avg_duration_us": 600.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "computeKernel",
"total_time_ms": 0.6
}
],
"table": "CUPTI_ACTIVITY_KIND_KERNEL",
"tiny_kernels": []
}
}
],
"present": true,
"sql": {
"top_pids": "SELECT ((k.globalPid >> 24) & 16777215) AS pid, SUM(k.end-k.start) AS total_ns, COUNT(*) AS launches FROM CUPTI_ACTIVITY_KIND_KERNEL k WHERE k.end > k.start AND ((k.globalPid >> 24) & 16777215) IS NOT NULL GROUP BY pid ORDER BY total_ns DESC LIMIT ?"
},
"top_pids": [
{
"kernel_launches": 3,
"pct_of_total_kernel_time": 65.57377049180327,
"pid": 111,
"total_kernel_time_ms": 4.0,
"total_kernel_time_ns": 4000000
},
{
"kernel_launches": 2,
"pct_of_total_kernel_time": 34.42622950819672,
"pid": 222,
"total_kernel_time_ms": 2.1,
"total_kernel_time_ns": 2100000
}
]
},
"pid_attribution": {
"kernel_pid_count": 2,
"kernel_pid_source": "globalPid",
"kernel_pids_sample": [
111,
222
],
"nvtx_pid_count": 0,
"nvtx_pid_source": null,
"nvtx_pids_sample": [],
"runtime_pid_count": 2,
"runtime_pid_source": "globalTid",
"runtime_pids_sample": [
111,
222
]
},
"sync": {
"notes": [],
"sql": {
"sync_calls": "SELECT s.value AS api_name, COUNT(*) AS call_count, SUM(r.end - r.start) AS total_time_ns, AVG(r.end-r.start) AS avg_time_ns FROM CUPTI_ACTIVITY_KIND_RUNTIME r JOIN StringIds s ON s.id = r.nameId WHERE (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) OR (s.value LIKE ?) GROUP BY api_name ORDER BY total_time_ns DESC LIMIT ?"
},
"sync_calls": [
{
"api_name": "cudaStreamSynchronize",
"avg_duration_us": 800.0,
"call_count": 1,
"total_time_ms": 0.8
},
{
"api_name": "cudaDeviceSynchronize",
"avg_duration_us": 700.0,
"call_count": 1,
"total_time_ms": 0.7
}
],
"table": "CUPTI_ACTIVITY_KIND_RUNTIME"
},
"top_kernels": {
"kernels": [
{
"avg_duration_us": 866.6666666666666,
"call_count": 3,
"device_id": 0,
"kernel_name": "computeKernel",
"max_duration_us": 1000.0,
"min_duration_us": 600.0,
"p50_duration_us": 1000.0,
"p90_duration_us": 1000.0,
"pct_total_kernel_time": 42.62295081967213,
"total_time_ms": 2.6,
"total_time_ns": 2600000
},
{
"avg_duration_us": 2000.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclAllReduceRingKernel",
"max_duration_us": 2000.0,
"min_duration_us": 2000.0,
"p50_duration_us": 2000.0,
"p90_duration_us": 2000.0,
"pct_total_kernel_time": 32.78688524590164,
"total_time_ms": 2.0,
"total_time_ns": 2000000
},
{
"avg_duration_us": 1500.0,
"call_count": 1,
"device_id": 0,
"kernel_name": "ncclBroadcastRingKernel",
"max_duration_us": 1500.0,
"min_duration_us": 1500.0,
"p50_duration_us": 1500.0,
"p90_duration_us": 1500.0,
"pct_total_kernel_time": 24.59016393442623,
"total_time_ms": 1.5,
"total_time_ns": 1500000
}
],
"notes": [],
"sql": {
"agg": "SELECT s.value AS kernel_name, k.deviceId AS device_id, COUNT(*) AS call_count, SUM(k.end - k.start) AS total_time_ns, AVG(k.end - k.start) AS avg_time_ns, MIN(k.end - k.start) AS min_time_ns, MAX(k.end - k.start) AS max_time_ns FROM CUPTI_ACTIVITY_KIND_KERNEL k JOIN StringIds s ON s.id = k.demangledName GROUP BY kernel_name, device_id ORDER BY total_time_ns DESC LIMIT ?",
"durations": "SELECT (end-start) FROM CUPTI_ACTIVITY_KIND_KERNEL ... ORDER BY",
"total": "SELECT SUM(end - start) FROM CUPTI_ACTIVITY_KIND_KERNEL"
},
"table": "CUPTI_ACTIVITY_KIND_KERNEL",
"total_kernel_time_ns": 6100000
}
},
"schema": {
"capabilities": {
"cuda_graph_table": {
"present": false,
"table": null
},
"gpu_metrics_table": {
"present": false,
"table": null,
"target_info_table": null
},
"has_string_table": true,
"kernel_table": {
"has_correlationId": false,
"has_deviceId": true,
"has_globalPid": true,
"has_pid": false,
"has_processId": false,
"present": true
},
"nvtx_table": {
"has_end": false,
"has_globalTid": false,
"has_text": false,
"has_textId": false,
"present": false
},
"runtime_table": {
"has_correlationId": false,
"has_globalTid": true,
"has_name": false,
"has_nameId": true,
"has_pid": false,
"has_processId": false,
"present": true
}
},
"cuda_graph_table": null,
"gpu_metrics_table": null,
"kernel_pid_source": "globalPid",
"kernel_table": "CUPTI_ACTIVITY_KIND_KERNEL",
"nvtx_pid_source": null,
"nvtx_table": null,
"path": "synthetic fixture (raw trace.sqlite not committed)",
"runtime_pid_source": "globalTid",
"runtime_table": "CUPTI_ACTIVITY_KIND_RUNTIME",
"sqlite_version": "3.26.0",
"string_table": "StringIds",
"sync_table": "CUPTI_ACTIVITY_KIND_RUNTIME",
"tables": {
"CUPTI_ACTIVITY_KIND_KERNEL": {
"columns": [
"start",
"end",
"deviceId",
"contextId",
"streamId",
"globalPid",
"demangledName"
],
"types": {
"contextId": "INT",
"demangledName": "INT",
"deviceId": "INT",
"end": "INT",
"globalPid": "INT",
"start": "INT",
"streamId": "INT"
}
},
"CUPTI_ACTIVITY_KIND_RUNTIME": {
"columns": [
"start",
"end",
"nameId",
"globalTid"
],
"types": {
"end": "INT",
"globalTid": "INT",
"nameId": "INT",
"start": "INT"
}
},
"StringIds": {
"columns": [
"id",
"value"
],
"types": {
"id": "INTEGER",
"value": "TEXT"
}
}
},
"target_info_gpu_metrics_table": null,
"timestamp_unit_assumed": "ns",
"timestamp_unit_guess": "ns_likely",
"timestamp_unit_guess_basis": "kernel_window_ns_ge_1ms"
},
"tool": {
"name": "nsys-llm-explain",
"version": "0.1.0"
},
"trace": {
"path": "synthetic fixture (raw trace.sqlite not committed)"
},
"warnings": [
"NVLink counters not found. The report cannot correlate NCCL windows with NVLink metrics for this export."
]
}
|