Skip to content

v0.13.0

@vkuzo vkuzo tagged this 02 Sep 15:18
Summary:

`torch.__version__` has unexpected behavior when comparing to a string:

```python
(Pdb) torch.__version__
'2.9.0.dev20250902+cu128'
(Pdb) str(torch.__version__)
'2.9.0.dev20250902+cu128'
(Pdb) '2.9.0.dev20250902+cu128' >= '2.9'
True
(Pdb) torch.__version__ >= '2.9'
False
(Pdb) torch.__version__ >= (2, 9)
False
(Pdb) torch.__version__ >= (2, 9, 0)
False
(Pdb) str(torch.__version__) >= '2.9'
True
```

To unblock the release, for now compare `str(torch.__version__)` to
force the behavior we want for `torch==2.9.x`. We should make this
more robust, saving that for a future PR.

Test Plan:

```
1. install torchao 0.13.0 from pip
2. install torch 2.8.0, verify torchao imports without errors
3. isntall torch 2.9.x, verify torchao imports correctly and a warning
   for skipping c++ kernel import is shown
```

Reviewers:

Subscribers:

Tasks:

Tags:
Assets 2
Loading