Skip to content

Implement test suite optimization #355

@mawad-amd

Description

@mawad-amd

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:

  1. 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
  2. Update CI workflow (.github/workflows/test.yml):

    • Run single_rank tests only on nranks=1
    • Run multi_rank_required tests on all rank configs
    • Run unmarked tests on all rank configs (for backward compatibility)
  3. 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.)
  4. 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.

Metadata

Metadata

Labels

irisIris project issuetestUnit/integration test related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions