FR: wheels that support optional modules

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, pytorch

Research direction

No files or tests are named. Start by tracing the wheel build and package metadata behind torchcomms, then check how pip extras could select nccl or rccl backends. Done means the optional installation variants produce wheels that omit unrequested heavy modules while retaining the requested backend.

Written by the indexing model from the issue text.

Description

Hi developers,

torchcomms claims to be a light-weight library, but ncclx seems to be heavy:

14M     /lib/python3.14/site-packages/torchcomms/_comms.cpython-314-x86_64-linux-gnu.so
12M     /lib/python3.14/site-packages/torchcomms/_comms_gloo.cpython-314-x86_64-linux-gnu.so
15M     /lib/python3.14/site-packages/torchcomms/_comms_nccl.cpython-314-x86_64-linux-gnu.so
654M    /lib/python3.14/site-packages/torchcomms/_comms_ncclx.cpython-314-x86_64-linux-gnu.so
12K     /lib/python3.14/site-packages/torchcomms/_comms.pyi
8.0K    /lib/python3.14/site-packages/torchcomms/device_mesh.py
4.0K    /lib/python3.14/site-packages/torchcomms/__init__.py
11M     /lib/python3.14/site-packages/torchcomms/libtorchcomms.so
32K     /lib/python3.14/site-packages/torchcomms/objcol.py
40K     /lib/python3.14/site-packages/torchcomms/__pycache__
376K    /lib/python3.14/site-packages/torchcomms/tests

I wonder if we can just do pip install torchcomms[nccl] to specify the backend such that ncclx can be excluded optionally, and similarly pip install torchcomms[rccl].

Thanks!

Dominant language
C++
Stars
396
Forks
190
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from meta-pytorch/torchcomms

All issues in meta-pytorch/torchcomms

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.