Skip to content

trunk/8b1669de682002c609304d062b26f4bc059d4372

@twthighd twthighd tagged this 24 Aug 05:01
## Summary

Add `hw_classification = HardwareClassification.GENERIC` to all 17 `TestCase` subclasses in `test_store.py`, following the convention that every `TestCase` subclass carries a hardware classification label.

## Changes

- **`test/distributed/test_store.py`**:
  - Imported `HardwareClassification` from `torch.testing._internal.common_utils`.
  - Labeled all 17 `TestCase` subclasses with `hw_classification = HardwareClassification.GENERIC`: `FileStoreTest`, `HashStoreTest`, `PrefixStoreTest`, `PrefixFileStoreTest`, `TCPStoreTest`, `LibUvTCPStoreTest`, `PrefixTCPStoreTest`, `PythonStoreTest`, `RendezvousTest`, `RendezvousEnvTest`, `RendezvousFileTest`, `RendezvousTCPTest`, `TestPythonStore`, `TestMultiThreadedWait`, `TimeoutTest`, `InitPgWithNonUvStore`, `TestClientProtocol`.
  - Three non-`TestCase` classes (`StoreTestBase` mixin, `MyPythonStore`, `DummyStore`, all subclassing `dist.Store`) are not labeled.

## Motivation

These classes exercise Store and Rendezvous protocols (FileStore, HashStore, TCPStore, PrefixStore, PythonStore, `dist.rendezvous` over file/tcp/env) — set/get/wait/append/queue/multi_set/multi_get/barrier/timeout on the host/CPU side, with no accelerator dependency. They classify as `GENERIC` (device-agnostic). An unclassified class is silently dropped when `--hw-classification GENERIC ACCELERATOR` is passed, so labeling them ensures they are correctly selected under hardware-classification filtering.

## Test Plan

- Verified on an accelerator backend (8 devices) that the labels do not change runtime behavior — results are identical to the unmodified baseline:

  ```bash
  python test/distributed/test_store.py -v
  ```

  Output: `Ran 138 tests / FAILED (errors=3, skipped=12)`. 135 tests pass. The 12 skips are `Store does not support queues` (runtime capability probe in `StoreTestBase._create_store_or_skip_if_no_queues` — `FileStore`/`PrefixFileStore`/`TCPStore` do not implement the queue API; this is expected and orthogonal to classification). The 3 errors are `rpc.init_rpc` failures from the verify host's backend being registered first in `BackendType` with a `construct_rpc_backend_options_handler` signature incompatible with the standard call convention — this is a verify-host RPC backend defect, not a Store test issue, and is unchanged by the labels.

## Notes

- This is part of the test case refactoring initiative tracked in #185590.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/192036
Approved by: https://github.com/wjlFlyer, https://github.com/fffrog, https://github.com/albanD
Assets 2
Loading