torch-tbccl

torch-tbccl is a PyTorch torch.distributed backend named "tbccl". It lets one PyTorch program communicate between machines that differ in operating system and accelerator, for example a Linux host with an NVIDIA GPU and a Mac with Apple silicon, over TCP including a direct Thunderbolt 4 link. PyTorch is not modified: import torch_tbccl and use the normal distributed API.

Note

Release. The current release is 0.3.1 (PyTorch 2.13.x, CPython 3.13, TBCCL C ABI 1 / wire protocol 4), whose wheels bundle TBCCL 0.7.1. It is experimental.

What you get

The normal distributed API

dist.init_process_group("tbccl") with torchrun, process groups and DistributedDataParallel. Your program keeps using torch.distributed.

Overview

Collectives and devices

Point-to-point, broadcast, all_gather, all_reduce (SUM only) and barrier on CPU, CUDA (Linux) and MPS (macOS) tensors.

Supported operations

DDP across unlike machines

Train with DistributedDataParallel on CPU, CUDA and, next to a CPU or CUDA rank, MPS ranks.

DDP guide · MPS guide

Built on TBCCL

The wheel contains a statically linked libtbccl, so you do not install TBCCL separately.

TBCCL documentation · GitHub

Get started

Install

A platform wheel; install the matching PyTorch first.

Installing torch-tbccl

Run a two-host all-reduce

The shortest path to a working group across two machines.

Quickstart

Train with DDP

Gradient reduction across CUDA, CPU and MPS ranks.

DDP guide

Use a Mac GPU

What works with MPS tensors and what does not.

MPS guide

Check it is active

Confirm the job really runs on the tbccl backend.

Verify the backend

What is supported

Only configurations that were actually exercised are listed as validated. Everything else is not supported or not claimed.

Validated

  • PyTorch 2.13.x and CPython 3.13 on Linux x86-64 (CPU, and CUDA with the CUDA 13 build of PyTorch) and macOS arm64 (CPU and MPS).

  • A Linux CUDA host and a Mac with MPS over a direct Thunderbolt 4 link: point-to-point, all_reduce, broadcast, all_gather and barrier, in both rank orientations.

  • World sizes 1 to 4, and DDP, on loopback and (on the development tree) between a CUDA and an MPS rank.

Not supported or not claimed

  • SUM is the only reduction; there is no reduce, scatter, reduce_scatter or all_to_all, and gather works for two-rank groups only.

  • No recovery after an abort or a peer failure; recreate the process group.

  • FSDP and world sizes 5 to 8 are not validated; two Linux hosts over a physical network are not part of the recorded validation.

  • Other PyTorch and CPython versions are not claimed.

Authoritative pages: compatibility, validated configurations and known limitations.

Where it fits

torch-tbccl is one of three independent adapters over the TBCCL runtime; the others are vllm-tbccl (vLLM) and exo-tbccl (exo). It does not depend on them and they do not depend on it. See the ecosystem overview.