RCCLX: Innovating GPU Communications on AMD Platforms
Meta is open-sourcing RCCLX, an enhanced fork of AMD's RCCL collective communication library integrated with the Torchcomms API, bringing its CTran transport (including the GPU-resident AllToAllvDynamic collective) to AMD GPUs. Direct Data Access (DDA) speeds up intra-node AllReduce for tensor-parallel LLM inference. Its flat algorithm cuts latency to O(1) at the cost of O(n²) data exchange, and its tree variant uses direct access in reduce-scatter and all-gather phases, beating RCCL by 10-50% on decode and 10-30% on prefill on MI300X for roughly a 10% reduction in time-to-incremental-token. Low-precision collectives quantize FP32/BF16 to FP8 over a P2P mesh on Infinity Fabric while computing in FP32. For large single-node messages they deliver about 9-10% lower latency and 7% higher throughput end to end with a ~0.3% GSM8K delta, enabled via RCCL_LOW_PRECISION_ENABLE=1.
Related posts
- MTIA 300: Meta’s First Training Chip with Built-in NICs and Communication-Offloading Engines
Meta Engineering hardMasterMTIA 300, Meta's in-house training accelerator for recommendation models, integrates two NIC chiplets with twelve 800 Gbps RDMA NICs on-package and adds 16 dedicated message engines, each with a RISC-V core, NIC interface and near-memory reduction block. Collectives therefore run without touching the compute grid. The co-designed HCCL library compiles each collective into dependency-linked work-queue subgraphs that execute autonomously on the device, and it integrates with torch.compile and c10d. Running GEMMs concurrently with collectives costs under 0.5% of compute throughput, versus over 20% on GPUs. Express doorbells save about 800 ns per operation, and on a 150B-parameter production model across 40 accelerators, total communication time is 3.9x faster than an equivalent GPU cluster.
- Creating custom kernels for the AMD MI300
Hugging Face hardMasterHugging Face and AMD wrote three open-source fused kernels for serving Llama 3.1 405B in FP8 with vLLM on an 8x MI300X node: residual add + RMS norm + FP8 quantization, SwiGLU + FP8 conversion, and a skinny GEMM for decode-sized batches. The write-up walks through the MI300X hierarchy (threads, 64-thread warps, compute units, XCDs, L2 and infinity cache), then uses vLLM profiling to show that GEMMs and all-reduce communications dominate decode latency. RMS norm and SwiGLU still account for about 15% of latency, which made them worth fusing. The basic fused RMS norm kernel alone is about 10x faster than PyTorch, and memory-access optimizations push it further; the kernels and benchmarks are available in the hf-rocm-kernels repo.
- Scaling LLM Inference: Innovations in Tensor Parallelism, Context Parallelism, and Expert Parallelism
Meta Engineering hardMasterMeta scales LLM inference with three parallelism techniques aimed at latency targets of under 350ms time-to-first-token and under 25ms per incremental token. For tensor parallelism, custom direct-data-access allreduce algorithms (flat and tree) cut communication latency, beating RCCL by 10-50% on decode and bringing AMD MI300X to parity with H100. Context parallelism via ring attention, in Pass-KV and Pass-Q variants, enables 1M-token prefill in under a minute on one H100 host and near-linear scaling for Llama 3 405B (128K tokens in 3.8s over 16 nodes). Expert parallelism for MoE models relies on all-to-all token exchange that costs 10-30% of latency, and Meta is moving toward N-D parallelism with disaggregated prefill and decode tiers on heterogeneous hardware.
- AMD + 🤗: Large Language Models Out-of-the-Box Acceleration with AMD GPU
Hugging Face easyNoviceHugging Face Transformers now runs all models and tasks on AMD Instinct GPUs with no code changes versus NVIDIA, backed by ROCm support for Flash Attention v2, vLLM Paged Attention, DeepSpeed, GPTQ via AutoGPTQ, ONNX Runtime's ROCMExecutionProvider, and Optimum-Benchmark. Text Generation Inference gains initial MI210/MI250 support through a ROCm Docker image, with GeMM kernel tuning to reach performance parity. Benchmarks show one MI250 (two 64 GB ROCm devices) delivering over 2.33x the decode throughput and half the prefill latency of an A100 at large batch sizes. Its 128 GB memory also fits Llama 70B workloads that run out of memory on two A100-80GBs.
- Run a Chatgpt-like Chatbot on a Single GPU with ROCm
Hugging Face mediumAdeptVicuna-13B can run on a single AMD GPU under ROCm by quantizing it to 4 bits with GPTQ, shrinking GPU memory use from over 28GB in fp16 to about 7.5GB so it fits on a 16GB Radeon RX6900XT. Token generation is memory-bandwidth bound, so quantization costs little latency or perplexity. The guide covers ROCm and Docker setup, downloading or producing a GPTQ 4-bit model (including applying Vicuna delta weights to LLaMA), building the HIPified dequant+matmul kernels, and serving the model through FastChat's Gradio web UI. It compares fp16 and 4-bit variants on MI210 and RX6900XT.