-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What prebuilt wheels AO ships and why #1747
Comments
Haha, let me try to give some context to inform. Before my PR #1276 deleted the init.cpp file, ao built a separate binary across OS's (because init.cpp would be a custom extension file compiled across all of these platforms). After I removed that file in the PR linked above, ao becomes a pure python wheel for all those platforms EXCEPT Linux CUDA. So from then on, torchao was building two wheels:
In #1276 I changed the setup.py flag to use py_limited_api semantics, which changes the name of the first wheel to |
I suppose with custom arm kernels we will have "not-pure-python-wheel" for M1/M2 and friends? |
cc @petrex |
@kimishpatel Yup exactly |
Current Wheel Distribution
TorchAO currently ships two types of wheels:
Linux CUDA wheel with custom extensions:
torchao-0.8.0-cp39-abi3-linux_x86_64.whl
Pure Python wheel:
torchao-0.7.0-py3-none-any.whl
Historical Context
Prior to PR #1276, TorchAO built separate binaries across all operating systems due to the presence of
init.cpp
, which required platform-specific compilation. After removinginit.cpp
, the package became a pure Python wheel for all platforms except Linux CUDA.Recent Changes
PR #1276 and #1277 introduced two significant changes:
init.cpp
, simplifying the build process for most platformspy_limited_api
semantics insetup.py
, which changed the Linux CUDA wheel naming convention from:torchao-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
totorchao-0.8.0-cp39-abi3-linux_x86_64.whl
Build Types & Outputs
1. Platform-Specific Build
Currently, only Linux CUDA produces platform-specific wheels:
torchao-0.8.0-cp39-abi3-linux_x86_64.whl
2. Accelerator-Specific Builds
These are pure Python wheels with accelerator-specific suffixes:
torchao-0.7.0+rocm-py3-none-any.whl
torchao-0.7.0+xpu-py3-none-any.whl
3. Pure Python Builds
All other configurations produce identical pure Python wheels:
torchao-0.7.0-py3-none-any.whl
Build Pipeline Visualization
Planned Changes
Given that we currently only produce two distinct types of wheels (CUDA-specific and pure Python), we plan to streamline our CI/CD process:
Reduce Redundant CI Steps
Future Extensibility
Ownership Model
This approach allows us to maintain efficiency in our current setup while keeping the door open for future hardware-specific optimizations.
The text was updated successfully, but these errors were encountered: