mirror of
https://github.com/pytorch/pytorch.git
synced 2026-10-28 18:56:51 +08:00
## Summary Add `HardwareClassification` label to `test/quantization/bc/test_backward_compatibility.py`. ## Changes - Add `hw_classification = HardwareClassification.GENERIC` to `TestSerialization` - Add `HardwareClassification` to `common_utils` import ## Rationale This test file verifies backward compatibility for quantization module serialization (loading previously saved models, comparing outputs). All 19 test methods run on CPU with quantization engines (FBGEMM/QNNPACK) — no device parametrization, no `instantiate_device_type_tests`, no hardware accelerator dependency. Classified as `GENERIC` per `HardwareClassification` spec. The `@override_qengines`, `@skipIfNoFBGEMM`, and `@unittest.skipIf(IS_AVX512_VNNI_SUPPORTED, ...)` decorators are quantization engine / CPU instruction set checks, not device gates — preserved as-is. ## Test Verified: `python -m pytest test/quantization/bc/test_backward_compatibility.py -v` — all tests pass. Pull Request resolved: https://github.com/pytorch/pytorch/pull/197794 Approved by: https://github.com/xuyun44, https://github.com/fffrog