|
8 | 8 | "machine": "arm64", |
9 | 9 | "python_version": "3.13.12", |
10 | 10 | "mlx_version": "0.32.0", |
11 | | - "tilelang_version": "0.1.9+gitd669bcee" |
| 11 | + "tilelang_version": "0.1.9" |
12 | 12 | }, |
13 | 13 | "shape": { |
14 | | - "batch": 2, |
15 | | - "seq": 512, |
16 | | - "heads": 4, |
17 | | - "headdim": 32, |
| 14 | + "batch": 1, |
| 15 | + "seq": 2048, |
| 16 | + "heads": 112, |
| 17 | + "headdim": 64, |
18 | 18 | "state": 64, |
19 | | - "dtype": "float32" |
| 19 | + "dtype": "bfloat16" |
20 | 20 | }, |
21 | 21 | "path_b_status": { |
22 | 22 | "available": true, |
|
27 | 27 | "reason": "Path C TileLang DSL ready" |
28 | 28 | }, |
29 | 29 | "parity": { |
30 | | - "y_max_abs": 2.9802322387695312e-08, |
31 | | - "h_max_abs": 2.384185791015625e-07 |
| 30 | + "y_max_abs": 0.000244140625, |
| 31 | + "h_max_abs": 0.0009765625 |
32 | 32 | }, |
33 | 33 | "timings": { |
34 | 34 | "fwd_path_b": { |
35 | 35 | "label": "fwd_path_b", |
36 | | - "mean_ms": 1.1066609038971364, |
37 | | - "median_ms": 1.0936045437119901, |
38 | | - "min_ms": 1.044750097207725, |
39 | | - "max_ms": 1.2936670100316405, |
40 | | - "iters": 50, |
41 | | - "warmup": 5, |
| 36 | + "mean_ms": 5.522979200759437, |
| 37 | + "median_ms": 5.502729502040893, |
| 38 | + "min_ms": 5.456540995510295, |
| 39 | + "max_ms": 5.6501670042052865, |
| 40 | + "iters": 10, |
| 41 | + "warmup": 3, |
42 | 42 | "measurement": "paired_alternating" |
43 | 43 | }, |
44 | 44 | "fwd_path_c": { |
45 | 45 | "label": "fwd_path_c", |
46 | | - "mean_ms": 1.1934833158738911, |
47 | | - "median_ms": 1.1894790222868323, |
48 | | - "min_ms": 1.1205419432371855, |
49 | | - "max_ms": 1.3904999941587448, |
50 | | - "iters": 50, |
51 | | - "warmup": 5, |
| 46 | + "mean_ms": 4.618183099955786, |
| 47 | + "median_ms": 4.619500003173016, |
| 48 | + "min_ms": 4.545582996797748, |
| 49 | + "max_ms": 4.678625002270564, |
| 50 | + "iters": 10, |
| 51 | + "warmup": 3, |
52 | 52 | "measurement": "paired_alternating" |
53 | 53 | }, |
54 | 54 | "fwd_bwd_path_b": { |
55 | 55 | "label": "fwd_bwd_path_b", |
56 | | - "mean_ms": 7.528950059786439, |
57 | | - "median_ms": 7.537187484558672, |
58 | | - "min_ms": 7.227167021483183, |
59 | | - "max_ms": 7.930250023491681, |
60 | | - "iters": 50, |
61 | | - "warmup": 5, |
| 56 | + "mean_ms": 75.87897090124898, |
| 57 | + "median_ms": 75.31389550422318, |
| 58 | + "min_ms": 74.12695899256505, |
| 59 | + "max_ms": 79.35158400505316, |
| 60 | + "iters": 10, |
| 61 | + "warmup": 3, |
62 | 62 | "measurement": "paired_alternating" |
63 | 63 | }, |
64 | 64 | "fwd_bwd_path_c": { |
65 | 65 | "label": "fwd_bwd_path_c", |
66 | | - "mean_ms": 11.153560862876475, |
67 | | - "median_ms": 11.149812547955662, |
68 | | - "min_ms": 10.769542073830962, |
69 | | - "max_ms": 11.691749910824, |
70 | | - "iters": 50, |
71 | | - "warmup": 5, |
| 66 | + "mean_ms": 81.04167500277981, |
| 67 | + "median_ms": 80.02666699758265, |
| 68 | + "min_ms": 76.515417007613, |
| 69 | + "max_ms": 84.50462500331923, |
| 70 | + "iters": 10, |
| 71 | + "warmup": 3, |
72 | 72 | "measurement": "paired_alternating" |
73 | 73 | }, |
74 | | - "bwd_path_b_median_ms": 6.443582940846682, |
75 | | - "bwd_path_c_median_ms": 9.96033352566883 |
| 74 | + "bwd_path_b_median_ms": 69.81116600218229, |
| 75 | + "bwd_path_c_median_ms": 75.40716699440964 |
76 | 76 | }, |
77 | 77 | "bwd_profile": { |
| 78 | + "generated_partial_kernel": { |
| 79 | + "label": "bwd_path_c_generated_partials", |
| 80 | + "mean_ms": 71.74030839523766, |
| 81 | + "median_ms": 71.4143749937648, |
| 82 | + "min_ms": 70.90587499260437, |
| 83 | + "max_ms": 72.96049999422394, |
| 84 | + "iters": 10, |
| 85 | + "warmup": 3 |
| 86 | + }, |
78 | 87 | "simd_p_reduce_kernel": { |
79 | | - "label": "bwd_path_c_simd_p_reduce", |
80 | | - "mean_ms": 9.195864284411073, |
81 | | - "median_ms": 9.17252094950527, |
82 | | - "min_ms": 9.00504202581942, |
83 | | - "max_ms": 9.53387503977865, |
84 | | - "iters": 50, |
85 | | - "warmup": 5 |
| 88 | + "label": "bwd_path_c_simd_p_reduce_diagnostic", |
| 89 | + "mean_ms": 92.45353759761201, |
| 90 | + "median_ms": 92.33262499037664, |
| 91 | + "min_ms": 91.85583400540054, |
| 92 | + "max_ms": 93.4950830123853, |
| 93 | + "iters": 10, |
| 94 | + "warmup": 3 |
86 | 95 | } |
87 | 96 | }, |
88 | 97 | "gflops": { |
89 | | - "fwd_path_b": 39.5515547632831, |
90 | | - "fwd_path_c": 36.363617339667336, |
91 | | - "fwd_bwd_path_b": 22.954854228378085, |
92 | | - "fwd_bwd_path_c": 15.517304820673656 |
| 98 | + "fwd_path_b": 880.3669375722112, |
| 99 | + "fwd_path_c": 1048.6894938137225, |
| 100 | + "fwd_bwd_path_b": 257.2922878343666, |
| 101 | + "fwd_bwd_path_c": 242.14034155121487 |
93 | 102 | }, |
94 | 103 | "memory_bytes_peak": { |
95 | | - "fwd_path_b": 5013536, |
96 | | - "fwd_path_c": 5013536, |
97 | | - "fwd_bwd_path_b": 111543876, |
98 | | - "fwd_bwd_path_c": 43450980 |
| 104 | + "fwd_path_b": 509215408, |
| 105 | + "fwd_path_c": 210108656, |
| 106 | + "fwd_bwd_path_b": 12643240030, |
| 107 | + "fwd_bwd_path_c": 12049613984 |
99 | 108 | }, |
100 | 109 | "strict_policy": { |
101 | 110 | "phase": "fwd", |
|
106 | 115 | }, |
107 | 116 | "scheduler_decision": { |
108 | 117 | "source": "rule_z3_test_receipt", |
109 | | - "mode": "path_b", |
110 | | - "selected_forward_kernel": "metal_kernel_fwd_v1", |
| 118 | + "mode": "path_c_fwd_path_b_bwd", |
| 119 | + "selected_forward_kernel": "path_c_tilelang_dsl", |
111 | 120 | "selected_backward_kernel": "metal_kernel_bwd_v1", |
112 | 121 | "rule_z3_plan": { |
113 | | - "batch": 2, |
114 | | - "seq": 512, |
115 | | - "heads": 4, |
116 | | - "headdim": 32, |
| 122 | + "batch": 1, |
| 123 | + "seq": 2048, |
| 124 | + "heads": 112, |
| 125 | + "headdim": 64, |
117 | 126 | "state": 64, |
118 | | - "dtype": "float32", |
119 | | - "lanes": 256, |
| 127 | + "dtype": "bfloat16", |
| 128 | + "lanes": 7168, |
120 | 129 | "threads": 256, |
121 | | - "grid_blocks": 1, |
| 130 | + "grid_blocks": 28, |
122 | 131 | "fwd_path_c_candidate": true, |
123 | 132 | "bwd_path_c_candidate": true, |
124 | 133 | "mode": "path_c_fwd_bwd", |
125 | 134 | "z3_used": true, |
126 | 135 | "z3_proved": true, |
127 | | - "reason": "rule: fp32-accumulating float32 per-lane scan with 256 threads over 1 blocks; z3 proved per-lane index decomposition and buffer bounds; bwd reverse pass consumes explicit state snapshot tensor boundaries instead of inverse h_prev reconstruction; bwd emits TileLang thread_allreduce_sum over P-axis grads" |
| 136 | + "reason": "rule: fp32-accumulating bfloat16 per-lane scan with 256 threads over 28 blocks; z3 proved per-lane index decomposition and buffer bounds; bwd reverse pass consumes explicit state snapshot tensor boundaries instead of inverse h_prev reconstruction; bwd emits TileLang per-lane partial gradients and reduces P-axis outside the hot scan kernel" |
128 | 137 | }, |
129 | 138 | "ratios": { |
130 | | - "fwd_path_c_over_path_b": 1.0876683250139199, |
131 | | - "bwd_path_c_over_path_b": 1.5457756371116176, |
132 | | - "fwd_bwd_path_c_over_path_b": 1.4793067799889712 |
| 139 | + "fwd_path_c_over_path_b": 0.8394924739549167, |
| 140 | + "bwd_path_c_over_path_b": 1.08015911082265, |
| 141 | + "fwd_bwd_path_c_over_path_b": 1.0625750595133563 |
133 | 142 | }, |
134 | 143 | "optimization_policy": "AUTO only promotes a Path C phase when the rule/Z3 plan is safe and paired bench receipt median is no-worse than Path B.", |
135 | 144 | "blocked_path_c_codegen_gaps": [ |
136 | 145 | "lowered Path C fwd still recomputes some lane-derived indices inside the t loop", |
137 | 146 | "Path C bwd still performs the reverse recurrence serially over T and N per lane", |
138 | | - "unsupported bwd reduction shapes now fail closed until semantic reduction lowering covers them" |
| 147 | + "final-gradient in-kernel P-axis allreduce remains diagnostic only for recurrent bwd hot loops" |
139 | 148 | ], |
140 | 149 | "remembered_optimizations": [ |
141 | 150 | "TileLang local.var scalar y_acc instead of thread float[1]", |
142 | 151 | "TileLang Metal local.var PrintExpr statement-order fix", |
143 | 152 | "Bench harness uses paired alternating samples to avoid order/warmup drift", |
144 | 153 | "Path C bwd consumes explicit state snapshot boundaries instead of unsafe inverse-state reconstruction", |
145 | | - "Path C bwd uses TileLang thread_allreduce P-axis reductions instead of public dB/dC partial buffers", |
146 | | - "Bench harness profiles the final-gradient SIMD/snapshot bwd route directly", |
| 154 | + "Path C bwd writes generated per-lane partial gradients and moves P-axis reductions outside the recurrent hot loop", |
| 155 | + "Bench harness profiles generated-partial production bwd and final-gradient SIMD diagnostic bwd separately", |
147 | 156 | "AUTO selects full Path C only when fwd, bwd, and fwd+bwd receipts are no-worse", |
148 | 157 | "AUTO can still select Path C forward with Path B backward when only fwd is no-worse" |
149 | 158 | ] |
150 | 159 | }, |
151 | | - "ratio_path_c_over_path_b_fwd": 1.0876683250139199, |
152 | | - "ratio_path_c_over_path_b_bwd": 1.5457756371116176, |
153 | | - "ratio_path_c_over_path_b_fwd_bwd": 1.4793067799889712, |
154 | | - "verdict": "Path C is >20% slower than Path B; recommend keeping Path B as primary, KEEPING Path C as a reproducibility artifact (proves the DSL path works), and flagging the perf gap as a future TileLang scheduler bug.", |
| 160 | + "ratio_path_c_over_path_b_fwd": 0.8394924739549167, |
| 161 | + "ratio_path_c_over_path_b_bwd": 1.08015911082265, |
| 162 | + "ratio_path_c_over_path_b_fwd_bwd": 1.0625750595133563, |
| 163 | + "verdict": "Path C forward is no-worse than Path B and is eligible for AUTO promotion, but Path C backward is slower; scheduler selects Path C forward with Path B backward.", |
155 | 164 | "matched_run_guard": "Compare Path B and Path C only when both rows were collected on the same hardware with identical kernel inputs. This is a local_only receipt." |
156 | 165 | } |
0 commit comments