Lightning-AI / Lightning-AI/lightning-thunder

Symmetric memory support

Open
#2,699 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

distributed
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

🚀 Feature

Goal: Add PyTorch Symmetric Memory Support

What is Symmetric Memory?

Symmetric memory enables GPUs to directly access each other's memory without CPU intervention, treating multiple GPUs as a unified memory space (PyTorch API doc).

Benefits
  • In-kernel compute-communication fusion: Overlap computation with data movement within custom kernels
  • Custom communication patterns: Implement application-specific strategies beyond standard collectives
  • Low-latency remote access: Direct RDMA-based GPU-to-GPU communication without CPU's orchestration
High-Level TODO
  • Support torch.distributed._symmetric_memory.empty() and rendezvous()
  • Support torch.ops.symm_mem.* operations (all_reduce, all_to_all variants)
  • Create DTensor for symmetric tensors
  • Allow DTensors to use implementations of primitives backed with symmetric memory
  • Add a transform to apply symmetric memory based communication for efficiency

cc @crcrpar @ali-alshaar7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked PyTorch symmetric memory API and the requested entry points, torch.distributed._symmetric_memory.empty(), rendezvous(), and torch.ops.symm_mem.*. Map these against DTensor and the listed communication TODOs; the work is done when the requested symmetric tensor support, primitives, and communication transform are implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.