diff --git a/tests/attention/test_gqa_decode_opt2.py b/tests/attention/test_gqa_decode_opt2.py index 459b228..9314cda 100644 --- a/tests/attention/test_gqa_decode_opt2.py +++ b/tests/attention/test_gqa_decode_opt2.py @@ -97,12 +97,20 @@ def test_opt3_dispatch_exceeds_opt2_by_2x(): def test_dispatch_ratio_R_sensitivity(): - """ADR-0064 Test #9 — opt2 < opt3 across the queue-bandwidth range.""" - for R in (0.25, 0.0625, 0.03125): + """ADR-0064 Test #9 — opt2 < opt3 across the queue-bandwidth range, and + the opt3/opt2 ratio increases as R decreases (the cost becomes more + FIXED-dominated, i.e. command-count-driven). Absolute ratio values are + informative only; the gate is the direction + opt2 < opt3.""" + ratios = [] + for R in (0.25, 0.0625, 0.03125): # strictly decreasing R cm = PeCostModel(fixed_per_cmd_cycles=40, byte_cycles_recip=R) opt3 = _dispatch_cycles(_opt3_tile, cm) opt2 = _dispatch_cycles(_opt2_tile, cm) assert opt2 < opt3, f"R={R}: opt2={opt2} !< opt3={opt3}" + ratios.append(opt3 / opt2) + assert ratios[0] < ratios[1] < ratios[2], ( + f"opt3/opt2 ratio must increase as R decreases; got {ratios}" + ) # ── K-before-V DMA priority (ADR-0065 Test #3) ───────────────────────