conda-forge / conda-forge/pytorch-cpu-feedstock

Understand how to package libraries that target the stable PyTorch ABI

Open
#511 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Shell
Stars
32
Forks
57
PR merge metrics
No merged PRs in 30d

Description

PyTorch provides a stable ABI, that is a subset of its ABI that does not break at every minor PyTorch release, see https://docs.pytorch.org/docs/2.9/notes/libtorch_stable_abi.html . This is similar in concept to the Python Stable ABI, in the sense that you can have packages in the dependency tree

As torchcodec supports its since release torchcodec 0.11 + torch 2.11 (see https://github.com/meta-pytorch/torchcodec/releases/tag/v0.12.0), supporting it would reduce the amount of rebuilds required for pytorch migrations.

I guess a possible way to adopt would be:
* Pin host pytorch to the earliest version supported by torchcodec (as torchcodec 0.12/0.14, torch 2.11)
* Ignore all pytorch run_exports (that refer to the strict ABI)
* Manually add the appropriate pytorch run depedency (I guess pytorch>=2.11,<3, but I would need to double check).

However, I am not sure how this would interact with pytorch ABI migration machinery.

More info on https://dev-discuss.pytorch.org/t/libtorch-abi-stable-plans-2026/3380

fyi @conda-forge/pytorch-cpu @conda-forge/torchcodec @conda-forge/torchvision @conda-forge/torchaudio

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.