Commit 157a448
authored
Remove torchaudio _check_cuda_version() call when repackaging cu130->cu132 (#8052)
## Summary
torchaudio is now built against the PyTorch stable C++ ABI, so the
runtime `_check_cuda_version()` guard in
[`torchaudio/_extension/__init__.py`](https://github.com/pytorch/audio/blob/main/src/torchaudio/_extension/__init__.py)
is no longer needed and would otherwise fail on cross-CUDA-version
installs (e.g. a cu132-tagged torchaudio wheel running against `torch`
built for a different CUDA minor version).
Extends `release/repackage_torchaudio_cu130_to_cu132.py` (added in
#8043) to also **strip the `_check_cuda_version()` call** from
`torchaudio/_extension/__init__.py` inside each wheel during the same
`auditwheel.wheeltools.InWheelCtx` pass that rewrites the `+cu130` ->
`+cu132` local-version label, so the regenerated RECORD covers both
edits. The function definition in `utils.py` is left intact so external
callers (e.g. the [pytorch/builder smoke
test](https://github.com/pytorch/builder/blob/e2e4542b8eb0bdf491214451a1a4128bd606cce2/test/smoke_test/smoke_test.py#L80))
keep working.
The new repackaged cu132 wheels can be re-uploaded to:
- AWS S3: `s3://pytorch/whl/test/cu132/<wheel>`
- Cloudflare R2: `s3://pytorch-downloads/whl/test/cu132/<wheel>`
via the existing upload paths in the same script (no flag changes).
## Test plan
- [ ] `python release/repackage_torchaudio_cu130_to_cu132.py --version
2.11.0 --dry-run` lists the expected wheels and prints the planned
uploads without making any S3/R2 calls; output includes a `+ Removed
_check_cuda_version() call from torchaudio/_extension/__init__.py` line
for each wheel.
- [ ] After a real run, `unzip -p torchaudio-2.11.0+cu132-...whl
torchaudio/_extension/__init__.py | grep _check_cuda_version` shows only
the `from .utils import _check_cuda_version` import line, and no bare
`_check_cuda_version()` call.
- [ ] `python s3_management/manage_v2.py whl/test` regenerates the cu132
index and the new wheels appear at
https://download.pytorch.org/whl/test/cu132/torchaudio.
- [ ] `pip install --index-url
https://download.pytorch.org/whl/test/cu132 torch
torchaudio==2.11.0+cu132 && python -c "import torchaudio"` succeeds with
no `RuntimeError` about CUDA version mismatch.1 parent 35633f8 commit 157a448
1 file changed
Lines changed: 85 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
| |||
177 | 197 | | |
178 | 198 | | |
179 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
180 | 264 | | |
181 | 265 | | |
182 | 266 | | |
| |||
0 commit comments