Skip to content

Support free-threading Python wheel distributions #1197

@andfoy

Description

@andfoy

As some of you might be aware, since CPython 3.13, there is experimental support for an alternative interpreter distribution (via PEP703) that disables the GIL altogether, thus enabling support for real thread parallelism.

Since PyTorch now supports free-threaded wheel distributions (pytorch/pytorch#130249), it should be easy producing wheels for fairscale as well.

In order to provide free-threaded wheels, there is a need for extensive testing, which can be summarized in performing the following tasks:

  • Audit Python bindings and declare them free-threading compatible (xref https://py-free-threading.github.io/porting/#updating-extension-modules).
  • Run the test suite with pytest-run-parallel to find potential issues, and fix them.
  • Run the test suite under ThreadSanitizer. Should be feasible, since there are no runtime dependencies aside from Cython.
  • Add cp313t-* to CI to build free-threading wheels.

I can volunteer in taking charge of these tasks if necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions