Commit bd74740
* Deprecate old TORCH_VERSION variables
**Summary:** This commit deprecates the following variables:
```
TORCH_VERSION_AT_LEAST_2_5
TORCH_VERSION_AT_LEAST_2_4
TORCH_VERSION_AT_LEAST_2_3
TORCH_VERSION_AT_LEAST_2_2
TORCH_VERSION_AFTER_2_5
TORCH_VERSION_AFTER_2_4
TORCH_VERSION_AFTER_2_3
TORCH_VERSION_AFTER_2_2
```
As of this commit, the latest released version of PyTorch is 2.8,
which means we can drop support for 2.5 and before since we only
support 3 of the latest releases.
The next commit will remove usages of all of these variables
from within torchao.
**Test Plan:**
```
python test/test_utils.py -k torch_version_deprecation
```
[ghstack-poisoned]
* Update on "Deprecate old TORCH_VERSION variables"
**Summary:** This commit deprecates the following variables:
```
TORCH_VERSION_AT_LEAST_2_5
TORCH_VERSION_AT_LEAST_2_4
TORCH_VERSION_AT_LEAST_2_3
TORCH_VERSION_AT_LEAST_2_2
TORCH_VERSION_AFTER_2_5
TORCH_VERSION_AFTER_2_4
TORCH_VERSION_AFTER_2_3
TORCH_VERSION_AFTER_2_2
```
As of this commit, the latest released version of PyTorch is 2.8,
which means we can drop support for 2.5 and before since we only
support 3 of the latest releases.
The next commit will remove usages of all of these variables
from within torchao.
**Test Plan:**
```
python test/test_utils.py -k torch_version_deprecation
```
[ghstack-poisoned]
* Drop support for PyTorch 2.5 and before
**Summary:** We gate on the PyTorch version throughout the repo.
Recently PyTorch 2.8 was released, so the oldest PyTorch version
we need to support is 2.6. After this commit, we assume the user
is running PyTorch 2.6+, and remove all references to the following
variables, which are deprecated.
```
TORCH_VERSION_AT_LEAST_2_6
TORCH_VERSION_AT_LEAST_2_5
TORCH_VERSION_AT_LEAST_2_4
TORCH_VERSION_AT_LEAST_2_3
TORCH_VERSION_AT_LEAST_2_2
TORCH_VERSION_AFTER_2_5
TORCH_VERSION_AFTER_2_4
TORCH_VERSION_AFTER_2_3
TORCH_VERSION_AFTER_2_2
```
**Test Plan:** CI
[ghstack-poisoned]
* Remove old `change_linear_weights_to_*` APIs
**Summary:** This commit removes these super old quantization
APIs that aren't even accessible by the user:
```
change_linear_weights_to_int8_dqtensors
change_linear_weights_to_int8_woqtensors
change_linear_weights_to_int4_woqtensors
```
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Remove old `change_linear_weights_to_*` APIs"
**Summary:** This commit removes these super old quantization
APIs that aren't even accessible by the user:
```
change_linear_weights_to_int8_dqtensors
change_linear_weights_to_int8_woqtensors
change_linear_weights_to_int4_woqtensors
```
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Remove old `change_linear_weights_to_*` APIs"
**Summary:** This commit removes these super old quantization
APIs that aren't even accessible by the user:
```
change_linear_weights_to_int8_dqtensors
change_linear_weights_to_int8_woqtensors
change_linear_weights_to_int4_woqtensors
```
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Remove old `change_linear_weights_to_*` APIs"
**Summary:** This commit removes these super old quantization
APIs that aren't even accessible by the user:
```
change_linear_weights_to_int8_dqtensors
change_linear_weights_to_int8_woqtensors
change_linear_weights_to_int4_woqtensors
```
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Remove old `change_linear_weights_to_*` APIs"
**Summary:** This commit removes these super old quantization
APIs that aren't even accessible by the user:
```
change_linear_weights_to_int8_dqtensors
change_linear_weights_to_int8_woqtensors
change_linear_weights_to_int4_woqtensors
```
**Test Plan:** CI
[ghstack-poisoned]
* Replace `export_for_training` with `torch.export.export`
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Replace `export_for_training` with `torch.export.export`"
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Replace `export_for_training` with `torch.export.export`"
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Replace `export_for_training` with `torch.export.export`"
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Replace `export_for_training` with `torch.export.export`"
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
* Update base for Update on "Replace `export_for_training` with `torch.export.export`"
**Summary:** Bypasses the following deprecation warning:
```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```
Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.
**Test Plan:** CI
[ghstack-poisoned]
1 parent 907db4c commit bd74740
File tree
23 files changed
+73
-104
lines changed- docs/source/tutorials_source
- examples
- sam2_amg_server
- sam2_vos_example
- test
- dtypes
- integration
- prototype/inductor
- quantization/pt2e
- torchao
- quantization/pt2e
- testing/pt2e
23 files changed
+73
-104
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
434 | 433 | | |
435 | 434 | | |
436 | 435 | | |
437 | | - | |
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
| |||
443 | 441 | | |
444 | 442 | | |
445 | 443 | | |
446 | | - | |
| 444 | + | |
447 | 445 | | |
448 | 446 | | |
449 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | | - | |
252 | 250 | | |
253 | 251 | | |
254 | 252 | | |
| |||
264 | 262 | | |
265 | 263 | | |
266 | 264 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 265 | + | |
270 | 266 | | |
271 | 267 | | |
272 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 245 | + | |
249 | 246 | | |
250 | 247 | | |
251 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
| 1956 | + | |
1959 | 1957 | | |
1960 | 1958 | | |
1961 | 1959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
| |||
199 | 197 | | |
200 | 198 | | |
201 | 199 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 200 | + | |
207 | 201 | | |
208 | 202 | | |
209 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 317 | + | |
322 | 318 | | |
323 | 319 | | |
324 | 320 | | |
| |||
576 | 572 | | |
577 | 573 | | |
578 | 574 | | |
579 | | - | |
| 575 | + | |
580 | 576 | | |
581 | 577 | | |
582 | 578 | | |
| |||
716 | 712 | | |
717 | 713 | | |
718 | 714 | | |
719 | | - | |
| 715 | + | |
720 | 716 | | |
721 | 717 | | |
722 | 718 | | |
| |||
1078 | 1074 | | |
1079 | 1075 | | |
1080 | 1076 | | |
1081 | | - | |
| 1077 | + | |
1082 | 1078 | | |
1083 | 1079 | | |
1084 | 1080 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments