Repository navigation
bench(gate): sample data placement across simulation layouts - #287
Merged
Merged
Conversation
The gate's simulated cache metrics are a median over layouts that differed only in `-C metadata`, which reorders functions but leaves data where the linker puts it. construction_first_fit's data-L1 misses depend on that placement: on v0.31.4, 896 bytes of unused read-only data moved them -15.4% on one layout and +0.5% on another, so any change that shifts data could fail or pass the 5% budget by placement alone (main against v0.31.4 failed it at +5.6% with identical instructions and allocations). Each layout now also compiles a read-only pad of (layout * 1984) mod 4096 bytes into the bench (SOLVERFORGE_BENCH_DATA_PAD), the same on both sides, so the layouts sample code and data placement. Across 21 such placements construction_first_fit's misses spread 3.9%; two identical-code sides' medians differed by more than 5.6% in 5% of resamples over 5 placements and by more than 2.5% over 21, so that case is built in FIRST_FIT_SIM_LAYOUTS (21) layouts. The extra layouts only feed the simulation; the budget, the graded metrics and the pass rule are unchanged. Checked on construction_first_fit with 21 layouts per side: - A/A (HEAD vs HEAD), twice: sim_d1_misses -1.43% and -1.25%, passed. - Planted regression (24 cache lines touched per first-fit solve): sim_d1_misses +27.46% and sim_ll_misses +28.17% failed with sim_instructions -0.05% and instructions +0.01%. - 21 placements, main 29d7770 vs v0.31.4: median sim_d1_misses -1.1%.
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.
bench(gate): sample data placement across simulation layouts
The gate's simulated cache metrics are a median over layouts that differed
only in
-C metadata, which reorders functions but leaves data where thelinker puts it. construction_first_fit's data-L1 misses depend on that
placement: on v0.31.4, 896 bytes of unused read-only data moved them -15.4%
on one layout and +0.5% on another, so any change that shifts data could
fail or pass the 5% budget by placement alone (main against v0.31.4 failed
it at +5.6% with identical instructions and allocations).
Each layout now also compiles a read-only pad of (layout * 1984) mod 4096
bytes into the bench (SOLVERFORGE_BENCH_DATA_PAD), the same on both sides,
so the layouts sample code and data placement. Across 21 such placements
construction_first_fit's misses spread 3.9%; two identical-code sides'
medians differed by more than 5.6% in 5% of resamples over 5 placements and
by more than 2.5% over 21, so that case is built in FIRST_FIT_SIM_LAYOUTS
(21) layouts. The extra layouts only feed the simulation; the budget, the
graded metrics and the pass rule are unchanged.
Checked on construction_first_fit with 21 layouts per side:
sim_d1_misses +27.46% and sim_ll_misses +28.17% failed with
sim_instructions -0.05% and instructions +0.01%.