diff --git a/docs/VALIDATION.md b/docs/VALIDATION.md index ebfb0b98d..11fe11979 100644 --- a/docs/VALIDATION.md +++ b/docs/VALIDATION.md @@ -361,9 +361,6 @@ alone, old then new, then new then old (A B B A). It fails only if the median of is past its limit too. A leg re-times at most 8 rows, the furthest over first; a row it does not re-time is judged by its one time. The pairs are kept as `harness-retime///` records, parked for the `time` rule. -The floors table is seeded from the old runtime's runs under an earlier harness, so a row within -its limit only because its floor there is over 1.10 is named on the leg's line ("passed on a -seeded floor > 1.10") until the table is measured again with this harness. Each row's GPU time on each runtime, the p50 over its timed runs of a run's first GPU start to its last GPU end, is recorded as `time harness-gpu-/` where the row has one. It is judged by nothing: the budget's lines show it beside the row's times, and it is parked for the diff --git a/scripts/matrix/floors.tsv b/scripts/matrix/floors.tsv index c05180561..e8fadb8d7 100644 --- a/scripts/matrix/floors.tsv +++ b/scripts/matrix/floors.tsv @@ -1,45 +1,47 @@ # The old runtime's own spread per harness row and GPU leg: the widest ratio between two of -# its runs of the row in one leg (old over old). results.HARNESS_FLOORS reads it; a row or -# leg missing here has a floor of 1. Seeded from old-runtime runs before the harness's -# warm-up before each timed row; measured again when the harness or the old runtime's -# build changes. -row 1002:15bf 1002:699f 1002:744c 10de:1e87 10de:2204 8086:3e9b 8086:a7a0 -alu 22.066 1.006 1.042 1.018 1.008 1.003 19.640 -bandwidth 1.002 1.006 1.011 1.013 1.017 1.002 1.192 -burst_160 1.139 1.013 1.047 1.008 1.156 1.308 1.013 -burst_160_shared 1.132 1.008 1.034 1.005 1.198 1.399 1.024 -burst_2000 1.013 1.005 1.028 1.004 1.007 1.305 1.013 -burst_2000x5 1.072 1.031 1.024 1.012 1.001 1.255 1.027 -constant_managed 1.006 1.072 1.022 1.018 1.016 1.001 12.525 -constant_private 1.010 1.033 1.028 1.229 1.027 1.001 16.087 -constexpr_sampling 1.002 1.107 1.015 1.002 1.007 1.004 1.103 -create_1MiB 1.025 1.091 1.020 1.069 1.065 1.103 1.003 -create_1MiB/first_take 1.058 1.030 1.173 1.038 1.075 1.053 1.066 -create_1MiB/next_take 1.064 1.033 1.027 1.051 1.446 1.074 1.209 -create_4KiB 1.050 1.038 1.036 1.018 1.036 1.091 1.046 -create_4KiB/first_take 1.139 1.712 1.175 1.347 1.053 1.142 1.114 -create_4KiB/next_take 1.298 2.572 1.343 1.370 1.100 1.200 1.218 -create_64MiB 1.003 1.004 1.000 1.001 1.003 1.043 1.034 -create_64MiB/first_take 1.008 1.022 1.003 1.024 1.681 1.175 1.126 -create_64MiB/next_take 1.011 1.024 1.005 1.040 1.056 1.061 1.054 -create_private_16MiB 1.074 1.010 1.115 1.022 1.763 1.041 1.116 -create_private_16MiB/first_take 1.128 1.284 1.307 1.506 1.278 1.022 1.158 -create_private_16MiB/next_take 1.141 1.440 2.341 1.063 1.163 1.017 1.111 -create_render_state 1.019 1.023 1.020 1.027 1.028 1.062 1.008 -create_render_state/first 1.347 1.333 1.443 1.177 1.076 2.506 1.114 -create_state 1.042 1.029 1.042 1.008 1.038 1.056 1.025 -create_state/first 1.297 1.254 1.110 1.074 1.056 2.819 1.415 -dispatch_chain 1.044 1.007 1.003 1.020 1.008 1.001 1.021 -frame 1.173 1.128 1.117 1.102 1.831 1.292 2.055 -frame_5cb 1.604 1.542 1.058 1.142 1.161 1.145 1.761 -image_filter 23.099 1.023 1.017 1.022 1.316 1.013 1.053 -long_4cb 1.004 1.000 1.005 1.006 1.004 1.001 1.001 -narrow_ints 1.009 1.039 1.285 1.019 1.003 1.001 73.445 -sampling 1.004 1.033 1.306 1.031 1.007 1.003 3.587 -simd_reduce 1.001 1.034 1.082 1.019 1.003 1.022 1.187 -texture_read 1.003 1.011 1.010 1.013 1.024 1.015 1.173 -threadgroup_scan 1.018 1.017 2.935 1.003 1.025 1.002 1.084 -vote_loop 1.002 1.009 1.028 1.003 1.003 1.001 1.150 -waves 1.003 1.018 1.002 19.756 1.003 1.006 9.159 -wide_bindings 1.014 1.030 1.029 1.018 1.017 1.066 1.018 -zero_products 1.005 1.011 1.027 1.009 1.024 1.001 76.539 +# its runs of the row in one leg (old over old), the largest of its 4 times over the smallest. +# results.HARNESS_FLOORS reads it; a row or leg missing here has a floor of 1. Measured with the +# harness of 4cc7963005 (a row's time the lowest mean of its windows of 10 timed runs), 4 runs of +# `harness --runtime old` per leg in the order A B B A, each its own process with a fresh driver +# shader cache and store, a sized row at the first run's size; measured again when the harness +# or the old runtime's build changes. +row 1002:15bf 1002:699f 1002:744c 10de:1e87 10de:2204 8086:3e9b 8086:a7a0 +alu 1.022 1.002 1.064 1.007 1.055 1.007 1.006 +bandwidth 1.005 1.008 1.028 1.003 1.010 1.022 1.016 +burst_160 1.024 1.021 1.045 1.009 1.145 1.342 1.023 +burst_160_shared 1.028 1.014 1.026 1.006 1.021 1.402 1.036 +burst_2000 1.016 1.010 1.034 1.003 1.002 1.301 1.028 +burst_2000x5 1.010 1.045 1.028 1.033 1.019 1.063 1.017 +constant_managed 1.010 1.033 1.039 1.010 1.014 1.001 1.001 +constant_private 1.011 1.051 1.034 1.257 1.015 1.001 1.006 +constexpr_sampling 1.012 1.014 1.217 1.014 1.032 1.007 1.014 +create_1MiB 1.037 1.070 1.008 1.041 1.069 1.047 1.003 +create_1MiB/first_take 1.121 1.081 1.063 1.036 1.051 1.203 1.064 +create_1MiB/next_take 1.030 1.076 1.032 1.079 1.539 2.287 1.174 +create_4KiB 1.037 1.062 1.074 1.031 1.016 1.127 1.031 +create_4KiB/first_take 1.316 1.420 1.207 1.260 2.168 1.209 1.330 +create_4KiB/next_take 1.515 1.794 1.247 1.475 1.042 5.500 1.811 +create_64MiB 1.007 1.007 1.001 1.001 1.043 1.080 1.030 +create_64MiB/first_take 1.011 1.026 1.111 1.018 1.060 1.117 1.167 +create_64MiB/next_take 1.019 1.076 1.270 1.019 1.523 1.030 1.040 +create_private_16MiB 1.011 1.066 1.053 1.077 1.125 1.122 1.097 +create_private_16MiB/first_take 1.111 1.162 1.252 1.050 1.862 1.065 1.102 +create_private_16MiB/next_take 4.712 1.661 1.954 1.060 1.151 1.093 1.169 +create_render_state 1.034 1.132 1.041 1.020 1.042 1.066 1.023 +create_render_state/first 1.160 1.215 1.487 1.132 1.148 2.184 1.140 +create_state 1.033 1.089 1.077 1.047 1.044 1.052 1.008 +create_state/first 1.231 1.153 1.182 1.139 1.012 3.714 1.095 +dispatch_chain 1.023 1.010 1.041 1.016 1.003 1.004 1.010 +frame 1.117 1.134 1.011 1.038 1.589 1.120 2.207 +frame_5cb 1.016 1.062 1.362 1.105 1.204 1.272 1.290 +image_filter 1.004 1.005 1.195 1.019 1.016 1.015 1.005 +long_4cb 1.007 1.003 1.012 1.008 1.005 1.001 1.001 +narrow_ints 1.002 1.014 1.017 1.010 1.017 1.000 1.007 +sampling 1.025 1.011 1.160 1.013 1.006 1.031 1.022 +simd_reduce 1.011 1.015 1.283 1.016 1.023 1.024 1.027 +texture_read 1.058 1.007 1.019 1.007 1.037 1.037 1.021 +threadgroup_scan 1.007 1.008 1.102 1.012 1.003 1.008 1.005 +vote_loop 1.005 1.011 1.014 1.018 1.033 1.004 1.008 +waves 1.017 1.006 1.012 1.015 1.005 1.002 1.009 +wide_bindings 1.007 1.040 1.031 1.014 1.021 1.052 1.017 +zero_products 1.003 1.002 1.023 1.008 1.021 1.000 1.002 diff --git a/scripts/matrix/results.py b/scripts/matrix/results.py index 193aad43b..10198af1a 100644 --- a/scripts/matrix/results.py +++ b/scripts/matrix/results.py @@ -357,11 +357,6 @@ def read_floors(text): #: runtime's. The table is measured again when the harness or the old runtime's build changes; a #: row or leg it does not list has a floor of 1. HARNESS_FLOORS = read_floors((Path(__file__).resolve().parent / "floors.tsv").read_text()) -#: The floors table is seeded from the old runtime's runs under an earlier harness, so no row -#: closes on it: a row within its limit only because its floor is over this is named on its leg's -#: line (seeded_floor). The table measured again with this harness replaces the seed and deletes -#: this. -SEEDED_FLOOR_OPEN = 1.10 def row_limit(leg_id, row): @@ -382,17 +377,6 @@ def past_limit(leg_id, row): return f"past its {name} {value} with its allowance, {row_limit(leg_id, row):.3f}" -def seeded_floor(leg_id, row, ratio): - """How a line names ROW passing on LEG_ID at RATIO only on a seeded floor over - SEEDED_FLOOR_OPEN (within its limit, past HARNESS_BUDGET times its ceiling or the budget - alone), or nothing.""" - floor = HARNESS_FLOORS.get(leg_id, {}).get(row, 1.0) - ceiling = HARNESS_CEILINGS.get(leg_id, {}).get(row, 1.0) - if floor > SEEDED_FLOOR_OPEN and HARNESS_BUDGET * ceiling < ratio <= row_limit(leg_id, row): - return f", passed on a seeded floor > {SEEDED_FLOOR_OPEN:.2f}, its floor {floor}" - return "" - - #: The harness's creation rows, by the start of their names. A leg times them apart from the #: other rows (the matrix's harness_runs): each runtime's run of the others skips them, and they #: run alone after it, in FIRST_RUNS processes of their own, each on a fresh driver cache and @@ -532,18 +516,14 @@ def harness_budget(leg_id, leg): old, new = (statistics.median(values) for values in samples) line = (f"harness budget {row}: median of {FIRST_RUNS} processes, new {new:.1f} us over old " f"{old:.1f} us is {new / old:.3f}") - seeded = seeded_floor(leg_id, row, new / old) if new / old > limit: problems.append(f"{line}, {past_limit(leg_id, row)}") elif row in ceilings: - parked.append(f"{line}, its ceiling {ceilings[row]}{seeded}") - elif seeded: - parked.append(f"{line}{seeded}") + parked.append(f"{line}, its ceiling {ceilings[row]}") continue ratio = new / old line = (f"harness budget {row}: new {new:.1f} us{gpu_beside(times, 'new', row)} over old " f"{old:.1f} us{gpu_beside(times, 'old', row)} is {ratio:.3f}") - seeded = seeded_floor(leg_id, row, ratio) if ratio > limit: past = f"{line}, {past_limit(leg_id, row)}" ratios = retimed(times, row) @@ -556,13 +536,13 @@ def harness_budget(leg_id, leg): if median > limit: problems.append(pairs) else: - parked.append(f"{pairs}, within: judged by the median{seeded_floor(leg_id, row, median)}") - elif row in ceilings and ratio > HARNESS_BUDGET: - parked.append(f"{line}, its ceiling {ceilings[row]}{seeded}") - elif row in ceilings: + parked.append(f"{pairs}, within: judged by the median") + elif row not in ceilings: + continue + elif ratio > HARNESS_BUDGET: + parked.append(f"{line}, its ceiling {ceilings[row]}") + else: parked.append(f"{line}, within {HARNESS_BUDGET}: its ceiling {ceilings[row]} leaves the list") - elif seeded: - parked.append(f"{line}{seeded}") return problems, parked diff --git a/scripts/matrix/test_results.py b/scripts/matrix/test_results.py index 695b3609a..937c83c21 100644 --- a/scripts/matrix/test_results.py +++ b/scripts/matrix/test_results.py @@ -502,25 +502,6 @@ class HarnessBudgetTests(unittest.TestCase): results.RETIME_SELECT], input=lines, capture_output=True, text=True, check=True) self.assertEqual([line.split()[1] for line in run.stdout.splitlines()], ["frame"]) - def test_a_row_within_its_limit_only_on_a_seeded_floor_over_1_10_is_named(self): - floors = {"a": {"frame": 1.2, "alu": 1.2, "listed": 1.2, "narrow": 1.08}} - ceilings = {"a": {"listed": 1.1}} - times = {"harness-old/frame": 100.0, "harness-new/frame": 115.0, - "harness-old/alu": 100.0, "harness-new/alu": 102.0, - "harness-old/listed": 100.0, "harness-new/listed": 116.0, - "harness-old/narrow": 100.0, "harness-new/narrow": 110.0} - with mock.patch.object(results, "HARNESS_CEILINGS", ceilings), \ - mock.patch.object(results, "HARNESS_FLOORS", floors): - self.assertEqual(self.budget("a", times), ([], [ - "harness budget frame: new 115.0 us over old 100.0 us is 1.150, passed on a seeded floor " - "> 1.10, its floor 1.2", - "harness budget listed: new 116.0 us over old 100.0 us is 1.160, its ceiling 1.1, passed on a " - "seeded floor > 1.10, its floor 1.2"])) - # Within the budget, or within its ceiling's allowance, the floor decides nothing. - times["harness-new/listed"] = 113.0 - self.assertEqual(self.budget("a", times)[1][1], - "harness budget listed: new 113.0 us over old 100.0 us is 1.130, its ceiling 1.1") - def test_every_row_shows_its_times_and_gpu_times_on_both_runtimes(self): times = {"harness-old/frame": 100.0, "harness-new/frame": 120.0, "harness-gpu-old/frame": 80.25, "harness-gpu-new/frame": 81.0,