$ the-wire · showcase
PyTorch Kills the Legacy C Extension
By RepoJournal · Filed · About PyTorch
The unstable `_C` extension is gone, replaced by a stable ABI that will make every vision build cleaner and safer.
The biggest story this morning is in pytorch/vision, where the final op has been ported out of the legacy `_C` extension and everything now builds into `_C_stable` [1] [2]. This eliminates the dual build and the hand-maintained source list, a long-awaited cleanup. Meanwhile, pytorch/pytorch is wrestling with a revert of the c10 include cleanup [3] that conflicted with another revert, though the original change [4] should be safe to rebase and remerge. Dynamo got three CPython-faithfulness fixes for `DequeVariable` [5], and a stale float specialization bug in `tensorify_python_scalars` was patched [6]. On the TensorRT desk, a complex decomposition fix keeps rotary attention compiling to a single engine [7], and a separate fix keeps `x & False` and `x | True` out of TensorRT [8]. Test-infra shipped two releases [9] [10], and the queue_time metric for multi-job workflows is now accurate [11]. The release notes for the nightly wheels in executorch note that new features land on main and reach users through the nightly build before the next stable release [12].
Action items
- → Update to a vision build with the stable ABI removal and verify your custom CUDA sources still compile pytorch/vision [immediate]
- → Track the c10 include cleanup rebase and remerge; avoid cherry-picking around it pytorch/pytorch [monitor]
- → Install ExecuTorch nightly wheels if you need the latest features before the next stable release pytorch/executorch [plan]
- → Verify TensorRT dynamo results for rotary attention and bitwise ops after these fixes pytorch/TensorRT [monitor]
References
- [1] Consolidate CUDA helpers and remove the legacy _C extension in place of Stable-ABI ↗ pytorch/vision
- [2] Consolidate CUDA helpers and remove the legacy _C extension in place of Stable-ABI (#9633) pytorch/vision
- [3] Revert "Drop unused includes in c10 (#194959)" pytorch/pytorch
- [4] Drop unused includes in c10 (#194959) pytorch/pytorch
- [5] [dynamo] Fix DequeVariable empty popleft, maxlen on repeat, and delitem index wrapping (#195010) pytorch/pytorch
- [6] Fix stale float specialization in tensorify_python_scalars (#194976) (#195040) pytorch/pytorch
- [7] fix(dynamo): keep the complex decomposition inside the TRT op set ↗ pytorch/TensorRT
- [8] fix(dynamo): keep `x & False` and `x | True` out of TensorRT ↗ pytorch/TensorRT
- [9] v20260827-192339 ↗ pytorch/test-infra
- [10] v20260827-145407 ↗ pytorch/test-infra
- [11] [CRCR] Implement workflow-level queue_time tracking and update Redis helper for job dependencies ↗ pytorch/test-infra
- [12] Document nightly wheels and linking macOS backends from C++ (#22240) pytorch/executorch