You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
This diff adds explicit `__hash__` and `__eq__` methods to custom objects in the torchrec planner that previously relied on Python's default object identity-based hashing.
1. **DeviceHardware** (fbcode/torchrec/distributed/planner/types.py):
- Hash based on rank, storage, and perf fields
- Equality checks all three fields
2. **BasicCommsBandwidths** (fbcode/torchrec/distributed/planner/types.py):
- Hash based on inter_host_bw and intra_host_bw
- Equality checks both bandwidth values
Reviewed By: iamzainhuda
Differential Revision: D85731424
0 commit comments