ci: reorganize test shards + restore missing example_inference coverage - #69
Merged
Conversation
- 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
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.
…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.
- 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_testswas split across two shards (api-corelisted 3 files individually +api-custom-opfor 1 file), making the mapping fragile and hard to maintain.Changes
Reorganize shards: merge
api-core+api-custom-opinto a singleapishard (tests/api_tests/); split out a newmodelshard (tests/model_tests/+tests/example_inference/). This eliminates per-file enumeration — adding a new test file underapi_tests/ormodel_tests/is automatically picked up.nvidia-smi fallback: if
nvidia-smifails, fall back toCUDA_VISIBLE_DEVICES=0,1instead of setting it to empty (which makes zero GPUs visible).Other
__import__("os")hack with standardimport os.