[Test] Refactor test_optim to improve test reuse and add `HardwareClassification` labels (#192741)
Change | Detail -- | -- Remove onlyCPU import | Line 28 — no longer needed Add HardwareClassification import | In common_utils block (alphabetical) Add hw_classification | HardwareClassification.ACCELERATOR on TestOptimRenewed Remove @onlyCPU × 2 | test_optim_infos_do_not_specify_global_cliquey_kwargs (metadata inspection) and test_step_with_empty_param_group (device-agnostic) Enlarge @onlyCUDA → @onlyAccelerator | test_defaults_changed_to_foreach (mock-based, no Category C API) --- Generated by my agent Pull Request resolved: https://github.com/pytorch/pytorch/pull/192741 Approved by: https://github.com/can-gaa-hou, https://github.com/fffrog, https://github.com/janeyx99
K
KarhouTam committed
7800342457b6c0e67193ae41fd0e997fc37d176a
Parent: 4287565
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com>
on 8/23/2026, 4:13:31 PM