Skip to content

ci: reorganize test shards + restore missing example_inference coverage - #69

Merged
jiahy0825 merged 7 commits into
mainfrom
fix/ci-shard-coverage
Sep 4, 2026
Merged

ci: reorganize test shards + restore missing example_inference coverage#69
jiahy0825 merged 7 commits into
mainfrom
fix/ci-shard-coverage

Conversation

@cennn

@cennn cennn commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Motivation

PR #68 split CI into 8 parallel shards with manually-enumerated paths. Two problems:

  • tests/example_inference/ was silently dropped — no shard included it.
  • api_tests was split across two shards (api-core listed 3 files individually + api-custom-op for 1 file), making the mapping fragile and hard to maintain.

Changes

  1. Reorganize shards: merge api-core + api-custom-op into a single api shard (tests/api_tests/); split out a new model shard (tests/model_tests/ + tests/example_inference/). This eliminates per-file enumeration — adding a new test file under api_tests/ or model_tests/ is automatically picked up.

  2. nvidia-smi fallback: if nvidia-smi fails, fall back to CUDA_VISIBLE_DEVICES=0,1 instead of setting it to empty (which makes zero GPUs visible).

Other

  • Add a coverage guard comment listing all 7 test directories, so future contributors know to update shards when adding new dirs.
  • Replace __import__("os") hack with standard import os.

- Add tests/example_inference/ to api-core shard (was silently dropped)
- Add coverage guard comment listing all covered test directories
- Add nvidia-smi fallback to prevent empty CUDA_VISIBLE_DEVICES
- Clean up __import__(os) style in env check
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
Prior tests in the feature-runtime shard leave residual autograd
compilation state that causes an extra cache miss. Adding
torch._dynamo.reset() in the fixture ensures a clean slate.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
…tion

With torch._dynamo.reset() ensuring each test starts from a clean state,
the cold-start compilation of the 32-layer transformer model produces
autograd_miss=2 (forward + backward graphs). Update expected values to
match this isolated behavior.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 2, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 2, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 4, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 4, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 4, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 4, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 4, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 4, 2026
- Merge api-core + api-custom-op into single api shard (tests/api_tests/)
- New model shard for tests/model_tests/ + tests/example_inference/
- Revert flaky timing tolerance change (keep original 1.2x)
@cennn cennn added the ci:run Trigger CI integration tests label Sep 4, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 4, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 4, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 4, 2026
@cennn cennn changed the title [WIP] fix(ci): add missing example_inference shard + nvidia-smi fallback [WIP] ci: reorganize test shards + add missing example_inference coverage Sep 4, 2026
@cennn cennn changed the title [WIP] ci: reorganize test shards + add missing example_inference coverage [WIP] ci: reorganize test shards + restore missing example_inference coverage Sep 4, 2026
@cennn cennn changed the title [WIP] ci: reorganize test shards + restore missing example_inference coverage ci: reorganize test shards + restore missing example_inference coverage Sep 4, 2026

@jiahy0825 jiahy0825 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiahy0825
jiahy0825 merged commit 14398cb into main Sep 4, 2026
24 checks passed
@jiahy0825
jiahy0825 deleted the fix/ci-shard-coverage branch September 4, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants