Refactor: bind the a2a3 hbg dep_gen test to its own output dir - #2132
Merged
Conversation
|
Warning Review limit reachedNext included review available in 42 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Both test classes located this invocation's output directory by comparing mtime against a second-granularity marker taken before the run. That comparison floors to whole seconds, so a leftover directory from an earlier run in the same second also matches — and a run that emitted nothing then silently validated that stale deps.json instead of failing. The case has accumulated 32 such directories on this box, so the leftovers are not hypothetical. Identify the directory by set difference against a pre-run snapshot: only a directory this invocation created can be in it, and an empty difference is the assertion failure it should always have been. This is the pattern hw-native-sys#2082 introduced on the a5 side of the same test; the a2a3 copy is what was left behind, so the two halves of one test now read the same. `import time` goes with the marker.
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.
Summary
Both classes in the a2a3
host_build_graphdep_gen test located this invocation's output directory by comparingst_mtimeagainst a second-granularity marker taken before the run:Two problems, one shape: the floor to whole seconds means a leftover directory from an earlier run in the same second also matches, and a run that emitted nothing then silently validated that stale
deps.jsonrather than failing. The case has accumulated 32 such directories on this dev box, so the leftovers are not hypothetical — only the collision window is narrow.Identify the directory by set difference against a pre-run snapshot instead: only a directory this invocation created can appear in it, and an empty difference is the assertion failure it should always have been.
This is exactly the pattern #2082 introduced on the a5 side of the same test. The a2a3 copy is what was left behind, so the two halves of one test now read the same.
import timegoes with the marker.Follow-up to #2126 / #2082; no production code changes.
Testing
The point of the change is an assertion that must fire where the old one did not, so it was checked directly rather than only by the suite going green. Passing the current directory set as
dirs_before_runmodels "this run emitted nothing":So it refuses an empty run and still accepts a genuine fresh directory. Under the old mtime logic the first case passed on stale data.
tests/st/a2a3/host_build_graph/dfx/dep_gen/ona2a3sim— 2 passedtask-submit): all 7 channels,ONBOARD_DFX_RC=0a2a3simsweep — 44 passed; the one failure (TestSpmdPagedAttentionHighPerf::b4_h32_kv8_s512_bs128_fp16,max_diff=0.0625) is pre-existing andmanual-only, reproduced identically on a clean base build, so the per-PR lane deselects it