Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

PyTorch distributed is changing and TorchComms is why

TorchComms: Improving on the c10d backend in PyTorch

July 20, 2026
Arkadip Maitra
Related topics:
Developer tools
Related products:
Red Hat AI

    For most PyTorch users, "distributed" still means c10d. That's the runtime surface they use today, and it will remain the surface for a while. The real question is how the old back-end layer underneath it should evolve as training and inference systems demand more than host-driven process groups and standard collectives. TorchComms is the clearest answer PyTorch has presented so far.

    Why the comm API is evolving

    The c10d library gave PyTorch a ProcessGroup-centered distributed runtime. That interface is still what most users touch, and it's not going away overnight. But the old back-end layer underneath it was designed around host-driven collectives and a smaller communication design space than modern LLM training and inference now need. TorchComms is the clearest signal for where the communication model in torch.distributed is going next.

    That's the right scope for the claim. TorchComms doesn't need you to rewrite your code and throw away torch.distributed. Instead, it moves the communication model inside torch.distributed toward explicit communicators, richer semantics, and more flexible backends.

    The official launch material makes that roadmap explicit: The goal is to bring these capabilities into PyTorch Distributed over time, not to force users onto a separate stack.

    That distinction matters. The part that is changing is the communication layer under torch.distributed, not the entire distributed surface area. ProcessGroup, DeviceMesh, FSDP, TorchTitan, and higher-level training code can keep their existing structure while the communication implementation underneath them becomes more explicit, more extensible, and easier to evolve.

    Communicator-centric API

    The core API shift is simple: TorchComms starts from explicit per-device communicators.

    import torch
    import torchcomms
    device = torch.device("cuda")
    backend = "ncclx"
    comm = torchcomms.new_comm(backend, device, name="global")
    x = torch.ones(1024, device=device)
    comm.all_reduce(x, torchcomms.ReduceOp.SUM, async_op=False)

    That looks small, but it is a real model change. Collectives, point-to-point operations, hooks, finalize, and window operations all hang off the communicator object. TorchComms also exposes pluggable backends, eager communicator setup, DeviceMesh integration, and communication surfaces that go beyond classic ProcessGroup collectives.

    The practical payoff is lifecycle control. With a communicator object, setup, split, finalize, and backend-specific extensions live in one place. That makes it easier to add semantics such as windows, RMA, transport-specific hints, or future fault-tolerance operations without overloading a single generic ProcessGroup interface.

    It also reaches into areas that the old c10d back-end abstraction never really centered. The same surface extends to windows and RMA with comm.new_window(...) and to DeviceMesh with torchcomms.device_mesh.init_device_mesh(...). That's a useful signal: TorchComms is not only exposing another collective path, it is expanding the communication model itself.

    Those prototypes are not production-ready, but they reinforce the same point: TorchComms is not just a replacement for an old back-end interface, it's becoming the place where new communication ideas can be tried without first rewriting the C++ comms stack.

    Migration path into PyTorch and Torchtitan

    TorchComms is not only a standalone API. PyTorch already contains a wrapper path in torch/distributed/distributed_c10d.py that instantiates a TorchComms communicator, wraps it in _BackendWrapper, and attaches it to the existing ProcessGroup machinery when dist.config.use_torchcomms is enabled. That keeps the migration small:

    import torch.distributed as dist
    import torch.distributed.config as dist_config
    dist_config.use_torchcomms = True
    dist.init_process_group(backend="nccl")
    dist.all_reduce(tensor)

    The important detail in this local checkout is that the safe wrapper example is backend="nccl". The equivalent backend="ncclx" wrapper path still fails locally with AssertionError: Unknown backend type ncclx, so it must not be presented as already working everywhere.

    Even with that caveat, the direction is clear. TorchComms is not being built as an isolated alternate runtime. It is being wired into the same torch.distributed and DeviceMesh ecosystem that large PyTorch training stacks already use today.

    The same pattern shows up in Torchtitan. Torchtitan already exposes --comm.mode torchcomms, and its distributed initialization path sets dist.config.use_torchcomms = True before normal process-group and DeviceMesh setup.

    Architecturally, that is the point: The model and parallelism code stay in the usual TorchTitan and DeviceMesh world. The communication layer underneath is what changes. In this bundle, the command is illustrative rather than a locally green end-to-end run, because the current environment still hits a tyro/typeguard mismatch before TorchComms initialization.

    Process-group initialization time as number of GPUs increases.
    Figure 1: Using ncclx, process-group initialization time increases less as number of GPUs increases. As the number of GPUs increase, the difference between nccl and ncclx is an order of magnitude.

    Figure 1 shows the clearest startup result. Default process-group initialization drops from 14.5 seconds to 3.97 seconds at 8,000 GPUs, from 55.71 seconds to 11.89 seconds at 32,000 GPUs, and from 265 seconds to 24 seconds at 96,000 GPUs.

    That's the strongest argument for moving the communication layer in torch.distributed toward something built for large communicator counts, faster control-plane work, and topology-aware setup.

    Those numbers matter because startup is not a cosmetic metric at this scale. Large jobs create many communicators, restart after faults, and repeatedly pay control-plane costs that are negligible on a small cluster but dominant at tens of thousands of GPUs. Faster initialization directly changes how practical a communication stack is for real training systems.

    Decode-time in Distributed Inference.
    Figure 2: Decode-time in distributed inference.

    Figure 2 shows the inference side. Decode-time improvement rises with communication pressure: for k=1, batch=128, it grows from 19% at 4 hosts to 56.5% at 16 hosts. For k=4, batch=256, it grows from 45.87% at 4 hosts to 83.3% at 16 hosts. The baseline here is the token-shuffling path built from two AllGather operations and one AllToAll with the same compute kernels, so this is a back-end layer result rather than a generic c10d against TorchComms chart.

    This is also why the TorchComms story is not only about training collectives. The back-end layer must handle both bulk-synchronous training and more dynamic, metadata-sensitive inference patterns. GPU-resident metadata, transport flexibility, and lower small-message overhead are central to that problem.

    Latency multiplier at various cluster distance.
    Figure 3: Latency multiplier at various cluster distance.

    Figure 3 shows the network backdrop. Cross-rack, cross-zone, and cross-data-center traffic sees roughly 7x, 15x, and 30x the latency of same-rack communication. At that point, initialization, topology handling, registration, and small-message overhead are system constraints, not cleanup details.

    Current status

    The open source stack already has the key pieces in place: Direct communicators, a torch.distributed wrapper path, DeviceMesh integration, and a TorchTitan communication mode.

    The safe wrapper example to show today is still the nccl route. The ncclx wrapper path is not something to present as universally wired through init_process_group yet.

    That's a good way to read the current state of the project overall. The core architecture is already visible in the open tree. What is still uneven is the completeness of specific integration paths, not the direction of the design

    Conclusion

    The c10d library will remain the user-facing interface for a while, but the back-end layer underneath it is moving. TorchComms gives PyTorch explicit communicators, a wrapper path back into existing torch.distributed code, DeviceMesh integration, and communication surfaces such as windows and RMA that do not fit naturally inside the old back-end abstraction. The startup and inference results show why that matters at scale. Architecturally, the migration path is already visible in the open tree. That makes TorchComms the clearest view today of how new communication ideas are coming over into the c10d stack inside torch.distributed, not just another back-end toggle.

    References

    • Official launch blog
    • Official docs
    • Official paper

    Related Posts

    • MPI-powered gradient synchronization in PyTorch distributed training

    • Optimize PyTorch training with the autograd engine

    • Understanding ATen: PyTorch's tensor library

    • vLLM with torch.compile: Efficient LLM inference on PyTorch

    • Learn how to build, train, and run a PyTorch model

    Recent Posts

    • Architect an open blueprint for cloud-native AI agents

    • Computer use: How AI agents can automate almost anything

    • PyTorch distributed is changing and TorchComms is why

    • What 429 chaos experiments taught us about Kubernetes operator resilience

    • Red Hat Dependency Analytics works with your private Trusted Profile Analyzer instance!

    What’s up next?

    Learning Path Classify-Jupyter-Notebook-lp-feature-image

    Classify interactive images with Jupyter Notebook on Red Hat OpenShift AI

    Jupyter Notebook works with OpenShift AI to interactively classify images. In...
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.