-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Description:
Implement Phase 1 of the test suite optimization plan from #354 and #353 to reduce CI time by 30% (210 min → 147 min).
Background
Analysis in PR ==#354 identified that we're testing EVERY parameter combination on ALL 4 rank configs (1,2,4,8), which is wasteful. Multi-rank validation IS needed for symmetric heap allocation, but can be done with targeted tests rather than full parametrization.
Scope: Phase 1 - Targeted Multi-Rank Testing
Goal: Add pytest markers to distinguish tests that need multi-rank validation from those that don't.
Changes needed:
-
Add new pytest markers in
pytest.ini:@pytest.mark.single_rank- Tests validating tensor properties (shape, dtype, values) - run on 1 rank only@pytest.mark.multi_rank_required- Tests validating distributed behavior (symmetric heap visibility, cross-rank operations) - run on all ranks
-
Update CI workflow (
.github/workflows/test.yml):- Run
single_ranktests only onnranks=1 - Run
multi_rank_requiredtests on all rank configs - Run unmarked tests on all rank configs (for backward compatibility)
- Run
-
Add markers to existing tests:
- Mark ~200 tests as
multi_rank_required(tests that validate symmetric heap allocation, cross-rank visibility, distributed initialization) - Mark ~530K tests as
single_rank(tensor property tests: zeros, ones, empty, full, rand, etc.)
- Mark ~200 tests as
-
Create automated marker assignment script to help with the migration
Expected impact:
- CI time: 210 min → 147 min (30% reduction)
- Test count: Unchanged (530,877)
- Multi-rank test runs: 6.37M → 3.98M (37.5% reduction)
Reference: See FINAL_OPTIMIZATION_RECOMMENDATIONS.md in PR #354 for complete analysis and implementation details.