fix: bump torchao lower bound to 0.16.0 for torch 2.10.0+cu128 compat#974
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ChuxiJ
left a comment
There was a problem hiding this comment.
Code Review — PR #974
LGTM. This is a clean, minimal dependency bump.
What it does:
- Bumps
torchaolower bound from0.14.1to0.16.0for non-aarch64 platforms - Retains
<0.17.0upper bound to avoid unreviewed breaking changes - Only touches
pyproject.toml— no runtime code changes
Why it's correct:
torchao 0.15.0was built againsttorch 2.9.1; when the cu128 index resolvestorch==2.10.0, torchao skips all C++ extensions at import time (ref: pytorch/ao#2919)torchao 0.16.0officially targetstorch 2.10.0per the pytorch/ao compatibility table- aarch64 path is unchanged (separate unconstrained
torchaoline) - macOS/ROCm/XPU unaffected
Verification:
- Author tested on RTX 4060 Laptop (8GB), WSL2 Ubuntu, Python 3.11 with
torch==2.10.0+cu128, torchao==0.16.0+cu128— no cpp extension warning, Gradio UI accessible
Minor note:
- The Windows
pyproject.tomlline still pinstorch==2.7.1+cu128, so Windows users won't be affected by this change at all sincetorchaois gated onplatform_machine != 'aarch64'but not onsys_platform. This is fine — Windows torch is 2.7.1 which is compatible with the existing torchao range, and>=0.16.0should still resolve correctly for Windows installs.
Approved — ready to merge.
|
@ChuxiJ, CI is pending approval to run. Could you approve and run it so we can get this merged? Thanks! |
PR #974 bumped torchao from <0.16.0 to >=0.16.0, but diffusers was left unpinned. torchao 0.16.0 removed the `torchao.dtypes.uintx.uint4_layout` module, which diffusers 0.36.0 tries to import at module level. This causes model initialization to fail with `NameError: name 'logger' is not defined`. diffusers 0.37.0+ handles this correctly by gating the import behind a torchao version check (huggingface/diffusers#11018). Fixes #982 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR #974 bumped torchao from <0.16.0 to >=0.16.0, but diffusers was left unpinned. torchao 0.16.0 removed the `torchao.dtypes.uintx.uint4_layout` module, which diffusers 0.36.0 tries to import at module level. This causes model initialization to fail with `NameError: name 'logger' is not defined`. diffusers 0.37.0+ handles this correctly by gating the import behind a torchao version check (huggingface/diffusers#11018). Fixes #982 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Bumps torchao minimum version from 0.14.1 to 0.16.0 to resolve C++ extension
skip when using torch 2.10.0+cu128 (the version resolved by uv from the cu128 index).
Root cause: torchao 0.15.0 was built against torch 2.9.1. When the cu128 index
resolves torch==2.10.0, torchao skips all C++ extensions at import time.
Reference: pytorch/ao#2919
Closes #98
Scope
pyproject.tomlRisk and Compatibility
Regression Checks
uv run acesteplaunches successfully, no cpp extension warningReviewer Notes
Summary by CodeRabbit