pytorch/torch/ao/quantization
albanD 058fb1790f Fix compilation and "import torch" issues for cpython 3.14 (#158184)
Beginning of process for 3.14 bringup.

State of things from this PR:
- Nothing too scary looking from the Dynamo CPython side, nothing we heavily rely on seems to be missing @williamwen42
- The existing check that makes torch.compile() nicely fail is working as expected. So all these empty functions shouldn't cause any weirdness.
- The `__module__` update changes look suspicious, we should investigate what is the reason and impact of that, in particular for our public API checking @jbschlosser
- Leaving the weakref.py thread safety change as a follow up to keep this a bit simpler. I vendored the whole struct in the meantime FYI @ezyang

EDIT: The `__module__` change is even more cursed than I though due to changes to Union and Optional type where the `__module__` field cannot be changed anymore. See https://github.com/python/cpython/issues/132139 for details.
For now, I'm just skipping the `__module__` setting for 3.14 which will trip the public API checks. Will revisit once I have a final answer on the cpython issue.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/158184
Approved by: https://github.com/msaroufim
2025-07-15 05:06:55 +00:00
..
backend_config mypy 1.16.0 (#155821) 2025-06-14 18:18:43 +00:00
experimental [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
fx [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
pt2e [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
quantizer [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
__init__.py Fix compilation and "import torch" issues for cpython 3.14 (#158184) 2025-07-15 05:06:55 +00:00
_correct_bias.py [BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257) 2025-03-18 00:46:07 +00:00
_equalize.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
_learnable_fake_quantize.py mypy 1.16.0 (#155821) 2025-06-14 18:18:43 +00:00
fake_quantize.py mypy 1.16.0 (#155821) 2025-06-14 18:18:43 +00:00
fuse_modules.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
fuser_method_mappings.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
observer.py [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
pattern.md
qconfig_mapping.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
qconfig.py Fix compilation and "import torch" issues for cpython 3.14 (#158184) 2025-07-15 05:06:55 +00:00
quant_type.py
quantization_mappings.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
quantize_fx.py [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
quantize_jit.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
quantize_pt2e.py [BE][13/16] fix typos in torch/ (torch/ao/) (#156603) 2025-06-29 04:34:04 +00:00
quantize.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
stubs.py [BE][PYFMT] migrate PYFMT for torch/ao/ to ruff format (#148185) 2025-06-14 16:47:04 +00:00
utils.py Fix compilation and "import torch" issues for cpython 3.14 (#158184) 2025-07-15 05:06:55 +00:00