Xenova HF Staff commited on
Commit
94aaaa3
·
verified ·
1 Parent(s): 0d00cf0

sync 6fdf6301e2bb

Browse files
README.md CHANGED
@@ -1,3 +1,94 @@
1
  ---
 
2
  license: apache-2.0
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: kernels
3
  license: apache-2.0
4
+ tags:
5
+ - kernel
6
+ - webgpu
7
+ - wgsl
8
  ---
9
+ # com.microsoft.EngramGate
10
+
11
+ `com.microsoft` · ONNX Runtime contrib operator · contrib since_version 1
12
+
13
+ ## Description
14
+
15
+ Fuses the Engram gate. For each `(batch, sequence, hc_mult)` row it RMS-normalizes `key` and `query` with their per-stream scales, forms `dot = sum(RMSNorm(key) * RMSNorm(query)) / sqrt(hidden_size)`, and writes `sigmoid(sign(dot) * sqrt(max(abs(dot), 1e-6))) * value`, broadcasting the value row shared by every hyper-connection. That `1e-6` floor is fixed and is not `epsilon`; a zero dot product gives a gate of exactly `0.5`. Both sums of squares and the scaled cross term accumulate in one float32 pass, and only the store narrows. Bfloat16 is not implemented.
16
+
17
+ See the [ONNX Runtime `EngramGate` contrib-operator spec](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.EngramGate) for the reference semantics.
18
+
19
+ ## Inputs
20
+
21
+ | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
22
+ | --- | --- | --- | --- | --- | --- | --- |
23
+ | `keyT` | `key` | `T` | `4` | — | Projected Engram keys with shape `(batch_size, sequence_length, hc_mult, hidden_size)`. | required |
24
+ | `queryT` | `query` | `T` | `4` | — | Hidden-state queries, exactly the same shape as `key`. The upstream kernels require equality rather than broadcasting, and so does this one. | required |
25
+ | `valueT` | `value` | `T` | `3` | — | Projected Engram value shared by every hyper-connection, with shape `(batch_size, sequence_length, hidden_size)`. Each row of it is gated `hc_mult` times, once per stream. | required |
26
+ | `keyNormScaleT` | `key_norm_scale` | `T` | `2` | — | RMSNorm scale for keys with shape `(hc_mult, hidden_size)`: one weight row per hyper-connection stream, selected by the row's stream index. | required |
27
+ | `queryNormScaleT` | `query_norm_scale` | `T` | `2` | — | RMSNorm scale for queries with shape `(hc_mult, hidden_size)`, indexed by the same stream index as the key scale. | required |
28
+
29
+ ## Outputs
30
+
31
+ | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
32
+ | --- | --- | --- | --- | --- | --- | --- |
33
+ | `outputT` | `output` | `T` | `4` | same as `keyT` | The gated value tensor, with the same shape and dtype as `key`. Every element of a row carries the same gate, so the row's stream index is only observable through the scale lookup. | required |
34
+
35
+ ## Attributes
36
+
37
+ Default values (overridable per request):
38
+
39
+ | Attribute | Default | Description |
40
+ | --- | --- | --- |
41
+ | `epsilon` | `0.00001` | Constant added to both mean-of-squares denominators before the reciprocal square root. It does not reach the gate: the `1e-6` floor under the square root is a separate fixed constant. |
42
+
43
+ ## Type constraints
44
+
45
+ | Variable | Allowed dtypes |
46
+ | --- | --- |
47
+ | `T` | `float32`, `float16` |
48
+
49
+ ## Implementation variants
50
+
51
+ One implementation is selected per call from the device capabilities, the request shapes and the dtypes; these notes say what each one covers.
52
+
53
+ - `subgroup_rows_vec4` — One aligned lane group per gated row inside a subgroup, with the row's value words held in registers across the fold. The three accumulators travel as one vector through a segmented butterfly over the low lane bits, so several rows share a subgroup with no workgroup memory and no barrier.
54
+ - `packed_rows_vec4` — Portable vec4 route: the workgroup is split into a power-of-two lane group per row and each group folds its own contiguous slice of one shared vector array, so a short row does not idle the workgroup and no subgroup support is required. It also carries rows too wide to stage in registers, which it walks twice.
55
+ - `subgroup_rows_scalar` — The barrier-free lane-group schedule for a hidden size that is not a multiple of four: the same segmented butterfly over scalar loads.
56
+ - `packed_rows_scalar` — Scalar fallback for a hidden size that is not a multiple of four, and the route every device can select. It keeps the lane-group-per-row schedule so a narrow row still fills the workgroup.
57
+
58
+ ## Device requirements
59
+
60
+ Some implementation variants require `subgroups`. These are route-specific capabilities, not package-wide requirements; availability also depends on the request shape and dtype.
61
+
62
+ ## Files
63
+
64
+ - [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)
65
+ - [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)
66
+ - [`test.json`](build/webgpu/test.json) — correctness cases
67
+ - [`bench.json`](build/webgpu/bench.json) — benchmark cases
68
+ - [`engram-gate-rows.wgsl.jinja`](build/webgpu/engram-gate-rows.wgsl.jinja)
69
+
70
+ ## Use with `@huggingface/kernels`
71
+
72
+ ```sh
73
+ npm install --save-exact @huggingface/kernels@0.0.1-preview.3
74
+ ```
75
+
76
+ Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
77
+
78
+ The `version: 1` option selects the published kernel contract; it is independent of any operator opset, contrib `since_version`, or model version.
79
+ It follows the `v1` branch as fixes land. To pin exact artifact bytes, pass a 40-character commit `revision` instead of `version`.
80
+
81
+ Replace each `*Data` placeholder with a typed array containing the corresponding input data.
82
+
83
+ ```js
84
+ import { getKernel } from "@huggingface/kernels";
85
+
86
+ const kernel = await getKernel("webgpu-kernels/com.microsoft.EngramGate", { version: 1 });
87
+ const { outputT } = await kernel({
88
+ keyT: { data: keyTData, shape: [1, 1, 1, 2] },
89
+ queryT: { data: queryTData, shape: [1, 1, 1, 2] },
90
+ valueT: { data: valueTData, shape: [1, 1, 2] },
91
+ keyNormScaleT: { data: keyNormScaleTData, shape: [1, 2] },
92
+ queryNormScaleT: { data: queryNormScaleTData, shape: [1, 2] },
93
+ });
94
+ ```
build/webgpu/bench.json ADDED
@@ -0,0 +1,924 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256, 512], "LANE_WORDS": [1, 2, 4, 8] },
3
+ "cases": [
4
+ {
5
+ "name": "engram-nanowhale-decode-h320-f32",
6
+ "preset": "smoke",
7
+ "provenance": {
8
+ "model": "DeepSeek-V4 nanowhale Engram block",
9
+ "notes": "One decoded token: four hyper-connection streams of 320 channels. The whole operator moves 21 KB, so the measurement is launch latency rather than bandwidth."
10
+ },
11
+ "vars": { "dtype": "float32", "rows": 4, "tokens": 1, "hcMult": 4, "hidden": 320 },
12
+ "inputs": {
13
+ "keyT": { "shape": [1, 1, 4, 320], "dtype": "float32", "dist": "normal", "seed": 601, "scale": 1 },
14
+ "queryT": { "shape": [1, 1, 4, 320], "dtype": "float32", "dist": "normal", "seed": 602, "scale": 1 },
15
+ "valueT": { "shape": [1, 1, 320], "dtype": "float32", "dist": "normal", "seed": 603, "scale": 1 },
16
+ "keyNormScaleT": {
17
+ "shape": [4, 320],
18
+ "dtype": "float32",
19
+ "dist": "uniform",
20
+ "seed": 604,
21
+ "min": 0.2,
22
+ "max": 1.8
23
+ },
24
+ "queryNormScaleT": {
25
+ "shape": [4, 320],
26
+ "dtype": "float32",
27
+ "dist": "uniform",
28
+ "seed": 605,
29
+ "min": 0.2,
30
+ "max": 1.8
31
+ }
32
+ },
33
+ "outputs": { "outputT": { "shape": [1, 1, 4, 320], "dtype": "float32" } },
34
+ "bench": {
35
+ "metrics": [
36
+ {
37
+ "type": "bandwidth",
38
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "name": "engram-nanowhale-decode-h320-f16",
45
+ "preset": "smoke",
46
+ "provenance": {
47
+ "model": "DeepSeek-V4 nanowhale Engram block",
48
+ "notes": "The float16 decode step at the same geometry."
49
+ },
50
+ "vars": { "dtype": "float16", "rows": 4, "tokens": 1, "hcMult": 4, "hidden": 320 },
51
+ "inputs": {
52
+ "keyT": { "shape": [1, 1, 4, 320], "dtype": "float16", "dist": "normal", "seed": 611, "scale": 1 },
53
+ "queryT": { "shape": [1, 1, 4, 320], "dtype": "float16", "dist": "normal", "seed": 612, "scale": 1 },
54
+ "valueT": { "shape": [1, 1, 320], "dtype": "float16", "dist": "normal", "seed": 613, "scale": 1 },
55
+ "keyNormScaleT": {
56
+ "shape": [4, 320],
57
+ "dtype": "float16",
58
+ "dist": "uniform",
59
+ "seed": 614,
60
+ "min": 0.2,
61
+ "max": 1.8
62
+ },
63
+ "queryNormScaleT": {
64
+ "shape": [4, 320],
65
+ "dtype": "float16",
66
+ "dist": "uniform",
67
+ "seed": 615,
68
+ "min": 0.2,
69
+ "max": 1.8
70
+ }
71
+ },
72
+ "outputs": { "outputT": { "shape": [1, 1, 4, 320], "dtype": "float16" } },
73
+ "bench": {
74
+ "metrics": [
75
+ {
76
+ "type": "bandwidth",
77
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ {
83
+ "name": "engram-nanowhale-prefill-s64-h320-f32",
84
+ "preset": "smoke",
85
+ "provenance": {
86
+ "model": "DeepSeek-V4 nanowhale Engram block",
87
+ "notes": "A 64-token prefill: 256 rows of 320, still small enough to sit inside cache."
88
+ },
89
+ "vars": { "dtype": "float32", "rows": 256, "tokens": 64, "hcMult": 4, "hidden": 320 },
90
+ "inputs": {
91
+ "keyT": { "shape": [1, 64, 4, 320], "dtype": "float32", "dist": "normal", "seed": 621, "scale": 1 },
92
+ "queryT": { "shape": [1, 64, 4, 320], "dtype": "float32", "dist": "normal", "seed": 622, "scale": 1 },
93
+ "valueT": { "shape": [1, 64, 320], "dtype": "float32", "dist": "normal", "seed": 623, "scale": 1 },
94
+ "keyNormScaleT": {
95
+ "shape": [4, 320],
96
+ "dtype": "float32",
97
+ "dist": "uniform",
98
+ "seed": 624,
99
+ "min": 0.2,
100
+ "max": 1.8
101
+ },
102
+ "queryNormScaleT": {
103
+ "shape": [4, 320],
104
+ "dtype": "float32",
105
+ "dist": "uniform",
106
+ "seed": 625,
107
+ "min": 0.2,
108
+ "max": 1.8
109
+ }
110
+ },
111
+ "outputs": { "outputT": { "shape": [1, 64, 4, 320], "dtype": "float32" } },
112
+ "bench": {
113
+ "metrics": [
114
+ {
115
+ "type": "bandwidth",
116
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "name": "engram-nanowhale-prefill-s512-h320-f16",
123
+ "preset": "smoke",
124
+ "provenance": {
125
+ "model": "DeepSeek-V4 nanowhale Engram block",
126
+ "notes": "Measures the DeepSeek-V4 nanowhale Engram gate over a 512-token prefill: 2048 rows (512 tokens x 4 heads) of width 320 in float16."
127
+ },
128
+ "vars": { "dtype": "float16", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 320 },
129
+ "inputs": {
130
+ "keyT": { "shape": [1, 512, 4, 320], "dtype": "float16", "dist": "normal", "seed": 631, "scale": 1 },
131
+ "queryT": { "shape": [1, 512, 4, 320], "dtype": "float16", "dist": "normal", "seed": 632, "scale": 1 },
132
+ "valueT": { "shape": [1, 512, 320], "dtype": "float16", "dist": "normal", "seed": 633, "scale": 1 },
133
+ "keyNormScaleT": {
134
+ "shape": [4, 320],
135
+ "dtype": "float16",
136
+ "dist": "uniform",
137
+ "seed": 634,
138
+ "min": 0.2,
139
+ "max": 1.8
140
+ },
141
+ "queryNormScaleT": {
142
+ "shape": [4, 320],
143
+ "dtype": "float16",
144
+ "dist": "uniform",
145
+ "seed": 635,
146
+ "min": 0.2,
147
+ "max": 1.8
148
+ }
149
+ },
150
+ "outputs": { "outputT": { "shape": [1, 512, 4, 320], "dtype": "float16" } },
151
+ "bench": {
152
+ "metrics": [
153
+ {
154
+ "type": "bandwidth",
155
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ {
161
+ "name": "engram-v4flash-decode-h4096-f32",
162
+ "preset": "smoke",
163
+ "provenance": {
164
+ "model": "DeepSeek-V4 v4flash Engram block",
165
+ "notes": "One decoded token of the wide configuration: four rows of 4096, the fewest rows this operator ever runs with at a non-trivial row width."
166
+ },
167
+ "vars": { "dtype": "float32", "rows": 4, "tokens": 1, "hcMult": 4, "hidden": 4096 },
168
+ "inputs": {
169
+ "keyT": { "shape": [1, 1, 4, 4096], "dtype": "float32", "dist": "normal", "seed": 641, "scale": 1 },
170
+ "queryT": { "shape": [1, 1, 4, 4096], "dtype": "float32", "dist": "normal", "seed": 642, "scale": 1 },
171
+ "valueT": { "shape": [1, 1, 4096], "dtype": "float32", "dist": "normal", "seed": 643, "scale": 1 },
172
+ "keyNormScaleT": {
173
+ "shape": [4, 4096],
174
+ "dtype": "float32",
175
+ "dist": "uniform",
176
+ "seed": 644,
177
+ "min": 0.2,
178
+ "max": 1.8
179
+ },
180
+ "queryNormScaleT": {
181
+ "shape": [4, 4096],
182
+ "dtype": "float32",
183
+ "dist": "uniform",
184
+ "seed": 645,
185
+ "min": 0.2,
186
+ "max": 1.8
187
+ }
188
+ },
189
+ "outputs": { "outputT": { "shape": [1, 1, 4, 4096], "dtype": "float32" } },
190
+ "bench": {
191
+ "metrics": [
192
+ {
193
+ "type": "bandwidth",
194
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
195
+ }
196
+ ]
197
+ }
198
+ },
199
+ {
200
+ "name": "engram-v4flash-decode-h4096-f16",
201
+ "preset": "smoke",
202
+ "provenance": {
203
+ "model": "DeepSeek-V4 v4flash Engram block",
204
+ "notes": "The float16 half of the wide decode step."
205
+ },
206
+ "vars": { "dtype": "float16", "rows": 4, "tokens": 1, "hcMult": 4, "hidden": 4096 },
207
+ "inputs": {
208
+ "keyT": { "shape": [1, 1, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 651, "scale": 1 },
209
+ "queryT": { "shape": [1, 1, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 652, "scale": 1 },
210
+ "valueT": { "shape": [1, 1, 4096], "dtype": "float16", "dist": "normal", "seed": 653, "scale": 1 },
211
+ "keyNormScaleT": {
212
+ "shape": [4, 4096],
213
+ "dtype": "float16",
214
+ "dist": "uniform",
215
+ "seed": 654,
216
+ "min": 0.2,
217
+ "max": 1.8
218
+ },
219
+ "queryNormScaleT": {
220
+ "shape": [4, 4096],
221
+ "dtype": "float16",
222
+ "dist": "uniform",
223
+ "seed": 655,
224
+ "min": 0.2,
225
+ "max": 1.8
226
+ }
227
+ },
228
+ "outputs": { "outputT": { "shape": [1, 1, 4, 4096], "dtype": "float16" } },
229
+ "bench": {
230
+ "metrics": [
231
+ {
232
+ "type": "bandwidth",
233
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
234
+ }
235
+ ]
236
+ }
237
+ },
238
+ {
239
+ "name": "engram-v4flash-prefill-s512-h4096-f16",
240
+ "preset": "smoke",
241
+ "provenance": {
242
+ "model": "DeepSeek-V4 v4flash Engram block",
243
+ "notes": "A 512-token prefill of the wide configuration: 8192 rows of 4096, a 55 MB working set well past cache, so the bandwidth figure is a DRAM figure."
244
+ },
245
+ "vars": { "dtype": "float16", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 4096 },
246
+ "inputs": {
247
+ "keyT": { "shape": [1, 512, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 661, "scale": 1 },
248
+ "queryT": { "shape": [1, 512, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 662, "scale": 1 },
249
+ "valueT": { "shape": [1, 512, 4096], "dtype": "float16", "dist": "normal", "seed": 663, "scale": 1 },
250
+ "keyNormScaleT": {
251
+ "shape": [4, 4096],
252
+ "dtype": "float16",
253
+ "dist": "uniform",
254
+ "seed": 664,
255
+ "min": 0.2,
256
+ "max": 1.8
257
+ },
258
+ "queryNormScaleT": {
259
+ "shape": [4, 4096],
260
+ "dtype": "float16",
261
+ "dist": "uniform",
262
+ "seed": 665,
263
+ "min": 0.2,
264
+ "max": 1.8
265
+ }
266
+ },
267
+ "outputs": { "outputT": { "shape": [1, 512, 4, 4096], "dtype": "float16" } },
268
+ "bench": {
269
+ "primary": true,
270
+ "metrics": [
271
+ {
272
+ "type": "bandwidth",
273
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
274
+ }
275
+ ]
276
+ }
277
+ },
278
+ {
279
+ "name": "engram-narrow-h64-f32",
280
+ "preset": "smoke",
281
+ "provenance": {
282
+ "notes": "64 channels per row: 2048 rows each narrower than a subgroup, where a workgroup-per-row schedule would leave most of every workgroup idle."
283
+ },
284
+ "vars": { "dtype": "float32", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 64 },
285
+ "inputs": {
286
+ "keyT": { "shape": [1, 512, 4, 64], "dtype": "float32", "dist": "normal", "seed": 671, "scale": 1 },
287
+ "queryT": { "shape": [1, 512, 4, 64], "dtype": "float32", "dist": "normal", "seed": 672, "scale": 1 },
288
+ "valueT": { "shape": [1, 512, 64], "dtype": "float32", "dist": "normal", "seed": 673, "scale": 1 },
289
+ "keyNormScaleT": {
290
+ "shape": [4, 64],
291
+ "dtype": "float32",
292
+ "dist": "uniform",
293
+ "seed": 674,
294
+ "min": 0.2,
295
+ "max": 1.8
296
+ },
297
+ "queryNormScaleT": {
298
+ "shape": [4, 64],
299
+ "dtype": "float32",
300
+ "dist": "uniform",
301
+ "seed": 675,
302
+ "min": 0.2,
303
+ "max": 1.8
304
+ }
305
+ },
306
+ "outputs": { "outputT": { "shape": [1, 512, 4, 64], "dtype": "float32" } },
307
+ "bench": {
308
+ "metrics": [
309
+ {
310
+ "type": "bandwidth",
311
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
312
+ }
313
+ ]
314
+ }
315
+ },
316
+ {
317
+ "name": "engram-narrow-h128-f16",
318
+ "preset": "smoke",
319
+ "provenance": {
320
+ "notes": "128 channels per row in float16, the other narrow width the hyper-connection family uses."
321
+ },
322
+ "vars": { "dtype": "float16", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 128 },
323
+ "inputs": {
324
+ "keyT": { "shape": [1, 512, 4, 128], "dtype": "float16", "dist": "normal", "seed": 681, "scale": 1 },
325
+ "queryT": { "shape": [1, 512, 4, 128], "dtype": "float16", "dist": "normal", "seed": 682, "scale": 1 },
326
+ "valueT": { "shape": [1, 512, 128], "dtype": "float16", "dist": "normal", "seed": 683, "scale": 1 },
327
+ "keyNormScaleT": {
328
+ "shape": [4, 128],
329
+ "dtype": "float16",
330
+ "dist": "uniform",
331
+ "seed": 684,
332
+ "min": 0.2,
333
+ "max": 1.8
334
+ },
335
+ "queryNormScaleT": {
336
+ "shape": [4, 128],
337
+ "dtype": "float16",
338
+ "dist": "uniform",
339
+ "seed": 685,
340
+ "min": 0.2,
341
+ "max": 1.8
342
+ }
343
+ },
344
+ "outputs": { "outputT": { "shape": [1, 512, 4, 128], "dtype": "float16" } },
345
+ "bench": {
346
+ "metrics": [
347
+ {
348
+ "type": "bandwidth",
349
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
350
+ }
351
+ ]
352
+ }
353
+ },
354
+ {
355
+ "name": "engram-scalar-h130-f32",
356
+ "preset": "smoke",
357
+ "provenance": { "notes": "A 130-channel row is not divisible by four and exercises a narrow scalar-width tail." },
358
+ "vars": { "dtype": "float32", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 130 },
359
+ "inputs": {
360
+ "keyT": { "shape": [1, 512, 4, 130], "dtype": "float32", "dist": "normal", "seed": 691, "scale": 1 },
361
+ "queryT": { "shape": [1, 512, 4, 130], "dtype": "float32", "dist": "normal", "seed": 692, "scale": 1 },
362
+ "valueT": { "shape": [1, 512, 130], "dtype": "float32", "dist": "normal", "seed": 693, "scale": 1 },
363
+ "keyNormScaleT": {
364
+ "shape": [4, 130],
365
+ "dtype": "float32",
366
+ "dist": "uniform",
367
+ "seed": 694,
368
+ "min": 0.2,
369
+ "max": 1.8
370
+ },
371
+ "queryNormScaleT": {
372
+ "shape": [4, 130],
373
+ "dtype": "float32",
374
+ "dist": "uniform",
375
+ "seed": 695,
376
+ "min": 0.2,
377
+ "max": 1.8
378
+ }
379
+ },
380
+ "outputs": { "outputT": { "shape": [1, 512, 4, 130], "dtype": "float32" } },
381
+ "bench": {
382
+ "metrics": [
383
+ {
384
+ "type": "bandwidth",
385
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
386
+ }
387
+ ]
388
+ }
389
+ },
390
+ {
391
+ "name": "engram-batched-rows-h320-f16",
392
+ "preset": "scale",
393
+ "provenance": {
394
+ "model": "DeepSeek-V4 nanowhale Engram block",
395
+ "notes": "65536 rows of 320 from a batched prefill, past the point where a one-dimensional workgroup grid would need the folded row index."
396
+ },
397
+ "vars": { "dtype": "float16", "rows": 65536, "tokens": 16384, "hcMult": 4, "hidden": 320 },
398
+ "inputs": {
399
+ "keyT": { "shape": [32, 512, 4, 320], "dtype": "float16", "dist": "normal", "seed": 701, "scale": 1 },
400
+ "queryT": { "shape": [32, 512, 4, 320], "dtype": "float16", "dist": "normal", "seed": 702, "scale": 1 },
401
+ "valueT": { "shape": [32, 512, 320], "dtype": "float16", "dist": "normal", "seed": 703, "scale": 1 },
402
+ "keyNormScaleT": {
403
+ "shape": [4, 320],
404
+ "dtype": "float16",
405
+ "dist": "uniform",
406
+ "seed": 704,
407
+ "min": 0.2,
408
+ "max": 1.8
409
+ },
410
+ "queryNormScaleT": {
411
+ "shape": [4, 320],
412
+ "dtype": "float16",
413
+ "dist": "uniform",
414
+ "seed": 705,
415
+ "min": 0.2,
416
+ "max": 1.8
417
+ }
418
+ },
419
+ "outputs": { "outputT": { "shape": [32, 512, 4, 320], "dtype": "float16" } },
420
+ "bench": {
421
+ "metrics": [
422
+ {
423
+ "type": "bandwidth",
424
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
425
+ }
426
+ ]
427
+ }
428
+ },
429
+ {
430
+ "name": "engram-v4flash-prefill-s512-h4096-f32",
431
+ "preset": "model",
432
+ "provenance": {
433
+ "model": "DeepSeek-V4 v4flash Engram block",
434
+ "notes": "The float32 counterpart of the wide prefill, a 110 MB working set."
435
+ },
436
+ "vars": { "dtype": "float32", "rows": 2048, "tokens": 512, "hcMult": 4, "hidden": 4096 },
437
+ "inputs": {
438
+ "keyT": { "shape": [1, 512, 4, 4096], "dtype": "float32", "dist": "normal", "seed": 711, "scale": 1 },
439
+ "queryT": { "shape": [1, 512, 4, 4096], "dtype": "float32", "dist": "normal", "seed": 712, "scale": 1 },
440
+ "valueT": { "shape": [1, 512, 4096], "dtype": "float32", "dist": "normal", "seed": 713, "scale": 1 },
441
+ "keyNormScaleT": {
442
+ "shape": [4, 4096],
443
+ "dtype": "float32",
444
+ "dist": "uniform",
445
+ "seed": 714,
446
+ "min": 0.2,
447
+ "max": 1.8
448
+ },
449
+ "queryNormScaleT": {
450
+ "shape": [4, 4096],
451
+ "dtype": "float32",
452
+ "dist": "uniform",
453
+ "seed": 715,
454
+ "min": 0.2,
455
+ "max": 1.8
456
+ }
457
+ },
458
+ "outputs": { "outputT": { "shape": [1, 512, 4, 4096], "dtype": "float32" } },
459
+ "bench": {
460
+ "metrics": [
461
+ {
462
+ "type": "bandwidth",
463
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
464
+ }
465
+ ]
466
+ }
467
+ },
468
+ {
469
+ "name": "engram-v4flash-prefill-s1024-h4096-f16",
470
+ "preset": "model",
471
+ "provenance": {
472
+ "model": "DeepSeek-V4 v4flash Engram block",
473
+ "notes": "A 1024-token prefill of the wide configuration: 110 MB in float16."
474
+ },
475
+ "vars": { "dtype": "float16", "rows": 4096, "tokens": 1024, "hcMult": 4, "hidden": 4096 },
476
+ "inputs": {
477
+ "keyT": { "shape": [1, 1024, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 721, "scale": 1 },
478
+ "queryT": { "shape": [1, 1024, 4, 4096], "dtype": "float16", "dist": "normal", "seed": 722, "scale": 1 },
479
+ "valueT": { "shape": [1, 1024, 4096], "dtype": "float16", "dist": "normal", "seed": 723, "scale": 1 },
480
+ "keyNormScaleT": {
481
+ "shape": [4, 4096],
482
+ "dtype": "float16",
483
+ "dist": "uniform",
484
+ "seed": 724,
485
+ "min": 0.2,
486
+ "max": 1.8
487
+ },
488
+ "queryNormScaleT": {
489
+ "shape": [4, 4096],
490
+ "dtype": "float16",
491
+ "dist": "uniform",
492
+ "seed": 725,
493
+ "min": 0.2,
494
+ "max": 1.8
495
+ }
496
+ },
497
+ "outputs": { "outputT": { "shape": [1, 1024, 4, 4096], "dtype": "float16" } },
498
+ "bench": {
499
+ "metrics": [
500
+ {
501
+ "type": "bandwidth",
502
+ "value": "(3 * args.rows * args.hidden + args.tokens * args.hidden + 2 * args.hcMult * args.hidden) * dtypeBytes(args.dtype)"
503
+ }
504
+ ]
505
+ }
506
+ },
507
+ {
508
+ "name": "neighbor_float32_h63_r2048",
509
+ "preset": "all",
510
+ "inputs": {
511
+ "keyT": { "shape": [1, 512, 4, 63], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
512
+ "queryT": { "shape": [1, 512, 4, 63], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
513
+ "valueT": { "shape": [1, 512, 63], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
514
+ "keyNormScaleT": {
515
+ "shape": [4, 63],
516
+ "dtype": "float32",
517
+ "seed": 694,
518
+ "dist": "uniform",
519
+ "min": 0.2,
520
+ "max": 1.8
521
+ },
522
+ "queryNormScaleT": {
523
+ "shape": [4, 63],
524
+ "dtype": "float32",
525
+ "seed": 695,
526
+ "dist": "uniform",
527
+ "min": 0.2,
528
+ "max": 1.8
529
+ }
530
+ },
531
+ "outputs": { "outputT": { "shape": [1, 512, 4, 63], "dtype": "float32" } }
532
+ },
533
+ {
534
+ "name": "neighbor_float32_h65_r2048",
535
+ "preset": "all",
536
+ "inputs": {
537
+ "keyT": { "shape": [1, 512, 4, 65], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
538
+ "queryT": { "shape": [1, 512, 4, 65], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
539
+ "valueT": { "shape": [1, 512, 65], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
540
+ "keyNormScaleT": {
541
+ "shape": [4, 65],
542
+ "dtype": "float32",
543
+ "seed": 694,
544
+ "dist": "uniform",
545
+ "min": 0.2,
546
+ "max": 1.8
547
+ },
548
+ "queryNormScaleT": {
549
+ "shape": [4, 65],
550
+ "dtype": "float32",
551
+ "seed": 695,
552
+ "dist": "uniform",
553
+ "min": 0.2,
554
+ "max": 1.8
555
+ }
556
+ },
557
+ "outputs": { "outputT": { "shape": [1, 512, 4, 65], "dtype": "float32" } }
558
+ },
559
+ {
560
+ "name": "neighbor_float32_h127_r2048",
561
+ "preset": "all",
562
+ "inputs": {
563
+ "keyT": { "shape": [1, 512, 4, 127], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
564
+ "queryT": { "shape": [1, 512, 4, 127], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
565
+ "valueT": { "shape": [1, 512, 127], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
566
+ "keyNormScaleT": {
567
+ "shape": [4, 127],
568
+ "dtype": "float32",
569
+ "seed": 694,
570
+ "dist": "uniform",
571
+ "min": 0.2,
572
+ "max": 1.8
573
+ },
574
+ "queryNormScaleT": {
575
+ "shape": [4, 127],
576
+ "dtype": "float32",
577
+ "seed": 695,
578
+ "dist": "uniform",
579
+ "min": 0.2,
580
+ "max": 1.8
581
+ }
582
+ },
583
+ "outputs": { "outputT": { "shape": [1, 512, 4, 127], "dtype": "float32" } }
584
+ },
585
+ {
586
+ "name": "neighbor_float32_h129_r2048",
587
+ "preset": "all",
588
+ "inputs": {
589
+ "keyT": { "shape": [1, 512, 4, 129], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
590
+ "queryT": { "shape": [1, 512, 4, 129], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
591
+ "valueT": { "shape": [1, 512, 129], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
592
+ "keyNormScaleT": {
593
+ "shape": [4, 129],
594
+ "dtype": "float32",
595
+ "seed": 694,
596
+ "dist": "uniform",
597
+ "min": 0.2,
598
+ "max": 1.8
599
+ },
600
+ "queryNormScaleT": {
601
+ "shape": [4, 129],
602
+ "dtype": "float32",
603
+ "seed": 695,
604
+ "dist": "uniform",
605
+ "min": 0.2,
606
+ "max": 1.8
607
+ }
608
+ },
609
+ "outputs": { "outputT": { "shape": [1, 512, 4, 129], "dtype": "float32" } }
610
+ },
611
+ {
612
+ "name": "neighbor_float32_h131_r2048",
613
+ "preset": "all",
614
+ "inputs": {
615
+ "keyT": { "shape": [1, 512, 4, 131], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
616
+ "queryT": { "shape": [1, 512, 4, 131], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
617
+ "valueT": { "shape": [1, 512, 131], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
618
+ "keyNormScaleT": {
619
+ "shape": [4, 131],
620
+ "dtype": "float32",
621
+ "seed": 694,
622
+ "dist": "uniform",
623
+ "min": 0.2,
624
+ "max": 1.8
625
+ },
626
+ "queryNormScaleT": {
627
+ "shape": [4, 131],
628
+ "dtype": "float32",
629
+ "seed": 695,
630
+ "dist": "uniform",
631
+ "min": 0.2,
632
+ "max": 1.8
633
+ }
634
+ },
635
+ "outputs": { "outputT": { "shape": [1, 512, 4, 131], "dtype": "float32" } }
636
+ },
637
+ {
638
+ "name": "neighbor_float32_h255_r2048",
639
+ "preset": "all",
640
+ "inputs": {
641
+ "keyT": { "shape": [1, 512, 4, 255], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
642
+ "queryT": { "shape": [1, 512, 4, 255], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
643
+ "valueT": { "shape": [1, 512, 255], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
644
+ "keyNormScaleT": {
645
+ "shape": [4, 255],
646
+ "dtype": "float32",
647
+ "seed": 694,
648
+ "dist": "uniform",
649
+ "min": 0.2,
650
+ "max": 1.8
651
+ },
652
+ "queryNormScaleT": {
653
+ "shape": [4, 255],
654
+ "dtype": "float32",
655
+ "seed": 695,
656
+ "dist": "uniform",
657
+ "min": 0.2,
658
+ "max": 1.8
659
+ }
660
+ },
661
+ "outputs": { "outputT": { "shape": [1, 512, 4, 255], "dtype": "float32" } }
662
+ },
663
+ {
664
+ "name": "neighbor_float32_h257_r3",
665
+ "preset": "all",
666
+ "inputs": {
667
+ "keyT": { "shape": [1, 1, 3, 257], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
668
+ "queryT": { "shape": [1, 1, 3, 257], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
669
+ "valueT": { "shape": [1, 1, 257], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
670
+ "keyNormScaleT": {
671
+ "shape": [3, 257],
672
+ "dtype": "float32",
673
+ "seed": 694,
674
+ "dist": "uniform",
675
+ "min": 0.2,
676
+ "max": 1.8
677
+ },
678
+ "queryNormScaleT": {
679
+ "shape": [3, 257],
680
+ "dtype": "float32",
681
+ "seed": 695,
682
+ "dist": "uniform",
683
+ "min": 0.2,
684
+ "max": 1.8
685
+ }
686
+ },
687
+ "outputs": { "outputT": { "shape": [1, 1, 3, 257], "dtype": "float32" } }
688
+ },
689
+ {
690
+ "name": "neighbor_float32_h257_r2048",
691
+ "preset": "all",
692
+ "inputs": {
693
+ "keyT": { "shape": [1, 512, 4, 257], "dtype": "float32", "seed": 691, "dist": "normal", "scale": 1 },
694
+ "queryT": { "shape": [1, 512, 4, 257], "dtype": "float32", "seed": 692, "dist": "normal", "scale": 1 },
695
+ "valueT": { "shape": [1, 512, 257], "dtype": "float32", "seed": 693, "dist": "normal", "scale": 1 },
696
+ "keyNormScaleT": {
697
+ "shape": [4, 257],
698
+ "dtype": "float32",
699
+ "seed": 694,
700
+ "dist": "uniform",
701
+ "min": 0.2,
702
+ "max": 1.8
703
+ },
704
+ "queryNormScaleT": {
705
+ "shape": [4, 257],
706
+ "dtype": "float32",
707
+ "seed": 695,
708
+ "dist": "uniform",
709
+ "min": 0.2,
710
+ "max": 1.8
711
+ }
712
+ },
713
+ "outputs": { "outputT": { "shape": [1, 512, 4, 257], "dtype": "float32" } }
714
+ },
715
+ {
716
+ "name": "neighbor_float16_h63_r2048",
717
+ "preset": "all",
718
+ "inputs": {
719
+ "keyT": { "shape": [1, 512, 4, 63], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
720
+ "queryT": { "shape": [1, 512, 4, 63], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
721
+ "valueT": { "shape": [1, 512, 63], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
722
+ "keyNormScaleT": {
723
+ "shape": [4, 63],
724
+ "dtype": "float16",
725
+ "seed": 694,
726
+ "dist": "uniform",
727
+ "min": 0.2,
728
+ "max": 1.8
729
+ },
730
+ "queryNormScaleT": {
731
+ "shape": [4, 63],
732
+ "dtype": "float16",
733
+ "seed": 695,
734
+ "dist": "uniform",
735
+ "min": 0.2,
736
+ "max": 1.8
737
+ }
738
+ },
739
+ "outputs": { "outputT": { "shape": [1, 512, 4, 63], "dtype": "float16" } }
740
+ },
741
+ {
742
+ "name": "neighbor_float16_h65_r2048",
743
+ "preset": "all",
744
+ "inputs": {
745
+ "keyT": { "shape": [1, 512, 4, 65], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
746
+ "queryT": { "shape": [1, 512, 4, 65], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
747
+ "valueT": { "shape": [1, 512, 65], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
748
+ "keyNormScaleT": {
749
+ "shape": [4, 65],
750
+ "dtype": "float16",
751
+ "seed": 694,
752
+ "dist": "uniform",
753
+ "min": 0.2,
754
+ "max": 1.8
755
+ },
756
+ "queryNormScaleT": {
757
+ "shape": [4, 65],
758
+ "dtype": "float16",
759
+ "seed": 695,
760
+ "dist": "uniform",
761
+ "min": 0.2,
762
+ "max": 1.8
763
+ }
764
+ },
765
+ "outputs": { "outputT": { "shape": [1, 512, 4, 65], "dtype": "float16" } }
766
+ },
767
+ {
768
+ "name": "neighbor_float16_h127_r2048",
769
+ "preset": "all",
770
+ "inputs": {
771
+ "keyT": { "shape": [1, 512, 4, 127], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
772
+ "queryT": { "shape": [1, 512, 4, 127], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
773
+ "valueT": { "shape": [1, 512, 127], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
774
+ "keyNormScaleT": {
775
+ "shape": [4, 127],
776
+ "dtype": "float16",
777
+ "seed": 694,
778
+ "dist": "uniform",
779
+ "min": 0.2,
780
+ "max": 1.8
781
+ },
782
+ "queryNormScaleT": {
783
+ "shape": [4, 127],
784
+ "dtype": "float16",
785
+ "seed": 695,
786
+ "dist": "uniform",
787
+ "min": 0.2,
788
+ "max": 1.8
789
+ }
790
+ },
791
+ "outputs": { "outputT": { "shape": [1, 512, 4, 127], "dtype": "float16" } }
792
+ },
793
+ {
794
+ "name": "neighbor_float16_h129_r2048",
795
+ "preset": "all",
796
+ "inputs": {
797
+ "keyT": { "shape": [1, 512, 4, 129], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
798
+ "queryT": { "shape": [1, 512, 4, 129], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
799
+ "valueT": { "shape": [1, 512, 129], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
800
+ "keyNormScaleT": {
801
+ "shape": [4, 129],
802
+ "dtype": "float16",
803
+ "seed": 694,
804
+ "dist": "uniform",
805
+ "min": 0.2,
806
+ "max": 1.8
807
+ },
808
+ "queryNormScaleT": {
809
+ "shape": [4, 129],
810
+ "dtype": "float16",
811
+ "seed": 695,
812
+ "dist": "uniform",
813
+ "min": 0.2,
814
+ "max": 1.8
815
+ }
816
+ },
817
+ "outputs": { "outputT": { "shape": [1, 512, 4, 129], "dtype": "float16" } }
818
+ },
819
+ {
820
+ "name": "neighbor_float16_h131_r2048",
821
+ "preset": "all",
822
+ "inputs": {
823
+ "keyT": { "shape": [1, 512, 4, 131], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
824
+ "queryT": { "shape": [1, 512, 4, 131], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
825
+ "valueT": { "shape": [1, 512, 131], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
826
+ "keyNormScaleT": {
827
+ "shape": [4, 131],
828
+ "dtype": "float16",
829
+ "seed": 694,
830
+ "dist": "uniform",
831
+ "min": 0.2,
832
+ "max": 1.8
833
+ },
834
+ "queryNormScaleT": {
835
+ "shape": [4, 131],
836
+ "dtype": "float16",
837
+ "seed": 695,
838
+ "dist": "uniform",
839
+ "min": 0.2,
840
+ "max": 1.8
841
+ }
842
+ },
843
+ "outputs": { "outputT": { "shape": [1, 512, 4, 131], "dtype": "float16" } }
844
+ },
845
+ {
846
+ "name": "neighbor_float16_h255_r2048",
847
+ "preset": "all",
848
+ "inputs": {
849
+ "keyT": { "shape": [1, 512, 4, 255], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
850
+ "queryT": { "shape": [1, 512, 4, 255], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
851
+ "valueT": { "shape": [1, 512, 255], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
852
+ "keyNormScaleT": {
853
+ "shape": [4, 255],
854
+ "dtype": "float16",
855
+ "seed": 694,
856
+ "dist": "uniform",
857
+ "min": 0.2,
858
+ "max": 1.8
859
+ },
860
+ "queryNormScaleT": {
861
+ "shape": [4, 255],
862
+ "dtype": "float16",
863
+ "seed": 695,
864
+ "dist": "uniform",
865
+ "min": 0.2,
866
+ "max": 1.8
867
+ }
868
+ },
869
+ "outputs": { "outputT": { "shape": [1, 512, 4, 255], "dtype": "float16" } }
870
+ },
871
+ {
872
+ "name": "neighbor_float16_h257_r3",
873
+ "preset": "all",
874
+ "inputs": {
875
+ "keyT": { "shape": [1, 1, 3, 257], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
876
+ "queryT": { "shape": [1, 1, 3, 257], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
877
+ "valueT": { "shape": [1, 1, 257], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
878
+ "keyNormScaleT": {
879
+ "shape": [3, 257],
880
+ "dtype": "float16",
881
+ "seed": 694,
882
+ "dist": "uniform",
883
+ "min": 0.2,
884
+ "max": 1.8
885
+ },
886
+ "queryNormScaleT": {
887
+ "shape": [3, 257],
888
+ "dtype": "float16",
889
+ "seed": 695,
890
+ "dist": "uniform",
891
+ "min": 0.2,
892
+ "max": 1.8
893
+ }
894
+ },
895
+ "outputs": { "outputT": { "shape": [1, 1, 3, 257], "dtype": "float16" } }
896
+ },
897
+ {
898
+ "name": "neighbor_float16_h257_r2048",
899
+ "preset": "all",
900
+ "inputs": {
901
+ "keyT": { "shape": [1, 512, 4, 257], "dtype": "float16", "seed": 691, "dist": "normal", "scale": 1 },
902
+ "queryT": { "shape": [1, 512, 4, 257], "dtype": "float16", "seed": 692, "dist": "normal", "scale": 1 },
903
+ "valueT": { "shape": [1, 512, 257], "dtype": "float16", "seed": 693, "dist": "normal", "scale": 1 },
904
+ "keyNormScaleT": {
905
+ "shape": [4, 257],
906
+ "dtype": "float16",
907
+ "seed": 694,
908
+ "dist": "uniform",
909
+ "min": 0.2,
910
+ "max": 1.8
911
+ },
912
+ "queryNormScaleT": {
913
+ "shape": [4, 257],
914
+ "dtype": "float16",
915
+ "seed": 695,
916
+ "dist": "uniform",
917
+ "min": 0.2,
918
+ "max": 1.8
919
+ }
920
+ },
921
+ "outputs": { "outputT": { "shape": [1, 512, 4, 257], "dtype": "float16" } }
922
+ }
923
+ ]
924
+ }
build/webgpu/engram-gate-rows.wgsl.jinja ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% if foldKind == "subgroup_full" or foldKind == "subgroup_butterfly" %}
2
+ enable subgroups;
3
+ {% endif %}
4
+ {{ env.wgsl.resourceDeclarations }}
5
+
6
+ // The Engram gate, fused per (batch, sequence, hc_mult) row:
7
+ // dot = sum(RMSNorm(key) * RMSNorm(query)) / sqrt(HIDDEN)
8
+ // out = sigmoid(sign(dot) * sqrt(max(abs(dot), 1e-6))) * value
9
+ // Both inverse-RMS factors are row scalars, so they come out of the sum and the
10
+ // two sums of squares and the scaled cross term ride ONE pass as a single vec3
11
+ // accumulator. Normalizing per element first would need two passes and a
12
+ // different rounding.
13
+ //
14
+ // Each row owns a fixed LANE GROUP rather than a whole workgroup. LANES_PER_ROW
15
+ // is the smallest power of two that covers the row, capped by the workgroup
16
+ // (and, on the subgroup routes, by the subgroup) so several rows are resident at
17
+ // once, and widened toward the workgroup when there are too few rows to fill the
18
+ // dispatch. The value words stay in registers across the fold.
19
+ //
20
+ // Every accumulation is float32 whatever the tensor type; only the store narrows.
21
+ const ROW_WORDS: u32 = {{ rowWords }}u;
22
+ const HIDDEN: f32 = {{ hidden }}.0;
23
+ const HC_MULT: u32 = {{ hcMult }}u;
24
+ const EPS: f32 = {{ epsilon }};
25
+ const GATE_FLOOR: f32 = 0.000001;
26
+ const WG: u32 = {{ workgroupSize }}u;
27
+ const LANES_PER_ROW: u32 = {{ lanesPerRow }}u;
28
+ const ROWS_PER_GROUP: u32 = {{ rowsPerGroup }}u;
29
+ {% if foldKind == "workgroup_tree" %}
30
+
31
+ // One contiguous LANES_PER_ROW slice per row, carrying all three accumulators as
32
+ // one vector. The fold never crosses a slice boundary, so the rows sharing this
33
+ // array do not interfere.
34
+ var<workgroup> partials: array<vec3<f32>, WG>;
35
+ {% endif %}
36
+
37
+ fn sigmoid_safe(x: f32) -> f32 {
38
+ if (x >= 0.0) {
39
+ let z = exp(-x);
40
+ return 1.0 / (1.0 + z);
41
+ }
42
+ let z = exp(x);
43
+ return z / (1.0 + z);
44
+ }
45
+
46
+ // sign(0.0) is 0.0 in WGSL, so a zero dot product gives an argument of exactly
47
+ // zero and therefore a gate of exactly 0.5. A copysign spelling would map it to
48
+ // +sqrt(GATE_FLOOR) instead, which is the divergence upstream calls out.
49
+ fn engram_gate(dotValue: f32) -> f32 {
50
+ return sigmoid_safe(sign(dotValue) * sqrt(max(abs(dotValue), GATE_FLOOR)));
51
+ }
52
+
53
+ @compute @workgroup_size(WG)
54
+ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid: vec3<u32>) {
55
+ let lane = lid.x % LANES_PER_ROW;
56
+ let localRow = lid.x / LANES_PER_ROW;
57
+ // 2D-folded row index: wg.y carries the high bits past the dispatch's per-axis
58
+ // workgroup fold width.
59
+ let row = (wg.x + wg.y * {{ DISPATCH_FOLD_WIDTH }}u) * ROWS_PER_GROUP + localRow;
60
+ let rowValid = row < params.rows;
61
+ // A lane group past the last row folds an empty row and stores nothing, so the
62
+ // collectives and barriers below stay in uniform control flow.
63
+ let limit = select(0u, ROW_WORDS, rowValid);
64
+ let base = row * ROW_WORDS;
65
+ // The hyper-connection stream selects the scale rows; the token selects the one
66
+ // value row that every stream of that token shares.
67
+ let scaleBase = (row % HC_MULT) * ROW_WORDS;
68
+ let valueBase = (row / HC_MULT) * ROW_WORDS;
69
+
70
+ // x: sum(key^2), y: sum(query^2), z: sum(key * key_scale * query * query_scale).
71
+ var acc = vec3<f32>(0.0);
72
+ {% if stageRow %}
73
+ {% for i in range(wordsPerLane) %}
74
+ {% if useVec4 %}
75
+ var vv{{ i }} = vec4<f32>(0.0);
76
+ {% else %}
77
+ var vv{{ i }} = 0.0;
78
+ {% endif %}
79
+ let c{{ i }} = lane + {{ i }}u * LANES_PER_ROW;
80
+ if (c{{ i }} < limit) {
81
+ {% if useVec4 %}
82
+ let kv{{ i }} = vec4<f32>(key[base + c{{ i }}]);
83
+ let qv{{ i }} = vec4<f32>(query[base + c{{ i }}]);
84
+ let ks{{ i }} = vec4<f32>(kscale[scaleBase + c{{ i }}]);
85
+ let qs{{ i }} = vec4<f32>(qscale[scaleBase + c{{ i }}]);
86
+ vv{{ i }} = vec4<f32>(value[valueBase + c{{ i }}]);
87
+ acc = acc + vec3<f32>(dot(kv{{ i }}, kv{{ i }}), dot(qv{{ i }}, qv{{ i }}), dot(kv{{ i }} * ks{{ i }}, qv{{ i }} * qs{{ i }}));
88
+ {% else %}
89
+ let kv{{ i }} = f32(key[base + c{{ i }}]);
90
+ let qv{{ i }} = f32(query[base + c{{ i }}]);
91
+ let ks{{ i }} = f32(kscale[scaleBase + c{{ i }}]);
92
+ let qs{{ i }} = f32(qscale[scaleBase + c{{ i }}]);
93
+ vv{{ i }} = f32(value[valueBase + c{{ i }}]);
94
+ acc = acc + vec3<f32>(kv{{ i }} * kv{{ i }}, qv{{ i }} * qv{{ i }}, (kv{{ i }} * ks{{ i }}) * (qv{{ i }} * qs{{ i }}));
95
+ {% endif %}
96
+ }
97
+ {% endfor %}
98
+ {% else %}
99
+ // The row's value words do not fit in registers at this width, so the statistic
100
+ // pass and the store pass each walk it.
101
+ for (var c = lane; c < limit; c = c + LANES_PER_ROW) {
102
+ {% if useVec4 %}
103
+ let kv = vec4<f32>(key[base + c]);
104
+ let qv = vec4<f32>(query[base + c]);
105
+ let ks = vec4<f32>(kscale[scaleBase + c]);
106
+ let qs = vec4<f32>(qscale[scaleBase + c]);
107
+ acc = acc + vec3<f32>(dot(kv, kv), dot(qv, qv), dot(kv * ks, qv * qs));
108
+ {% else %}
109
+ let kv = f32(key[base + c]);
110
+ let qv = f32(query[base + c]);
111
+ let ks = f32(kscale[scaleBase + c]);
112
+ let qs = f32(qscale[scaleBase + c]);
113
+ acc = acc + vec3<f32>(kv * kv, qv * qv, (kv * ks) * (qv * qs));
114
+ {% endif %}
115
+ }
116
+ {% endif %}
117
+ {% if foldKind == "subgroup_full" %}
118
+ let sums = subgroupAdd(acc);
119
+ {% elif foldKind == "subgroup_butterfly" %}
120
+ // Segmented butterfly: only the low bits of the lane index are exchanged, so each
121
+ // aligned group of LANES_PER_ROW lanes folds its own row and one subgroup carries
122
+ // several rows without a barrier or any workgroup memory. All three accumulators
123
+ // ride one shuffle.
124
+ var folded = acc;
125
+ {% for step in range(foldSteps) %}
126
+ folded = folded + subgroupShuffleXor(folded, 1u << {{ step }}u);
127
+ {% endfor %}
128
+ let sums = folded;
129
+ {% elif foldKind == "workgroup_tree" %}
130
+ partials[lid.x] = acc;
131
+ workgroupBarrier();
132
+ // LANES_PER_ROW is a power of two, so the halving stride is uniform across the
133
+ // whole workgroup and every lane reaches every barrier.
134
+ var stride = LANES_PER_ROW / 2u;
135
+ loop {
136
+ if (stride == 0u) {
137
+ break;
138
+ }
139
+ if (lane < stride) {
140
+ partials[lid.x] = partials[lid.x] + partials[lid.x + stride];
141
+ }
142
+ workgroupBarrier();
143
+ stride = stride / 2u;
144
+ }
145
+ let sums = partials[localRow * LANES_PER_ROW];
146
+ {% else %}
147
+ // One lane owns the whole row, so the accumulator already holds the row sums.
148
+ let sums = acc;
149
+ {% endif %}
150
+ let keyInv = inverseSqrt(sums.x / HIDDEN + EPS);
151
+ let queryInv = inverseSqrt(sums.y / HIDDEN + EPS);
152
+ let gate = engram_gate(sums.z * keyInv * queryInv / sqrt(HIDDEN));
153
+ {% if stageRow %}
154
+ {% for i in range(wordsPerLane) %}
155
+ if (c{{ i }} < limit) {
156
+ {% if useVec4 %}
157
+ out[base + c{{ i }}] = {{ vectorScalar }}(vv{{ i }} * gate);
158
+ {% else %}
159
+ out[base + c{{ i }}] = {{ scalar }}(vv{{ i }} * gate);
160
+ {% endif %}
161
+ }
162
+ {% endfor %}
163
+ {% else %}
164
+ for (var c = lane; c < limit; c = c + LANES_PER_ROW) {
165
+ {% if useVec4 %}
166
+ out[base + c] = {{ vectorScalar }}(vec4<f32>(value[valueBase + c]) * gate);
167
+ {% else %}
168
+ out[base + c] = {{ scalar }}(f32(value[valueBase + c]) * gate);
169
+ {% endif %}
170
+ }
171
+ {% endif %}
172
+ }
build/webgpu/manifest.json ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "domain": "com.microsoft",
3
+ "name": "EngramGate",
4
+ "sinceVersion": 1,
5
+ "inputs": {
6
+ "keyT": { "onnx": "key", "dtype": "T", "rank": 4 },
7
+ "queryT": { "onnx": "query", "dtype": "T", "rank": 4 },
8
+ "valueT": { "onnx": "value", "dtype": "T", "rank": 3 },
9
+ "keyNormScaleT": { "onnx": "key_norm_scale", "dtype": "T", "rank": 2 },
10
+ "queryNormScaleT": { "onnx": "query_norm_scale", "dtype": "T", "rank": 2 }
11
+ },
12
+ "outputs": { "outputT": { "onnx": "output", "dtype": "T", "rank": 4, "shape": "shapes.keyT" } },
13
+ "attributes": { "epsilon": { "default": 0.00001 } },
14
+ "typeConstraints": { "T": ["float32", "float16"] },
15
+ "tunables": {
16
+ "WORKGROUP_SIZE": { "default": 256 },
17
+ "LANE_WORDS": { "default": 8 },
18
+ "MIN_ROW_GROUPS": { "default": 8 }
19
+ },
20
+ "derive": {
21
+ "deviceWorkgroupCap": "min(device.limits.maxComputeInvocationsPerWorkgroup, device.limits.maxComputeWorkgroupSizeX)",
22
+ "foldedDispatchCapacity": "min(device.limits.maxComputeWorkgroupsPerDimension, 65535) * min(device.limits.maxComputeWorkgroupsPerDimension, 65535)",
23
+ "hcMult": "dim(shapes.keyT, 2)",
24
+ "hidden": "dim(shapes.keyT, 3)",
25
+ "rowCount": "dim(shapes.keyT, 0) * dim(shapes.keyT, 1) * hcMult",
26
+ "dtypeOk": "tensorDtypes.keyT == tensorDtypes.queryT and tensorDtypes.keyT == tensorDtypes.valueT and tensorDtypes.keyT == tensorDtypes.keyNormScaleT and tensorDtypes.keyT == tensorDtypes.queryNormScaleT and tensorDtypes.keyT == tensorDtypes.outputT and f16Ok(dtypes.T)",
27
+ "shapeOk": "ranks.keyT == 4 and ranks.valueT == 3 and hidden > 0 and hcMult > 0 and rowCount > 0 and sameShape(shapes.queryT, shapes.keyT) and sameShape(shapes.outputT, shapes.keyT) and sameShape(prefix(shapes.valueT, 2), prefix(shapes.keyT, 2)) and dim(shapes.valueT, 2) == hidden and sameShape(shapes.keyNormScaleT, suffix(shapes.keyT, 2)) and sameShape(shapes.queryNormScaleT, suffix(shapes.keyT, 2))",
28
+ "contractOk": "dtypeOk and shapeOk",
29
+ "workgroupOk": "tunables.WORKGROUP_SIZE > 0 and tunables.WORKGROUP_SIZE <= deviceWorkgroupCap and pow2ceil(tunables.WORKGROUP_SIZE) == tunables.WORKGROUP_SIZE and tunables.LANE_WORDS > 0 and tunables.MIN_ROW_GROUPS > 0",
30
+ "sharedFoldFits": "tunables.WORKGROUP_SIZE * 16 <= device.limits.maxComputeWorkgroupStorageSize",
31
+ "vec4Ok": "hidden % 4 == 0",
32
+ "vecWords": "hidden / 4",
33
+ "vecPreferredLanes": "max(1, min(tunables.WORKGROUP_SIZE / 2, pow2ceil(max(1, ceilDiv(vecWords, max(1, tunables.LANE_WORDS))))))",
34
+ "vecWideLanes": "max(1, min(tunables.WORKGROUP_SIZE, pow2ceil(max(1, ceilDiv(vecWords, max(1, tunables.LANE_WORDS))))))",
35
+ "vecBaseLanes": "pick([[ceilDiv(vecWords, vecPreferredLanes) <= 8, vecPreferredLanes]], vecWideLanes)",
36
+ "vecBaseRowGroups": "ceilDiv(rowCount, max(1, tunables.WORKGROUP_SIZE / max(1, vecBaseLanes)))",
37
+ "vecFillLanes": "max(1, min(min(tunables.WORKGROUP_SIZE, pow2ceil(max(1, vecWords))), pow2ceil(max(1, ceilDiv(tunables.MIN_ROW_GROUPS * tunables.WORKGROUP_SIZE, max(1, rowCount))))))",
38
+ "vecLanesPerRow": "pick([[vecBaseRowGroups < tunables.MIN_ROW_GROUPS, max(vecBaseLanes, vecFillLanes)]], vecBaseLanes)",
39
+ "vecRowsPerGroup": "tunables.WORKGROUP_SIZE / max(1, vecLanesPerRow)",
40
+ "vecWordsPerLane": "ceilDiv(vecWords, max(1, vecLanesPerRow))",
41
+ "vecRowGroups": "ceilDiv(rowCount, max(1, vecRowsPerGroup))",
42
+ "scalarPreferredLanes": "max(1, min(tunables.WORKGROUP_SIZE / 2, pow2ceil(max(1, ceilDiv(hidden, max(8, tunables.LANE_WORDS))))))",
43
+ "scalarWideLanes": "max(1, min(tunables.WORKGROUP_SIZE, pow2ceil(max(1, ceilDiv(hidden, max(1, tunables.LANE_WORDS))))))",
44
+ "scalarBaseLanes": "pick([[ceilDiv(hidden, scalarPreferredLanes) <= 8, scalarPreferredLanes]], scalarWideLanes)",
45
+ "scalarBaseRowGroups": "ceilDiv(rowCount, max(1, tunables.WORKGROUP_SIZE / max(1, scalarBaseLanes)))",
46
+ "scalarFillLanes": "max(1, min(min(tunables.WORKGROUP_SIZE, pow2ceil(max(1, hidden))), pow2ceil(max(1, ceilDiv(tunables.MIN_ROW_GROUPS * tunables.WORKGROUP_SIZE, max(1, rowCount))))))",
47
+ "scalarLanesPerRow": "pick([[scalarBaseRowGroups < tunables.MIN_ROW_GROUPS, max(scalarBaseLanes, scalarFillLanes)]], scalarBaseLanes)",
48
+ "scalarRowsPerGroup": "tunables.WORKGROUP_SIZE / max(1, scalarLanesPerRow)",
49
+ "scalarWordsPerLane": "ceilDiv(hidden, max(1, scalarLanesPerRow))",
50
+ "scalarRowGroups": "ceilDiv(rowCount, max(1, scalarRowsPerGroup))",
51
+ "subgroupShapeKnown": "device.features.has(\"subgroups\") and has(device.adapterInfo, \"subgroupMinSize\") and has(device.adapterInfo, \"subgroupMaxSize\") and device.adapterInfo.subgroupMinSize > 0 and device.adapterInfo.subgroupMinSize <= device.adapterInfo.subgroupMaxSize and device.adapterInfo.subgroupMaxSize <= tunables.WORKGROUP_SIZE and tunables.WORKGROUP_SIZE % device.adapterInfo.subgroupMaxSize == 0",
52
+ "sgMin": "device.adapterInfo.subgroupMinSize if subgroupShapeKnown else 0",
53
+ "sgFullWidth": "subgroupShapeKnown and device.adapterInfo.subgroupMinSize == device.adapterInfo.subgroupMaxSize",
54
+ "sgVecLanesPerRow": "min(sgMin, vecLanesPerRow) if subgroupShapeKnown else 1",
55
+ "sgVecRowsPerGroup": "tunables.WORKGROUP_SIZE / max(1, sgVecLanesPerRow)",
56
+ "sgVecWordsPerLane": "ceilDiv(vecWords, max(1, sgVecLanesPerRow))",
57
+ "sgVecRowGroups": "ceilDiv(rowCount, max(1, sgVecRowsPerGroup))",
58
+ "sgScalarLanesPerRow": "min(sgMin, scalarLanesPerRow) if subgroupShapeKnown else 1",
59
+ "sgScalarRowsPerGroup": "tunables.WORKGROUP_SIZE / max(1, sgScalarLanesPerRow)",
60
+ "sgScalarWordsPerLane": "ceilDiv(hidden, max(1, sgScalarLanesPerRow))",
61
+ "sgScalarRowGroups": "ceilDiv(rowCount, max(1, sgScalarRowsPerGroup))",
62
+ "vectorElement": "\"vec4<\" ~ dtypes.T ~ \">\"",
63
+ "workgroupSize": "tunables.WORKGROUP_SIZE",
64
+ "epsilon": "attrs.epsilon",
65
+ "scalar": "dtypes.T",
66
+ "vectorScalar": "vectorElement"
67
+ },
68
+ "when": ["contractOk", "workgroupOk"],
69
+ "bindings": {
70
+ "key": { "arg": "keyT", "elementType": "$vectorElement" },
71
+ "query": { "arg": "queryT", "elementType": "$vectorElement" },
72
+ "value": { "arg": "valueT", "elementType": "$vectorElement" },
73
+ "kscale": { "arg": "keyNormScaleT", "elementType": "$vectorElement" },
74
+ "qscale": { "arg": "queryNormScaleT", "elementType": "$vectorElement" },
75
+ "out": { "arg": "outputT", "elementType": "$vectorElement" },
76
+ "key_main": { "arg": "keyT", "name": "key", "elementType": "$scalar" },
77
+ "query_main": { "arg": "queryT", "name": "query", "elementType": "$scalar" },
78
+ "value_main": { "arg": "valueT", "name": "value", "elementType": "$scalar" },
79
+ "kscale_main": { "arg": "keyNormScaleT", "name": "kscale", "elementType": "$scalar" },
80
+ "qscale_main": { "arg": "queryNormScaleT", "name": "qscale", "elementType": "$scalar" },
81
+ "out_main": { "arg": "outputT", "name": "out", "elementType": "$scalar" },
82
+ "params": { "struct": [{ "name": "rows", "type": "u32", "value": "rowCount" }] }
83
+ },
84
+ "variants": [
85
+ {
86
+ "id": "subgroup_rows_vec4",
87
+ "priority": 30,
88
+ "when": ["vec4Ok", "subgroupShapeKnown", "sgVecWordsPerLane >= 1", "sgVecWordsPerLane <= 8", "sgVecRowGroups <= foldedDispatchCapacity"],
89
+ "requires": { "features": ["subgroups"] },
90
+ "derive": {
91
+ "foldKind": "\"none\" if sgVecLanesPerRow <= 1 else (\"subgroup_full\" if (sgFullWidth and sgVecLanesPerRow == sgMin) else \"subgroup_butterfly\")",
92
+ "foldSteps": "log2ceil(sgVecLanesPerRow)",
93
+ "useVec4": "true",
94
+ "stageRow": "true",
95
+ "rowWords": "vecWords",
96
+ "wordsPerLane": "sgVecWordsPerLane",
97
+ "lanesPerRow": "sgVecLanesPerRow",
98
+ "rowsPerGroup": "sgVecRowsPerGroup"
99
+ },
100
+ "passes": [
101
+ {
102
+ "id": "main",
103
+ "name": "EngramGate.SubgroupRowsVec4",
104
+ "shader": "engram-gate-rows.wgsl.jinja",
105
+ "bindings": ["key", "query", "value", "kscale", "qscale", "out", "params"],
106
+ "dispatch": {
107
+ "x": "min(sgVecRowGroups, DISPATCH_FOLD_WIDTH)",
108
+ "y": "ceilDiv(sgVecRowGroups, DISPATCH_FOLD_WIDTH)"
109
+ }
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "id": "packed_rows_vec4",
115
+ "priority": 20,
116
+ "when": ["vec4Ok", "sharedFoldFits", "vecRowGroups <= foldedDispatchCapacity"],
117
+ "derive": {
118
+ "foldKind": "\"none\" if vecLanesPerRow <= 1 else \"workgroup_tree\"",
119
+ "foldSteps": "log2ceil(vecLanesPerRow)",
120
+ "useVec4": "true",
121
+ "stageRow": "vecWordsPerLane <= 8",
122
+ "rowWords": "vecWords",
123
+ "wordsPerLane": "vecWordsPerLane",
124
+ "lanesPerRow": "vecLanesPerRow",
125
+ "rowsPerGroup": "vecRowsPerGroup"
126
+ },
127
+ "passes": [
128
+ {
129
+ "id": "main",
130
+ "name": "EngramGate.PackedRowsVec4",
131
+ "shader": "engram-gate-rows.wgsl.jinja",
132
+ "bindings": ["key", "query", "value", "kscale", "qscale", "out", "params"],
133
+ "dispatch": {
134
+ "x": "min(vecRowGroups, DISPATCH_FOLD_WIDTH)",
135
+ "y": "ceilDiv(vecRowGroups, DISPATCH_FOLD_WIDTH)"
136
+ }
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "id": "subgroup_rows_scalar",
142
+ "priority": 10,
143
+ "when": ["subgroupShapeKnown", "sgScalarWordsPerLane >= 1", "sgScalarWordsPerLane <= 8", "sgScalarRowGroups <= foldedDispatchCapacity"],
144
+ "requires": { "features": ["subgroups"] },
145
+ "derive": {
146
+ "foldKind": "\"none\" if sgScalarLanesPerRow <= 1 else (\"subgroup_full\" if (sgFullWidth and sgScalarLanesPerRow == sgMin) else \"subgroup_butterfly\")",
147
+ "foldSteps": "log2ceil(sgScalarLanesPerRow)",
148
+ "useVec4": "false",
149
+ "stageRow": "true",
150
+ "rowWords": "hidden",
151
+ "wordsPerLane": "sgScalarWordsPerLane",
152
+ "lanesPerRow": "sgScalarLanesPerRow",
153
+ "rowsPerGroup": "sgScalarRowsPerGroup"
154
+ },
155
+ "passes": [
156
+ {
157
+ "id": "main",
158
+ "name": "EngramGate.SubgroupRowsScalar",
159
+ "shader": "engram-gate-rows.wgsl.jinja",
160
+ "bindings": ["key_main", "query_main", "value_main", "kscale_main", "qscale_main", "out_main", "params"],
161
+ "dispatch": {
162
+ "x": "min(sgScalarRowGroups, DISPATCH_FOLD_WIDTH)",
163
+ "y": "ceilDiv(sgScalarRowGroups, DISPATCH_FOLD_WIDTH)"
164
+ }
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "id": "packed_rows_scalar",
170
+ "priority": 0,
171
+ "when": ["sharedFoldFits", "scalarRowGroups <= foldedDispatchCapacity"],
172
+ "derive": {
173
+ "foldKind": "\"none\" if scalarLanesPerRow <= 1 else \"workgroup_tree\"",
174
+ "foldSteps": "log2ceil(scalarLanesPerRow)",
175
+ "useVec4": "false",
176
+ "stageRow": "scalarWordsPerLane <= 8",
177
+ "rowWords": "hidden",
178
+ "wordsPerLane": "scalarWordsPerLane",
179
+ "lanesPerRow": "scalarLanesPerRow",
180
+ "rowsPerGroup": "scalarRowsPerGroup"
181
+ },
182
+ "passes": [
183
+ {
184
+ "id": "main",
185
+ "name": "EngramGate.PackedRowsScalar",
186
+ "shader": "engram-gate-rows.wgsl.jinja",
187
+ "bindings": ["key_main", "query_main", "value_main", "kscale_main", "qscale_main", "out_main", "params"],
188
+ "dispatch": {
189
+ "x": "min(scalarRowGroups, DISPATCH_FOLD_WIDTH)",
190
+ "y": "ceilDiv(scalarRowGroups, DISPATCH_FOLD_WIDTH)"
191
+ }
192
+ }
193
+ ]
194
+ }
195
+ ]
196
+ }
build/webgpu/metadata.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "com.microsoft.EngramGate",
3
+ "id": "_com_microsoft_engramgate_webgpu_e6b4c45",
4
+ "version": 1,
5
+ "license": "Apache-2.0",
6
+ "backend": { "type": "webgpu" },
7
+ "digest": {
8
+ "algorithm": "sha256",
9
+ "files": {
10
+ "bench.json": "1AsNY/KLnWqSi3rI1GdriO0bQ5cfQQukYt9WisteVaE=",
11
+ "engram-gate-rows.wgsl.jinja": "q9Z+7afQ+9LFxjks9tQw2xX93Dsen47WaPBW26breLM=",
12
+ "manifest.json": "m6y59i8jPJFyMB8AbPpNvfd/t3w9MLtG5/L7rfOQBs8=",
13
+ "test.json": "OfAVLi7QPYg7OUihAF7HmAdC/xrIq3qziUYSMchd4DQ="
14
+ }
15
+ },
16
+ "provenance": { "kernel": { "sha": "6fdf6301e2bbcc2f03bf1eaf493b7ad55ef33afc", "dirty": false } },
17
+ "webgpu": {
18
+ "manifestSpec": "2.1",
19
+ "variants": {
20
+ "subgroup_rows_vec4": ["engram-gate-rows.wgsl.jinja"],
21
+ "packed_rows_vec4": ["engram-gate-rows.wgsl.jinja"],
22
+ "subgroup_rows_scalar": ["engram-gate-rows.wgsl.jinja"],
23
+ "packed_rows_scalar": ["engram-gate-rows.wgsl.jinja"]
24
+ }
25
+ }
26
+ }
build/webgpu/test.json ADDED
@@ -0,0 +1,2320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cases": [
3
+ {
4
+ "name": "ort_gate_float",
5
+ "provenance": {
6
+ "source": "ORT: onnxruntime/test/contrib_ops/engram_ops_test.cc",
7
+ "test": "EngramOpsTest.EngramGateFloat",
8
+ "notes": "The upstream tiny case verbatim: key {0, 2.5}, query {3, 4}, value {2, -1.5}, unit scales, one token and one hyper-connection. Expected values recomputed in float32 from the upstream kernel's own ordering."
9
+ },
10
+ "attrs": { "epsilon": 0.00001 },
11
+ "inputs": {
12
+ "keyT": { "dtype": "float32", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [0.0, 2.5] } },
13
+ "queryT": { "dtype": "float32", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [3.0, 4.0] } },
14
+ "valueT": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "values", "values": [2.0, -1.5] } },
15
+ "keyNormScaleT": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } },
16
+ "queryNormScaleT": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } }
17
+ },
18
+ "outputs": {
19
+ "outputT": {
20
+ "dtype": "float32",
21
+ "shape": [1, 1, 1, 2],
22
+ "data": { "kind": "values", "values": [1.4867780208587646, -1.1150834560394287] },
23
+ "tolerance": 0.000002,
24
+ "relTolerance": 0.00002
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "name": "ort_gate_float16",
30
+ "provenance": {
31
+ "source": "ORT: onnxruntime/test/contrib_ops/engram_ops_test.cc",
32
+ "test": "EngramOpsTest.EngramGateFloat16",
33
+ "notes": "The upstream tiny case verbatim: key {0, 2.5}, query {3, 4}, value {2, -1.5}, unit scales, one token and one hyper-connection. Expected values recomputed in float32 from the upstream kernel's own ordering."
34
+ },
35
+ "attrs": { "epsilon": 0.00001 },
36
+ "inputs": {
37
+ "keyT": { "dtype": "float16", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [0.0, 2.5] } },
38
+ "queryT": { "dtype": "float16", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [3.0, 4.0] } },
39
+ "valueT": { "dtype": "float16", "shape": [1, 1, 2], "data": { "kind": "values", "values": [2.0, -1.5] } },
40
+ "keyNormScaleT": { "dtype": "float16", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } },
41
+ "queryNormScaleT": { "dtype": "float16", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } }
42
+ },
43
+ "outputs": {
44
+ "outputT": {
45
+ "dtype": "float16",
46
+ "shape": [1, 1, 1, 2],
47
+ "data": { "kind": "values", "values": [1.486328125, -1.115234375] },
48
+ "tolerance": 0.0005,
49
+ "relTolerance": 0.002
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "name": "ort_zero_dot_product",
55
+ "provenance": {
56
+ "source": "ORT: onnxruntime/test/contrib_ops/engram_ops_test.cc",
57
+ "test": "EngramOpsTest.EngramGateZeroDotProduct",
58
+ "notes": "Orthogonal key and query make the dot product vanish, and the gate must be exactly 0.5 rather than sigmoid(sqrt(1e-6)). A copysign spelling of the signed square root fails this case and nothing else."
59
+ },
60
+ "attrs": { "epsilon": 0.00001 },
61
+ "inputs": {
62
+ "keyT": { "dtype": "float32", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [1.0, 0.0] } },
63
+ "queryT": { "dtype": "float32", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [0.0, 1.0] } },
64
+ "valueT": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "values", "values": [1.0, -1.0] } },
65
+ "keyNormScaleT": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } },
66
+ "queryNormScaleT": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 1.0] } }
67
+ },
68
+ "outputs": {
69
+ "outputT": {
70
+ "dtype": "float32",
71
+ "shape": [1, 1, 1, 2],
72
+ "data": { "kind": "values", "values": [0.5, -0.5] },
73
+ "tolerance": 0.00001,
74
+ "relTolerance": 0.00001
75
+ }
76
+ }
77
+ },
78
+ {
79
+ "name": "ort_vectorized_h4_float",
80
+ "provenance": {
81
+ "source": "ORT: onnxruntime/test/contrib_ops/engram_ops_test.cc",
82
+ "test": "EngramOpsTest.EngramGateVectorizedFloat",
83
+ "notes": "Upstream's vectorized case verbatim, including its bounded sine generator: batch 1, sequence 2, hc_mult 2, hidden 4, with distinct per-stream norm scales so a wrong scale row is visible. Expected values recomputed in float32."
84
+ },
85
+ "attrs": { "epsilon": 0.00001 },
86
+ "inputs": {
87
+ "keyT": {
88
+ "dtype": "float32",
89
+ "shape": [1, 2, 2, 4],
90
+ "data": {
91
+ "kind": "values",
92
+ "values": [-0.7833269238471985, -0.5646424293518066, -0.295520156621933, 5.960464477539063e-8, 0.29552027583122253, 0.5646424889564514, 0.7833269834518433, 0.9320391416549683, 0.9974949955940247, 0.9738476276397705, 0.8632094264030457, 0.6754631400108337, 0.4273796081542969, 0.14112000167369843, -0.15774588286876678, -0.4425203502178192]
93
+ }
94
+ },
95
+ "queryT": {
96
+ "dtype": "float32",
97
+ "shape": [1, 2, 2, 4],
98
+ "data": {
99
+ "kind": "values",
100
+ "values": [0.9320390820503235, 0.81341552734375, 0.6442177295684814, 0.434965580701828, 0.19866937398910522, -0.04997912049293518, -0.295520156621933, -0.5226871967315674, -0.7173560857772827, -0.8674232363700867, -0.9635581374168396, -0.9997837543487549, -0.9738476276397705, -0.8873624205589294, -0.745705246925354, -0.5576837658882141]
101
+ }
102
+ },
103
+ "valueT": {
104
+ "dtype": "float32",
105
+ "shape": [1, 2, 4],
106
+ "data": {
107
+ "kind": "values",
108
+ "values": [0.3894183337688446, 0.681638777256012, 0.8912073373794556, 0.9927129745483398, 0.9738476276397705, 0.8368987441062927, 0.5984721779823303, 0.28747788071632385]
109
+ }
110
+ },
111
+ "keyNormScaleT": {
112
+ "dtype": "float32",
113
+ "shape": [2, 4],
114
+ "data": {
115
+ "kind": "values",
116
+ "values": [0.5646424889564514, 0.6442177295684814, 0.7173560857772827, 0.7833269238471985, 0.8414710164070129, 0.8912073373794556, 0.9320390820503235, 0.9635581374168396]
117
+ }
118
+ },
119
+ "queryNormScaleT": {
120
+ "dtype": "float32",
121
+ "shape": [2, 4],
122
+ "data": {
123
+ "kind": "values",
124
+ "values": [0.9854497313499451, 0.9489846229553223, 0.8912073373794556, 0.8134154677391052, 0.7173560857772827, 0.605186402797699, 0.47942548990249634, 0.3428977131843567]
125
+ }
126
+ }
127
+ },
128
+ "outputs": {
129
+ "outputT": {
130
+ "dtype": "float32",
131
+ "shape": [1, 2, 2, 4],
132
+ "data": {
133
+ "kind": "values",
134
+ "values": [0.10116856545209885, 0.17708569765090942, 0.23153036832809448, 0.2579009234905243, 0.1250687837600708, 0.21892069280147552, 0.28622743487358093, 0.3188278377056122, 0.2453785240650177, 0.21087177097797394, 0.15079589188098907, 0.07243525236845016, 0.3465985059738159, 0.2978575527667999, 0.21300002932548523, 0.10231518745422363]
135
+ },
136
+ "tolerance": 0.000002,
137
+ "relTolerance": 0.00002
138
+ }
139
+ }
140
+ },
141
+ {
142
+ "name": "ort_vectorized_h4_float16",
143
+ "provenance": {
144
+ "source": "ORT: onnxruntime/test/contrib_ops/engram_ops_test.cc",
145
+ "test": "EngramOpsTest.EngramGateVectorizedFloat16",
146
+ "notes": "Upstream's vectorized case verbatim, including its bounded sine generator: batch 1, sequence 2, hc_mult 2, hidden 4, with distinct per-stream norm scales so a wrong scale row is visible. Expected values recomputed in float32."
147
+ },
148
+ "attrs": { "epsilon": 0.00001 },
149
+ "inputs": {
150
+ "keyT": {
151
+ "dtype": "float16",
152
+ "shape": [1, 2, 2, 4],
153
+ "data": {
154
+ "kind": "values",
155
+ "values": [-0.783203125, -0.564453125, -0.29541015625, 5.960464477539063e-8, 0.29541015625, 0.564453125, 0.783203125, 0.93212890625, 0.99755859375, 0.9736328125, 0.86328125, 0.67529296875, 0.427490234375, 0.14111328125, -0.15771484375, -0.442626953125]
156
+ }
157
+ },
158
+ "queryT": {
159
+ "dtype": "float16",
160
+ "shape": [1, 2, 2, 4],
161
+ "data": {
162
+ "kind": "values",
163
+ "values": [0.93212890625, 0.8134765625, 0.64404296875, 0.43505859375, 0.1986083984375, -0.04998779296875, -0.29541015625, -0.5224609375, -0.71728515625, -0.8671875, -0.96337890625, -1.0, -0.9736328125, -0.88720703125, -0.74560546875, -0.5576171875]
164
+ }
165
+ },
166
+ "valueT": {
167
+ "dtype": "float16",
168
+ "shape": [1, 2, 4],
169
+ "data": {
170
+ "kind": "values",
171
+ "values": [0.389404296875, 0.681640625, 0.89111328125, 0.99267578125, 0.9736328125, 0.8369140625, 0.5986328125, 0.28759765625]
172
+ }
173
+ },
174
+ "keyNormScaleT": {
175
+ "dtype": "float16",
176
+ "shape": [2, 4],
177
+ "data": {
178
+ "kind": "values",
179
+ "values": [0.564453125, 0.64404296875, 0.71728515625, 0.783203125, 0.84130859375, 0.89111328125, 0.93212890625, 0.96337890625]
180
+ }
181
+ },
182
+ "queryNormScaleT": {
183
+ "dtype": "float16",
184
+ "shape": [2, 4],
185
+ "data": {
186
+ "kind": "values",
187
+ "values": [0.9853515625, 0.94921875, 0.89111328125, 0.8134765625, 0.71728515625, 0.60498046875, 0.4794921875, 0.343017578125]
188
+ }
189
+ }
190
+ },
191
+ "outputs": {
192
+ "outputT": {
193
+ "dtype": "float16",
194
+ "shape": [1, 2, 2, 4],
195
+ "data": {
196
+ "kind": "values",
197
+ "values": [0.1011962890625, 0.1771240234375, 0.2315673828125, 0.2578125, 0.125, 0.2188720703125, 0.2861328125, 0.31884765625, 0.245361328125, 0.2109375, 0.15087890625, 0.07244873046875, 0.3466796875, 0.2978515625, 0.213134765625, 0.10235595703125]
198
+ },
199
+ "tolerance": 0.0005,
200
+ "relTolerance": 0.002
201
+ }
202
+ }
203
+ },
204
+ {
205
+ "name": "ort_multi_iteration_h260_float",
206
+ "provenance": {
207
+ "notes": "Upstream's multi-iteration reduction geometry: batch 1, sequence 2, hc_mult 2, hidden 260, the smallest multiple of four above both of the upstream accumulation strides. The inputs use a bounded fill rather than upstream's sine wave, so the expectation comes from the reference."
208
+ },
209
+ "inputs": {
210
+ "keyT": {
211
+ "dtype": "float32",
212
+ "shape": [1, 2, 2, 260],
213
+ "data": { "kind": "fillFloat32", "sinStep": 0.12, "cosStep": 0.3, "scale": 1.0 }
214
+ },
215
+ "queryT": {
216
+ "dtype": "float32",
217
+ "shape": [1, 2, 2, 260],
218
+ "data": { "kind": "fillFloat32", "sinStep": 0.18, "cosStep": 0.34, "scale": 1.0 }
219
+ },
220
+ "valueT": {
221
+ "dtype": "float32",
222
+ "shape": [1, 2, 260],
223
+ "data": { "kind": "fillFloat32", "sinStep": 0.24, "cosStep": 0.39999999999999997, "scale": 1.0 }
224
+ },
225
+ "keyNormScaleT": {
226
+ "dtype": "float32",
227
+ "shape": [2, 260],
228
+ "data": { "kind": "fillFloat32", "sinStep": 0.14, "cosStep": 0.42, "scale": 0.5, "offset": 1.0 }
229
+ },
230
+ "queryNormScaleT": {
231
+ "dtype": "float32",
232
+ "shape": [2, 260],
233
+ "data": { "kind": "fillFloat32", "sinStep": 0.16, "cosStep": 0.48, "scale": 0.5, "offset": 1.0 }
234
+ }
235
+ },
236
+ "outputs": {
237
+ "outputT": { "dtype": "float32", "shape": [1, 2, 2, 260], "tolerance": 0.000002, "relTolerance": 0.00002 }
238
+ }
239
+ },
240
+ {
241
+ "name": "ort_multi_iteration_h260_float16",
242
+ "provenance": { "notes": "The float16 half of the same multi-iteration reduction geometry." },
243
+ "inputs": {
244
+ "keyT": {
245
+ "dtype": "float16",
246
+ "shape": [1, 2, 2, 260],
247
+ "data": { "kind": "fillFloat32", "sinStep": 0.18000000000000002, "cosStep": 0.36, "scale": 1.0 }
248
+ },
249
+ "queryT": {
250
+ "dtype": "float16",
251
+ "shape": [1, 2, 2, 260],
252
+ "data": { "kind": "fillFloat32", "sinStep": 0.24000000000000002, "cosStep": 0.4, "scale": 1.0 }
253
+ },
254
+ "valueT": {
255
+ "dtype": "float16",
256
+ "shape": [1, 2, 260],
257
+ "data": {
258
+ "kind": "fillFloat32",
259
+ "sinStep": 0.30000000000000004,
260
+ "cosStep": 0.45999999999999996,
261
+ "scale": 1.0
262
+ }
263
+ },
264
+ "keyNormScaleT": {
265
+ "dtype": "float16",
266
+ "shape": [2, 260],
267
+ "data": { "kind": "fillFloat32", "sinStep": 0.2, "cosStep": 0.48, "scale": 0.5, "offset": 1.0 }
268
+ },
269
+ "queryNormScaleT": {
270
+ "dtype": "float16",
271
+ "shape": [2, 260],
272
+ "data": {
273
+ "kind": "fillFloat32",
274
+ "sinStep": 0.22000000000000003,
275
+ "cosStep": 0.54,
276
+ "scale": 0.5,
277
+ "offset": 1.0
278
+ }
279
+ }
280
+ },
281
+ "outputs": {
282
+ "outputT": { "dtype": "float16", "shape": [1, 2, 2, 260], "tolerance": 0.0005, "relTolerance": 0.002 }
283
+ }
284
+ },
285
+ {
286
+ "name": "nanowhale_decode_h320_f32",
287
+ "provenance": {
288
+ "notes": "One decoded token of the DeepSeek-V4 nanowhale geometry: four hyper-connection streams of 320 channels. Four rows in the whole dispatch, the launch-bound end of the operator."
289
+ },
290
+ "inputs": {
291
+ "keyT": {
292
+ "dtype": "float32",
293
+ "shape": [1, 1, 4, 320],
294
+ "data": {
295
+ "kind": "fillFloat32",
296
+ "sinStep": 0.24000000000000002,
297
+ "cosStep": 0.42000000000000004,
298
+ "scale": 1.0
299
+ }
300
+ },
301
+ "queryT": {
302
+ "dtype": "float32",
303
+ "shape": [1, 1, 4, 320],
304
+ "data": { "kind": "fillFloat32", "sinStep": 0.30000000000000004, "cosStep": 0.46, "scale": 1.0 }
305
+ },
306
+ "valueT": {
307
+ "dtype": "float32",
308
+ "shape": [1, 1, 320],
309
+ "data": { "kind": "fillFloat32", "sinStep": 0.36, "cosStep": 0.52, "scale": 1.0 }
310
+ },
311
+ "keyNormScaleT": {
312
+ "dtype": "float32",
313
+ "shape": [4, 320],
314
+ "data": { "kind": "fillFloat32", "sinStep": 0.26, "cosStep": 0.54, "scale": 0.5, "offset": 1.0 }
315
+ },
316
+ "queryNormScaleT": {
317
+ "dtype": "float32",
318
+ "shape": [4, 320],
319
+ "data": { "kind": "fillFloat32", "sinStep": 0.28, "cosStep": 0.6, "scale": 0.5, "offset": 1.0 }
320
+ }
321
+ },
322
+ "outputs": {
323
+ "outputT": { "dtype": "float32", "shape": [1, 1, 4, 320], "tolerance": 0.000002, "relTolerance": 0.00002 }
324
+ }
325
+ },
326
+ {
327
+ "name": "nanowhale_prefill_s5_hc3_h320_f16",
328
+ "provenance": {
329
+ "notes": "Fifteen rows of 320 at three streams: neither the row count nor the stream count divides the rows a workgroup carries, so the trailing lane groups fold an empty row."
330
+ },
331
+ "inputs": {
332
+ "keyT": {
333
+ "dtype": "float16",
334
+ "shape": [1, 5, 3, 320],
335
+ "data": { "kind": "fillFloat32", "sinStep": 0.3, "cosStep": 0.48, "scale": 1.0 }
336
+ },
337
+ "queryT": {
338
+ "dtype": "float16",
339
+ "shape": [1, 5, 3, 320],
340
+ "data": { "kind": "fillFloat32", "sinStep": 0.36, "cosStep": 0.52, "scale": 1.0 }
341
+ },
342
+ "valueT": {
343
+ "dtype": "float16",
344
+ "shape": [1, 5, 320],
345
+ "data": { "kind": "fillFloat32", "sinStep": 0.42, "cosStep": 0.58, "scale": 1.0 }
346
+ },
347
+ "keyNormScaleT": {
348
+ "dtype": "float16",
349
+ "shape": [3, 320],
350
+ "data": { "kind": "fillFloat32", "sinStep": 0.31999999999999995, "cosStep": 0.6, "scale": 0.5, "offset": 1.0 }
351
+ },
352
+ "queryNormScaleT": {
353
+ "dtype": "float16",
354
+ "shape": [3, 320],
355
+ "data": {
356
+ "kind": "fillFloat32",
357
+ "sinStep": 0.33999999999999997,
358
+ "cosStep": 0.6599999999999999,
359
+ "scale": 0.5,
360
+ "offset": 1.0
361
+ }
362
+ }
363
+ },
364
+ "outputs": {
365
+ "outputT": { "dtype": "float16", "shape": [1, 5, 3, 320], "tolerance": 0.0005, "relTolerance": 0.002 }
366
+ }
367
+ },
368
+ {
369
+ "name": "v4flash_decode_h4096_f32",
370
+ "provenance": {
371
+ "notes": "One decoded token of the DeepSeek-V4 v4flash geometry: four streams of 4096 channels, the widest row that still stages in registers."
372
+ },
373
+ "inputs": {
374
+ "keyT": {
375
+ "dtype": "float32",
376
+ "shape": [1, 1, 4, 4096],
377
+ "data": { "kind": "fillFloat32", "sinStep": 0.32, "cosStep": 0.5, "scale": 1.0 }
378
+ },
379
+ "queryT": {
380
+ "dtype": "float32",
381
+ "shape": [1, 1, 4, 4096],
382
+ "data": { "kind": "fillFloat32", "sinStep": 0.38, "cosStep": 0.54, "scale": 1.0 }
383
+ },
384
+ "valueT": {
385
+ "dtype": "float32",
386
+ "shape": [1, 1, 4096],
387
+ "data": { "kind": "fillFloat32", "sinStep": 0.44, "cosStep": 0.6, "scale": 1.0 }
388
+ },
389
+ "keyNormScaleT": {
390
+ "dtype": "float32",
391
+ "shape": [4, 4096],
392
+ "data": {
393
+ "kind": "fillFloat32",
394
+ "sinStep": 0.33999999999999997,
395
+ "cosStep": 0.62,
396
+ "scale": 0.5,
397
+ "offset": 1.0
398
+ }
399
+ },
400
+ "queryNormScaleT": {
401
+ "dtype": "float32",
402
+ "shape": [4, 4096],
403
+ "data": { "kind": "fillFloat32", "sinStep": 0.36, "cosStep": 0.6799999999999999, "scale": 0.5, "offset": 1.0 }
404
+ }
405
+ },
406
+ "outputs": {
407
+ "outputT": { "dtype": "float32", "shape": [1, 1, 4, 4096], "tolerance": 0.000002, "relTolerance": 0.00002 }
408
+ }
409
+ },
410
+ {
411
+ "name": "v4flash_decode_h4096_f16",
412
+ "provenance": { "notes": "The float16 half of the v4flash decode geometry." },
413
+ "inputs": {
414
+ "keyT": {
415
+ "dtype": "float16",
416
+ "shape": [1, 1, 4, 4096],
417
+ "data": { "kind": "fillFloat32", "sinStep": 0.38, "cosStep": 0.56, "scale": 1.0 }
418
+ },
419
+ "queryT": {
420
+ "dtype": "float16",
421
+ "shape": [1, 1, 4, 4096],
422
+ "data": { "kind": "fillFloat32", "sinStep": 0.44, "cosStep": 0.6, "scale": 1.0 }
423
+ },
424
+ "valueT": {
425
+ "dtype": "float16",
426
+ "shape": [1, 1, 4096],
427
+ "data": { "kind": "fillFloat32", "sinStep": 0.5, "cosStep": 0.6599999999999999, "scale": 1.0 }
428
+ },
429
+ "keyNormScaleT": {
430
+ "dtype": "float16",
431
+ "shape": [4, 4096],
432
+ "data": { "kind": "fillFloat32", "sinStep": 0.4, "cosStep": 0.6799999999999999, "scale": 0.5, "offset": 1.0 }
433
+ },
434
+ "queryNormScaleT": {
435
+ "dtype": "float16",
436
+ "shape": [4, 4096],
437
+ "data": { "kind": "fillFloat32", "sinStep": 0.42, "cosStep": 0.74, "scale": 0.5, "offset": 1.0 }
438
+ }
439
+ },
440
+ "outputs": {
441
+ "outputT": { "dtype": "float16", "shape": [1, 1, 4, 4096], "tolerance": 0.0005, "relTolerance": 0.002 }
442
+ }
443
+ },
444
+ {
445
+ "name": "batched_hc2_h64_f32",
446
+ "provenance": {
447
+ "notes": "Batch 3, sequence 5, two streams of 64 channels: a row is far narrower than a subgroup here, so several rows fold inside one subgroup and a wrong batch, token or stream index moves the gate."
448
+ },
449
+ "inputs": {
450
+ "keyT": {
451
+ "dtype": "float32",
452
+ "shape": [3, 5, 2, 64],
453
+ "data": { "kind": "fillFloat32", "sinStep": 0.42, "cosStep": 0.6, "scale": 1.0 }
454
+ },
455
+ "queryT": {
456
+ "dtype": "float32",
457
+ "shape": [3, 5, 2, 64],
458
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.64, "scale": 1.0 }
459
+ },
460
+ "valueT": {
461
+ "dtype": "float32",
462
+ "shape": [3, 5, 64],
463
+ "data": { "kind": "fillFloat32", "sinStep": 0.54, "cosStep": 0.7, "scale": 1.0 }
464
+ },
465
+ "keyNormScaleT": {
466
+ "dtype": "float32",
467
+ "shape": [2, 64],
468
+ "data": {
469
+ "kind": "fillFloat32",
470
+ "sinStep": 0.43999999999999995,
471
+ "cosStep": 0.72,
472
+ "scale": 0.5,
473
+ "offset": 1.0
474
+ }
475
+ },
476
+ "queryNormScaleT": {
477
+ "dtype": "float32",
478
+ "shape": [2, 64],
479
+ "data": {
480
+ "kind": "fillFloat32",
481
+ "sinStep": 0.45999999999999996,
482
+ "cosStep": 0.78,
483
+ "scale": 0.5,
484
+ "offset": 1.0
485
+ }
486
+ }
487
+ },
488
+ "outputs": {
489
+ "outputT": { "dtype": "float32", "shape": [3, 5, 2, 64], "tolerance": 0.000002, "relTolerance": 0.00002 }
490
+ }
491
+ },
492
+ {
493
+ "name": "batched_hc3_h128_f16",
494
+ "provenance": { "notes": "Batch 2, sequence 3, three streams of 128 channels in float16." },
495
+ "inputs": {
496
+ "keyT": {
497
+ "dtype": "float16",
498
+ "shape": [2, 3, 3, 128],
499
+ "data": { "kind": "fillFloat32", "sinStep": 0.44, "cosStep": 0.62, "scale": 1.0 }
500
+ },
501
+ "queryT": {
502
+ "dtype": "float16",
503
+ "shape": [2, 3, 3, 128],
504
+ "data": { "kind": "fillFloat32", "sinStep": 0.5, "cosStep": 0.66, "scale": 1.0 }
505
+ },
506
+ "valueT": {
507
+ "dtype": "float16",
508
+ "shape": [2, 3, 128],
509
+ "data": { "kind": "fillFloat32", "sinStep": 0.56, "cosStep": 0.72, "scale": 1.0 }
510
+ },
511
+ "keyNormScaleT": {
512
+ "dtype": "float16",
513
+ "shape": [3, 128],
514
+ "data": {
515
+ "kind": "fillFloat32",
516
+ "sinStep": 0.45999999999999996,
517
+ "cosStep": 0.74,
518
+ "scale": 0.5,
519
+ "offset": 1.0
520
+ }
521
+ },
522
+ "queryNormScaleT": {
523
+ "dtype": "float16",
524
+ "shape": [3, 128],
525
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.8, "scale": 0.5, "offset": 1.0 }
526
+ }
527
+ },
528
+ "outputs": {
529
+ "outputT": { "dtype": "float16", "shape": [2, 3, 3, 128], "tolerance": 0.0005, "relTolerance": 0.002 }
530
+ }
531
+ },
532
+ {
533
+ "name": "hc_one_h512_f32",
534
+ "provenance": {
535
+ "notes": "A single hyper-connection stream: the degenerate case where the per-stream scale lookup and a shared scale agree, kept because upstream's own smallest tests are shaped this way."
536
+ },
537
+ "inputs": {
538
+ "keyT": {
539
+ "dtype": "float32",
540
+ "shape": [2, 2, 1, 512],
541
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.6599999999999999, "scale": 1.0 }
542
+ },
543
+ "queryT": {
544
+ "dtype": "float32",
545
+ "shape": [2, 2, 1, 512],
546
+ "data": { "kind": "fillFloat32", "sinStep": 0.54, "cosStep": 0.7, "scale": 1.0 }
547
+ },
548
+ "valueT": {
549
+ "dtype": "float32",
550
+ "shape": [2, 2, 512],
551
+ "data": { "kind": "fillFloat32", "sinStep": 0.6, "cosStep": 0.76, "scale": 1.0 }
552
+ },
553
+ "keyNormScaleT": {
554
+ "dtype": "float32",
555
+ "shape": [1, 512],
556
+ "data": { "kind": "fillFloat32", "sinStep": 0.5, "cosStep": 0.78, "scale": 0.5, "offset": 1.0 }
557
+ },
558
+ "queryNormScaleT": {
559
+ "dtype": "float32",
560
+ "shape": [1, 512],
561
+ "data": { "kind": "fillFloat32", "sinStep": 0.52, "cosStep": 0.84, "scale": 0.5, "offset": 1.0 }
562
+ }
563
+ },
564
+ "outputs": {
565
+ "outputT": { "dtype": "float32", "shape": [2, 2, 1, 512], "tolerance": 0.000002, "relTolerance": 0.00002 }
566
+ }
567
+ },
568
+ {
569
+ "name": "wide_h8192_f16",
570
+ "provenance": {
571
+ "notes": "8192 channels per row: the row fills a whole workgroup and every lane stages the maximum eight vector words."
572
+ },
573
+ "inputs": {
574
+ "keyT": {
575
+ "dtype": "float16",
576
+ "shape": [1, 1, 2, 8192],
577
+ "data": { "kind": "fillFloat32", "sinStep": 0.54, "cosStep": 0.72, "scale": 1.0 }
578
+ },
579
+ "queryT": {
580
+ "dtype": "float16",
581
+ "shape": [1, 1, 2, 8192],
582
+ "data": { "kind": "fillFloat32", "sinStep": 0.6000000000000001, "cosStep": 0.76, "scale": 1.0 }
583
+ },
584
+ "valueT": {
585
+ "dtype": "float16",
586
+ "shape": [1, 1, 8192],
587
+ "data": { "kind": "fillFloat32", "sinStep": 0.66, "cosStep": 0.8200000000000001, "scale": 1.0 }
588
+ },
589
+ "keyNormScaleT": {
590
+ "dtype": "float16",
591
+ "shape": [2, 8192],
592
+ "data": { "kind": "fillFloat32", "sinStep": 0.56, "cosStep": 0.8400000000000001, "scale": 0.5, "offset": 1.0 }
593
+ },
594
+ "queryNormScaleT": {
595
+ "dtype": "float16",
596
+ "shape": [2, 8192],
597
+ "data": { "kind": "fillFloat32", "sinStep": 0.5800000000000001, "cosStep": 0.9, "scale": 0.5, "offset": 1.0 }
598
+ }
599
+ },
600
+ "outputs": {
601
+ "outputT": { "dtype": "float16", "shape": [1, 1, 2, 8192], "tolerance": 0.0005, "relTolerance": 0.002 }
602
+ }
603
+ },
604
+ {
605
+ "name": "wide_h16384_f32",
606
+ "provenance": {
607
+ "notes": "16384 channels per row: too wide to stage, so the statistic pass and the store pass each walk the row."
608
+ },
609
+ "inputs": {
610
+ "keyT": {
611
+ "dtype": "float32",
612
+ "shape": [1, 1, 2, 16384],
613
+ "data": { "kind": "fillFloat32", "sinStep": 0.6, "cosStep": 0.78, "scale": 1.0 }
614
+ },
615
+ "queryT": {
616
+ "dtype": "float32",
617
+ "shape": [1, 1, 2, 16384],
618
+ "data": { "kind": "fillFloat32", "sinStep": 0.6599999999999999, "cosStep": 0.82, "scale": 1.0 }
619
+ },
620
+ "valueT": {
621
+ "dtype": "float32",
622
+ "shape": [1, 1, 16384],
623
+ "data": { "kind": "fillFloat32", "sinStep": 0.72, "cosStep": 0.8799999999999999, "scale": 1.0 }
624
+ },
625
+ "keyNormScaleT": {
626
+ "dtype": "float32",
627
+ "shape": [2, 16384],
628
+ "data": { "kind": "fillFloat32", "sinStep": 0.62, "cosStep": 0.8999999999999999, "scale": 0.5, "offset": 1.0 }
629
+ },
630
+ "queryNormScaleT": {
631
+ "dtype": "float32",
632
+ "shape": [2, 16384],
633
+ "data": { "kind": "fillFloat32", "sinStep": 0.64, "cosStep": 0.96, "scale": 0.5, "offset": 1.0 }
634
+ }
635
+ },
636
+ "outputs": {
637
+ "outputT": { "dtype": "float32", "shape": [1, 1, 2, 16384], "tolerance": 0.000002, "relTolerance": 0.00005 }
638
+ }
639
+ },
640
+ {
641
+ "name": "scalar_h6_f32",
642
+ "provenance": {
643
+ "notes": "Six channels per row: not a multiple of four, so the scalar route runs, and narrow enough that one lane group covers three rows of a subgroup."
644
+ },
645
+ "inputs": {
646
+ "keyT": {
647
+ "dtype": "float32",
648
+ "shape": [1, 5, 3, 6],
649
+ "data": { "kind": "fillFloat32", "sinStep": 0.62, "cosStep": 0.8, "scale": 1.0 }
650
+ },
651
+ "queryT": {
652
+ "dtype": "float32",
653
+ "shape": [1, 5, 3, 6],
654
+ "data": { "kind": "fillFloat32", "sinStep": 0.6799999999999999, "cosStep": 0.84, "scale": 1.0 }
655
+ },
656
+ "valueT": {
657
+ "dtype": "float32",
658
+ "shape": [1, 5, 6],
659
+ "data": { "kind": "fillFloat32", "sinStep": 0.74, "cosStep": 0.8999999999999999, "scale": 1.0 }
660
+ },
661
+ "keyNormScaleT": {
662
+ "dtype": "float32",
663
+ "shape": [3, 6],
664
+ "data": { "kind": "fillFloat32", "sinStep": 0.64, "cosStep": 0.9199999999999999, "scale": 0.5, "offset": 1.0 }
665
+ },
666
+ "queryNormScaleT": {
667
+ "dtype": "float32",
668
+ "shape": [3, 6],
669
+ "data": { "kind": "fillFloat32", "sinStep": 0.66, "cosStep": 0.98, "scale": 0.5, "offset": 1.0 }
670
+ }
671
+ },
672
+ "outputs": {
673
+ "outputT": { "dtype": "float32", "shape": [1, 5, 3, 6], "tolerance": 0.000002, "relTolerance": 0.00002 }
674
+ }
675
+ },
676
+ {
677
+ "name": "scalar_h130_f16",
678
+ "provenance": { "notes": "130 channels per row in float16: the scalar route with several words per lane." },
679
+ "inputs": {
680
+ "keyT": {
681
+ "dtype": "float16",
682
+ "shape": [2, 3, 2, 130],
683
+ "data": { "kind": "fillFloat32", "sinStep": 0.68, "cosStep": 0.8600000000000001, "scale": 1.0 }
684
+ },
685
+ "queryT": {
686
+ "dtype": "float16",
687
+ "shape": [2, 3, 2, 130],
688
+ "data": { "kind": "fillFloat32", "sinStep": 0.74, "cosStep": 0.9, "scale": 1.0 }
689
+ },
690
+ "valueT": {
691
+ "dtype": "float16",
692
+ "shape": [2, 3, 130],
693
+ "data": { "kind": "fillFloat32", "sinStep": 0.8, "cosStep": 0.96, "scale": 1.0 }
694
+ },
695
+ "keyNormScaleT": {
696
+ "dtype": "float16",
697
+ "shape": [2, 130],
698
+ "data": { "kind": "fillFloat32", "sinStep": 0.7000000000000001, "cosStep": 0.98, "scale": 0.5, "offset": 1.0 }
699
+ },
700
+ "queryNormScaleT": {
701
+ "dtype": "float16",
702
+ "shape": [2, 130],
703
+ "data": { "kind": "fillFloat32", "sinStep": 0.7200000000000001, "cosStep": 1.04, "scale": 0.5, "offset": 1.0 }
704
+ }
705
+ },
706
+ "outputs": {
707
+ "outputT": { "dtype": "float16", "shape": [2, 3, 2, 130], "tolerance": 0.0005, "relTolerance": 0.002 }
708
+ }
709
+ },
710
+ {
711
+ "name": "scalar_h1_f32",
712
+ "provenance": {
713
+ "notes": "One channel per row: a single lane owns the whole row, so no fold runs at all and the statistic is the lane's own accumulator."
714
+ },
715
+ "inputs": {
716
+ "keyT": {
717
+ "dtype": "float32",
718
+ "shape": [1, 4, 2, 1],
719
+ "data": { "kind": "fillFloat32", "sinStep": 0.72, "cosStep": 0.8999999999999999, "scale": 1.0 }
720
+ },
721
+ "queryT": {
722
+ "dtype": "float32",
723
+ "shape": [1, 4, 2, 1],
724
+ "data": { "kind": "fillFloat32", "sinStep": 0.78, "cosStep": 0.94, "scale": 1.0 }
725
+ },
726
+ "valueT": {
727
+ "dtype": "float32",
728
+ "shape": [1, 4, 1],
729
+ "data": { "kind": "fillFloat32", "sinStep": 0.84, "cosStep": 1.0, "scale": 1.0 }
730
+ },
731
+ "keyNormScaleT": {
732
+ "dtype": "float32",
733
+ "shape": [2, 1],
734
+ "data": { "kind": "fillFloat32", "sinStep": 0.74, "cosStep": 1.02, "scale": 0.5, "offset": 1.0 }
735
+ },
736
+ "queryNormScaleT": {
737
+ "dtype": "float32",
738
+ "shape": [2, 1],
739
+ "data": { "kind": "fillFloat32", "sinStep": 0.76, "cosStep": 1.08, "scale": 0.5, "offset": 1.0 }
740
+ }
741
+ },
742
+ "outputs": {
743
+ "outputT": { "dtype": "float32", "shape": [1, 4, 2, 1], "tolerance": 0.000002, "relTolerance": 0.00002 }
744
+ }
745
+ },
746
+ {
747
+ "name": "scalar_wide_h2050_f32",
748
+ "provenance": {
749
+ "notes": "2050 channels per row: an unvectorizable width too wide to stage, the streaming scalar route."
750
+ },
751
+ "inputs": {
752
+ "keyT": {
753
+ "dtype": "float32",
754
+ "shape": [1, 1, 2, 2050],
755
+ "data": { "kind": "fillFloat32", "sinStep": 0.74, "cosStep": 0.9199999999999999, "scale": 1.0 }
756
+ },
757
+ "queryT": {
758
+ "dtype": "float32",
759
+ "shape": [1, 1, 2, 2050],
760
+ "data": { "kind": "fillFloat32", "sinStep": 0.8, "cosStep": 0.96, "scale": 1.0 }
761
+ },
762
+ "valueT": {
763
+ "dtype": "float32",
764
+ "shape": [1, 1, 2050],
765
+ "data": { "kind": "fillFloat32", "sinStep": 0.86, "cosStep": 1.02, "scale": 1.0 }
766
+ },
767
+ "keyNormScaleT": {
768
+ "dtype": "float32",
769
+ "shape": [2, 2050],
770
+ "data": { "kind": "fillFloat32", "sinStep": 0.76, "cosStep": 1.04, "scale": 0.5, "offset": 1.0 }
771
+ },
772
+ "queryNormScaleT": {
773
+ "dtype": "float32",
774
+ "shape": [2, 2050],
775
+ "data": { "kind": "fillFloat32", "sinStep": 0.78, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
776
+ }
777
+ },
778
+ "outputs": {
779
+ "outputT": { "dtype": "float32", "shape": [1, 1, 2, 2050], "tolerance": 0.000002, "relTolerance": 0.00005 }
780
+ }
781
+ },
782
+ {
783
+ "name": "epsilon_dominant_h8_f32",
784
+ "provenance": {
785
+ "notes": "An epsilon of 1 against key and query rows two orders of magnitude smaller: the epsilon term, not the mean of squares, sets both inverse-RMS factors, which pins epsilon to the normalization denominators and away from the gate's own floor."
786
+ },
787
+ "attrs": { "epsilon": 1 },
788
+ "inputs": {
789
+ "keyT": {
790
+ "dtype": "float32",
791
+ "shape": [1, 3, 2, 8],
792
+ "data": { "kind": "fillFloat32", "sinStep": 0.8, "cosStep": 0.98, "scale": 0.01 }
793
+ },
794
+ "queryT": {
795
+ "dtype": "float32",
796
+ "shape": [1, 3, 2, 8],
797
+ "data": { "kind": "fillFloat32", "sinStep": 0.8600000000000001, "cosStep": 1.02, "scale": 0.01 }
798
+ },
799
+ "valueT": {
800
+ "dtype": "float32",
801
+ "shape": [1, 3, 8],
802
+ "data": { "kind": "fillFloat32", "sinStep": 0.92, "cosStep": 1.08, "scale": 1.0 }
803
+ },
804
+ "keyNormScaleT": {
805
+ "dtype": "float32",
806
+ "shape": [2, 8],
807
+ "data": { "kind": "fillFloat32", "sinStep": 0.8200000000000001, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
808
+ },
809
+ "queryNormScaleT": {
810
+ "dtype": "float32",
811
+ "shape": [2, 8],
812
+ "data": {
813
+ "kind": "fillFloat32",
814
+ "sinStep": 0.8400000000000001,
815
+ "cosStep": 1.1600000000000001,
816
+ "scale": 0.5,
817
+ "offset": 1.0
818
+ }
819
+ }
820
+ },
821
+ "outputs": {
822
+ "outputT": { "dtype": "float32", "shape": [1, 3, 2, 8], "tolerance": 0.000002, "relTolerance": 0.00002 }
823
+ }
824
+ },
825
+ {
826
+ "name": "packing_float32_h63_r3",
827
+ "inputs": {
828
+ "keyT": {
829
+ "shape": [1, 1, 3, 63],
830
+ "dtype": "float32",
831
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
832
+ },
833
+ "queryT": {
834
+ "shape": [1, 1, 3, 63],
835
+ "dtype": "float32",
836
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
837
+ },
838
+ "valueT": {
839
+ "shape": [1, 1, 63],
840
+ "dtype": "float32",
841
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
842
+ },
843
+ "keyNormScaleT": {
844
+ "shape": [3, 63],
845
+ "dtype": "float32",
846
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
847
+ },
848
+ "queryNormScaleT": {
849
+ "shape": [3, 63],
850
+ "dtype": "float32",
851
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
852
+ }
853
+ },
854
+ "outputs": {
855
+ "outputT": { "shape": [1, 1, 3, 63], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
856
+ }
857
+ },
858
+ {
859
+ "name": "packing_float32_h63_r260",
860
+ "inputs": {
861
+ "keyT": {
862
+ "shape": [1, 65, 4, 63],
863
+ "dtype": "float32",
864
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
865
+ },
866
+ "queryT": {
867
+ "shape": [1, 65, 4, 63],
868
+ "dtype": "float32",
869
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
870
+ },
871
+ "valueT": {
872
+ "shape": [1, 65, 63],
873
+ "dtype": "float32",
874
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
875
+ },
876
+ "keyNormScaleT": {
877
+ "shape": [4, 63],
878
+ "dtype": "float32",
879
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
880
+ },
881
+ "queryNormScaleT": {
882
+ "shape": [4, 63],
883
+ "dtype": "float32",
884
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
885
+ }
886
+ },
887
+ "outputs": {
888
+ "outputT": { "shape": [1, 65, 4, 63], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
889
+ }
890
+ },
891
+ {
892
+ "name": "packing_float32_h65_r3",
893
+ "inputs": {
894
+ "keyT": {
895
+ "shape": [1, 1, 3, 65],
896
+ "dtype": "float32",
897
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
898
+ },
899
+ "queryT": {
900
+ "shape": [1, 1, 3, 65],
901
+ "dtype": "float32",
902
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
903
+ },
904
+ "valueT": {
905
+ "shape": [1, 1, 65],
906
+ "dtype": "float32",
907
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
908
+ },
909
+ "keyNormScaleT": {
910
+ "shape": [3, 65],
911
+ "dtype": "float32",
912
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
913
+ },
914
+ "queryNormScaleT": {
915
+ "shape": [3, 65],
916
+ "dtype": "float32",
917
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
918
+ }
919
+ },
920
+ "outputs": {
921
+ "outputT": { "shape": [1, 1, 3, 65], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
922
+ }
923
+ },
924
+ {
925
+ "name": "packing_float32_h65_r260",
926
+ "inputs": {
927
+ "keyT": {
928
+ "shape": [1, 65, 4, 65],
929
+ "dtype": "float32",
930
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
931
+ },
932
+ "queryT": {
933
+ "shape": [1, 65, 4, 65],
934
+ "dtype": "float32",
935
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
936
+ },
937
+ "valueT": {
938
+ "shape": [1, 65, 65],
939
+ "dtype": "float32",
940
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
941
+ },
942
+ "keyNormScaleT": {
943
+ "shape": [4, 65],
944
+ "dtype": "float32",
945
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
946
+ },
947
+ "queryNormScaleT": {
948
+ "shape": [4, 65],
949
+ "dtype": "float32",
950
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
951
+ }
952
+ },
953
+ "outputs": {
954
+ "outputT": { "shape": [1, 65, 4, 65], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
955
+ }
956
+ },
957
+ {
958
+ "name": "packing_float32_h129_r3",
959
+ "inputs": {
960
+ "keyT": {
961
+ "shape": [1, 1, 3, 129],
962
+ "dtype": "float32",
963
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
964
+ },
965
+ "queryT": {
966
+ "shape": [1, 1, 3, 129],
967
+ "dtype": "float32",
968
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
969
+ },
970
+ "valueT": {
971
+ "shape": [1, 1, 129],
972
+ "dtype": "float32",
973
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
974
+ },
975
+ "keyNormScaleT": {
976
+ "shape": [3, 129],
977
+ "dtype": "float32",
978
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
979
+ },
980
+ "queryNormScaleT": {
981
+ "shape": [3, 129],
982
+ "dtype": "float32",
983
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
984
+ }
985
+ },
986
+ "outputs": {
987
+ "outputT": { "shape": [1, 1, 3, 129], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
988
+ }
989
+ },
990
+ {
991
+ "name": "packing_float32_h129_r260",
992
+ "inputs": {
993
+ "keyT": {
994
+ "shape": [1, 65, 4, 129],
995
+ "dtype": "float32",
996
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
997
+ },
998
+ "queryT": {
999
+ "shape": [1, 65, 4, 129],
1000
+ "dtype": "float32",
1001
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1002
+ },
1003
+ "valueT": {
1004
+ "shape": [1, 65, 129],
1005
+ "dtype": "float32",
1006
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1007
+ },
1008
+ "keyNormScaleT": {
1009
+ "shape": [4, 129],
1010
+ "dtype": "float32",
1011
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1012
+ },
1013
+ "queryNormScaleT": {
1014
+ "shape": [4, 129],
1015
+ "dtype": "float32",
1016
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1017
+ }
1018
+ },
1019
+ "outputs": {
1020
+ "outputT": { "shape": [1, 65, 4, 129], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1021
+ }
1022
+ },
1023
+ {
1024
+ "name": "packing_float32_h130_r3",
1025
+ "inputs": {
1026
+ "keyT": {
1027
+ "shape": [1, 1, 3, 130],
1028
+ "dtype": "float32",
1029
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1030
+ },
1031
+ "queryT": {
1032
+ "shape": [1, 1, 3, 130],
1033
+ "dtype": "float32",
1034
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1035
+ },
1036
+ "valueT": {
1037
+ "shape": [1, 1, 130],
1038
+ "dtype": "float32",
1039
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1040
+ },
1041
+ "keyNormScaleT": {
1042
+ "shape": [3, 130],
1043
+ "dtype": "float32",
1044
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1045
+ },
1046
+ "queryNormScaleT": {
1047
+ "shape": [3, 130],
1048
+ "dtype": "float32",
1049
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1050
+ }
1051
+ },
1052
+ "outputs": {
1053
+ "outputT": { "shape": [1, 1, 3, 130], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1054
+ }
1055
+ },
1056
+ {
1057
+ "name": "packing_float32_h130_r260",
1058
+ "inputs": {
1059
+ "keyT": {
1060
+ "shape": [1, 65, 4, 130],
1061
+ "dtype": "float32",
1062
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1063
+ },
1064
+ "queryT": {
1065
+ "shape": [1, 65, 4, 130],
1066
+ "dtype": "float32",
1067
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1068
+ },
1069
+ "valueT": {
1070
+ "shape": [1, 65, 130],
1071
+ "dtype": "float32",
1072
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1073
+ },
1074
+ "keyNormScaleT": {
1075
+ "shape": [4, 130],
1076
+ "dtype": "float32",
1077
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1078
+ },
1079
+ "queryNormScaleT": {
1080
+ "shape": [4, 130],
1081
+ "dtype": "float32",
1082
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1083
+ }
1084
+ },
1085
+ "outputs": {
1086
+ "outputT": { "shape": [1, 65, 4, 130], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1087
+ }
1088
+ },
1089
+ {
1090
+ "name": "packing_float32_h131_r3",
1091
+ "inputs": {
1092
+ "keyT": {
1093
+ "shape": [1, 1, 3, 131],
1094
+ "dtype": "float32",
1095
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1096
+ },
1097
+ "queryT": {
1098
+ "shape": [1, 1, 3, 131],
1099
+ "dtype": "float32",
1100
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1101
+ },
1102
+ "valueT": {
1103
+ "shape": [1, 1, 131],
1104
+ "dtype": "float32",
1105
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1106
+ },
1107
+ "keyNormScaleT": {
1108
+ "shape": [3, 131],
1109
+ "dtype": "float32",
1110
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1111
+ },
1112
+ "queryNormScaleT": {
1113
+ "shape": [3, 131],
1114
+ "dtype": "float32",
1115
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1116
+ }
1117
+ },
1118
+ "outputs": {
1119
+ "outputT": { "shape": [1, 1, 3, 131], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1120
+ }
1121
+ },
1122
+ {
1123
+ "name": "packing_float32_h131_r260",
1124
+ "inputs": {
1125
+ "keyT": {
1126
+ "shape": [1, 65, 4, 131],
1127
+ "dtype": "float32",
1128
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1129
+ },
1130
+ "queryT": {
1131
+ "shape": [1, 65, 4, 131],
1132
+ "dtype": "float32",
1133
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1134
+ },
1135
+ "valueT": {
1136
+ "shape": [1, 65, 131],
1137
+ "dtype": "float32",
1138
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1139
+ },
1140
+ "keyNormScaleT": {
1141
+ "shape": [4, 131],
1142
+ "dtype": "float32",
1143
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1144
+ },
1145
+ "queryNormScaleT": {
1146
+ "shape": [4, 131],
1147
+ "dtype": "float32",
1148
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1149
+ }
1150
+ },
1151
+ "outputs": {
1152
+ "outputT": { "shape": [1, 65, 4, 131], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1153
+ }
1154
+ },
1155
+ {
1156
+ "name": "packing_float32_h255_r3",
1157
+ "inputs": {
1158
+ "keyT": {
1159
+ "shape": [1, 1, 3, 255],
1160
+ "dtype": "float32",
1161
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1162
+ },
1163
+ "queryT": {
1164
+ "shape": [1, 1, 3, 255],
1165
+ "dtype": "float32",
1166
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1167
+ },
1168
+ "valueT": {
1169
+ "shape": [1, 1, 255],
1170
+ "dtype": "float32",
1171
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1172
+ },
1173
+ "keyNormScaleT": {
1174
+ "shape": [3, 255],
1175
+ "dtype": "float32",
1176
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1177
+ },
1178
+ "queryNormScaleT": {
1179
+ "shape": [3, 255],
1180
+ "dtype": "float32",
1181
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1182
+ }
1183
+ },
1184
+ "outputs": {
1185
+ "outputT": { "shape": [1, 1, 3, 255], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1186
+ }
1187
+ },
1188
+ {
1189
+ "name": "packing_float32_h255_r260",
1190
+ "inputs": {
1191
+ "keyT": {
1192
+ "shape": [1, 65, 4, 255],
1193
+ "dtype": "float32",
1194
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1195
+ },
1196
+ "queryT": {
1197
+ "shape": [1, 65, 4, 255],
1198
+ "dtype": "float32",
1199
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1200
+ },
1201
+ "valueT": {
1202
+ "shape": [1, 65, 255],
1203
+ "dtype": "float32",
1204
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1205
+ },
1206
+ "keyNormScaleT": {
1207
+ "shape": [4, 255],
1208
+ "dtype": "float32",
1209
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1210
+ },
1211
+ "queryNormScaleT": {
1212
+ "shape": [4, 255],
1213
+ "dtype": "float32",
1214
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1215
+ }
1216
+ },
1217
+ "outputs": {
1218
+ "outputT": { "shape": [1, 65, 4, 255], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1219
+ }
1220
+ },
1221
+ {
1222
+ "name": "packing_float32_h257_r3",
1223
+ "inputs": {
1224
+ "keyT": {
1225
+ "shape": [1, 1, 3, 257],
1226
+ "dtype": "float32",
1227
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1228
+ },
1229
+ "queryT": {
1230
+ "shape": [1, 1, 3, 257],
1231
+ "dtype": "float32",
1232
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1233
+ },
1234
+ "valueT": {
1235
+ "shape": [1, 1, 257],
1236
+ "dtype": "float32",
1237
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1238
+ },
1239
+ "keyNormScaleT": {
1240
+ "shape": [3, 257],
1241
+ "dtype": "float32",
1242
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1243
+ },
1244
+ "queryNormScaleT": {
1245
+ "shape": [3, 257],
1246
+ "dtype": "float32",
1247
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1248
+ }
1249
+ },
1250
+ "outputs": {
1251
+ "outputT": { "shape": [1, 1, 3, 257], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1252
+ }
1253
+ },
1254
+ {
1255
+ "name": "packing_float32_h257_r260",
1256
+ "inputs": {
1257
+ "keyT": {
1258
+ "shape": [1, 65, 4, 257],
1259
+ "dtype": "float32",
1260
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1261
+ },
1262
+ "queryT": {
1263
+ "shape": [1, 65, 4, 257],
1264
+ "dtype": "float32",
1265
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1266
+ },
1267
+ "valueT": {
1268
+ "shape": [1, 65, 257],
1269
+ "dtype": "float32",
1270
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1271
+ },
1272
+ "keyNormScaleT": {
1273
+ "shape": [4, 257],
1274
+ "dtype": "float32",
1275
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1276
+ },
1277
+ "queryNormScaleT": {
1278
+ "shape": [4, 257],
1279
+ "dtype": "float32",
1280
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1281
+ }
1282
+ },
1283
+ "outputs": {
1284
+ "outputT": { "shape": [1, 65, 4, 257], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1285
+ }
1286
+ },
1287
+ {
1288
+ "name": "packing_float16_h63_r3",
1289
+ "inputs": {
1290
+ "keyT": {
1291
+ "shape": [1, 1, 3, 63],
1292
+ "dtype": "float16",
1293
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1294
+ },
1295
+ "queryT": {
1296
+ "shape": [1, 1, 3, 63],
1297
+ "dtype": "float16",
1298
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1299
+ },
1300
+ "valueT": {
1301
+ "shape": [1, 1, 63],
1302
+ "dtype": "float16",
1303
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1304
+ },
1305
+ "keyNormScaleT": {
1306
+ "shape": [3, 63],
1307
+ "dtype": "float16",
1308
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1309
+ },
1310
+ "queryNormScaleT": {
1311
+ "shape": [3, 63],
1312
+ "dtype": "float16",
1313
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1314
+ }
1315
+ },
1316
+ "outputs": {
1317
+ "outputT": { "shape": [1, 1, 3, 63], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1318
+ }
1319
+ },
1320
+ {
1321
+ "name": "packing_float16_h63_r260",
1322
+ "inputs": {
1323
+ "keyT": {
1324
+ "shape": [1, 65, 4, 63],
1325
+ "dtype": "float16",
1326
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1327
+ },
1328
+ "queryT": {
1329
+ "shape": [1, 65, 4, 63],
1330
+ "dtype": "float16",
1331
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1332
+ },
1333
+ "valueT": {
1334
+ "shape": [1, 65, 63],
1335
+ "dtype": "float16",
1336
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1337
+ },
1338
+ "keyNormScaleT": {
1339
+ "shape": [4, 63],
1340
+ "dtype": "float16",
1341
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1342
+ },
1343
+ "queryNormScaleT": {
1344
+ "shape": [4, 63],
1345
+ "dtype": "float16",
1346
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1347
+ }
1348
+ },
1349
+ "outputs": {
1350
+ "outputT": { "shape": [1, 65, 4, 63], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1351
+ }
1352
+ },
1353
+ {
1354
+ "name": "packing_float16_h65_r3",
1355
+ "inputs": {
1356
+ "keyT": {
1357
+ "shape": [1, 1, 3, 65],
1358
+ "dtype": "float16",
1359
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1360
+ },
1361
+ "queryT": {
1362
+ "shape": [1, 1, 3, 65],
1363
+ "dtype": "float16",
1364
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1365
+ },
1366
+ "valueT": {
1367
+ "shape": [1, 1, 65],
1368
+ "dtype": "float16",
1369
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1370
+ },
1371
+ "keyNormScaleT": {
1372
+ "shape": [3, 65],
1373
+ "dtype": "float16",
1374
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1375
+ },
1376
+ "queryNormScaleT": {
1377
+ "shape": [3, 65],
1378
+ "dtype": "float16",
1379
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1380
+ }
1381
+ },
1382
+ "outputs": {
1383
+ "outputT": { "shape": [1, 1, 3, 65], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1384
+ }
1385
+ },
1386
+ {
1387
+ "name": "packing_float16_h65_r260",
1388
+ "inputs": {
1389
+ "keyT": {
1390
+ "shape": [1, 65, 4, 65],
1391
+ "dtype": "float16",
1392
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1393
+ },
1394
+ "queryT": {
1395
+ "shape": [1, 65, 4, 65],
1396
+ "dtype": "float16",
1397
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1398
+ },
1399
+ "valueT": {
1400
+ "shape": [1, 65, 65],
1401
+ "dtype": "float16",
1402
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1403
+ },
1404
+ "keyNormScaleT": {
1405
+ "shape": [4, 65],
1406
+ "dtype": "float16",
1407
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1408
+ },
1409
+ "queryNormScaleT": {
1410
+ "shape": [4, 65],
1411
+ "dtype": "float16",
1412
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1413
+ }
1414
+ },
1415
+ "outputs": {
1416
+ "outputT": { "shape": [1, 65, 4, 65], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1417
+ }
1418
+ },
1419
+ {
1420
+ "name": "packing_float16_h129_r3",
1421
+ "inputs": {
1422
+ "keyT": {
1423
+ "shape": [1, 1, 3, 129],
1424
+ "dtype": "float16",
1425
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1426
+ },
1427
+ "queryT": {
1428
+ "shape": [1, 1, 3, 129],
1429
+ "dtype": "float16",
1430
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1431
+ },
1432
+ "valueT": {
1433
+ "shape": [1, 1, 129],
1434
+ "dtype": "float16",
1435
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1436
+ },
1437
+ "keyNormScaleT": {
1438
+ "shape": [3, 129],
1439
+ "dtype": "float16",
1440
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1441
+ },
1442
+ "queryNormScaleT": {
1443
+ "shape": [3, 129],
1444
+ "dtype": "float16",
1445
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1446
+ }
1447
+ },
1448
+ "outputs": {
1449
+ "outputT": { "shape": [1, 1, 3, 129], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1450
+ }
1451
+ },
1452
+ {
1453
+ "name": "packing_float16_h129_r260",
1454
+ "inputs": {
1455
+ "keyT": {
1456
+ "shape": [1, 65, 4, 129],
1457
+ "dtype": "float16",
1458
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1459
+ },
1460
+ "queryT": {
1461
+ "shape": [1, 65, 4, 129],
1462
+ "dtype": "float16",
1463
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1464
+ },
1465
+ "valueT": {
1466
+ "shape": [1, 65, 129],
1467
+ "dtype": "float16",
1468
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1469
+ },
1470
+ "keyNormScaleT": {
1471
+ "shape": [4, 129],
1472
+ "dtype": "float16",
1473
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1474
+ },
1475
+ "queryNormScaleT": {
1476
+ "shape": [4, 129],
1477
+ "dtype": "float16",
1478
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1479
+ }
1480
+ },
1481
+ "outputs": {
1482
+ "outputT": { "shape": [1, 65, 4, 129], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1483
+ }
1484
+ },
1485
+ {
1486
+ "name": "packing_float16_h130_r3",
1487
+ "inputs": {
1488
+ "keyT": {
1489
+ "shape": [1, 1, 3, 130],
1490
+ "dtype": "float16",
1491
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1492
+ },
1493
+ "queryT": {
1494
+ "shape": [1, 1, 3, 130],
1495
+ "dtype": "float16",
1496
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1497
+ },
1498
+ "valueT": {
1499
+ "shape": [1, 1, 130],
1500
+ "dtype": "float16",
1501
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1502
+ },
1503
+ "keyNormScaleT": {
1504
+ "shape": [3, 130],
1505
+ "dtype": "float16",
1506
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1507
+ },
1508
+ "queryNormScaleT": {
1509
+ "shape": [3, 130],
1510
+ "dtype": "float16",
1511
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1512
+ }
1513
+ },
1514
+ "outputs": {
1515
+ "outputT": { "shape": [1, 1, 3, 130], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1516
+ }
1517
+ },
1518
+ {
1519
+ "name": "packing_float16_h130_r260",
1520
+ "inputs": {
1521
+ "keyT": {
1522
+ "shape": [1, 65, 4, 130],
1523
+ "dtype": "float16",
1524
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1525
+ },
1526
+ "queryT": {
1527
+ "shape": [1, 65, 4, 130],
1528
+ "dtype": "float16",
1529
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1530
+ },
1531
+ "valueT": {
1532
+ "shape": [1, 65, 130],
1533
+ "dtype": "float16",
1534
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1535
+ },
1536
+ "keyNormScaleT": {
1537
+ "shape": [4, 130],
1538
+ "dtype": "float16",
1539
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1540
+ },
1541
+ "queryNormScaleT": {
1542
+ "shape": [4, 130],
1543
+ "dtype": "float16",
1544
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1545
+ }
1546
+ },
1547
+ "outputs": {
1548
+ "outputT": { "shape": [1, 65, 4, 130], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1549
+ }
1550
+ },
1551
+ {
1552
+ "name": "packing_float16_h131_r3",
1553
+ "inputs": {
1554
+ "keyT": {
1555
+ "shape": [1, 1, 3, 131],
1556
+ "dtype": "float16",
1557
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1558
+ },
1559
+ "queryT": {
1560
+ "shape": [1, 1, 3, 131],
1561
+ "dtype": "float16",
1562
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1563
+ },
1564
+ "valueT": {
1565
+ "shape": [1, 1, 131],
1566
+ "dtype": "float16",
1567
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1568
+ },
1569
+ "keyNormScaleT": {
1570
+ "shape": [3, 131],
1571
+ "dtype": "float16",
1572
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1573
+ },
1574
+ "queryNormScaleT": {
1575
+ "shape": [3, 131],
1576
+ "dtype": "float16",
1577
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1578
+ }
1579
+ },
1580
+ "outputs": {
1581
+ "outputT": { "shape": [1, 1, 3, 131], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1582
+ }
1583
+ },
1584
+ {
1585
+ "name": "packing_float16_h131_r260",
1586
+ "inputs": {
1587
+ "keyT": {
1588
+ "shape": [1, 65, 4, 131],
1589
+ "dtype": "float16",
1590
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1591
+ },
1592
+ "queryT": {
1593
+ "shape": [1, 65, 4, 131],
1594
+ "dtype": "float16",
1595
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1596
+ },
1597
+ "valueT": {
1598
+ "shape": [1, 65, 131],
1599
+ "dtype": "float16",
1600
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1601
+ },
1602
+ "keyNormScaleT": {
1603
+ "shape": [4, 131],
1604
+ "dtype": "float16",
1605
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1606
+ },
1607
+ "queryNormScaleT": {
1608
+ "shape": [4, 131],
1609
+ "dtype": "float16",
1610
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1611
+ }
1612
+ },
1613
+ "outputs": {
1614
+ "outputT": { "shape": [1, 65, 4, 131], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1615
+ }
1616
+ },
1617
+ {
1618
+ "name": "packing_float16_h255_r3",
1619
+ "inputs": {
1620
+ "keyT": {
1621
+ "shape": [1, 1, 3, 255],
1622
+ "dtype": "float16",
1623
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1624
+ },
1625
+ "queryT": {
1626
+ "shape": [1, 1, 3, 255],
1627
+ "dtype": "float16",
1628
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1629
+ },
1630
+ "valueT": {
1631
+ "shape": [1, 1, 255],
1632
+ "dtype": "float16",
1633
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1634
+ },
1635
+ "keyNormScaleT": {
1636
+ "shape": [3, 255],
1637
+ "dtype": "float16",
1638
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1639
+ },
1640
+ "queryNormScaleT": {
1641
+ "shape": [3, 255],
1642
+ "dtype": "float16",
1643
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1644
+ }
1645
+ },
1646
+ "outputs": {
1647
+ "outputT": { "shape": [1, 1, 3, 255], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1648
+ }
1649
+ },
1650
+ {
1651
+ "name": "packing_float16_h255_r260",
1652
+ "inputs": {
1653
+ "keyT": {
1654
+ "shape": [1, 65, 4, 255],
1655
+ "dtype": "float16",
1656
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1657
+ },
1658
+ "queryT": {
1659
+ "shape": [1, 65, 4, 255],
1660
+ "dtype": "float16",
1661
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1662
+ },
1663
+ "valueT": {
1664
+ "shape": [1, 65, 255],
1665
+ "dtype": "float16",
1666
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1667
+ },
1668
+ "keyNormScaleT": {
1669
+ "shape": [4, 255],
1670
+ "dtype": "float16",
1671
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1672
+ },
1673
+ "queryNormScaleT": {
1674
+ "shape": [4, 255],
1675
+ "dtype": "float16",
1676
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1677
+ }
1678
+ },
1679
+ "outputs": {
1680
+ "outputT": { "shape": [1, 65, 4, 255], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1681
+ }
1682
+ },
1683
+ {
1684
+ "name": "packing_float16_h257_r3",
1685
+ "inputs": {
1686
+ "keyT": {
1687
+ "shape": [1, 1, 3, 257],
1688
+ "dtype": "float16",
1689
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1690
+ },
1691
+ "queryT": {
1692
+ "shape": [1, 1, 3, 257],
1693
+ "dtype": "float16",
1694
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1695
+ },
1696
+ "valueT": {
1697
+ "shape": [1, 1, 257],
1698
+ "dtype": "float16",
1699
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1700
+ },
1701
+ "keyNormScaleT": {
1702
+ "shape": [3, 257],
1703
+ "dtype": "float16",
1704
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1705
+ },
1706
+ "queryNormScaleT": {
1707
+ "shape": [3, 257],
1708
+ "dtype": "float16",
1709
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1710
+ }
1711
+ },
1712
+ "outputs": {
1713
+ "outputT": { "shape": [1, 1, 3, 257], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1714
+ }
1715
+ },
1716
+ {
1717
+ "name": "packing_float16_h257_r260",
1718
+ "inputs": {
1719
+ "keyT": {
1720
+ "shape": [1, 65, 4, 257],
1721
+ "dtype": "float16",
1722
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1723
+ },
1724
+ "queryT": {
1725
+ "shape": [1, 65, 4, 257],
1726
+ "dtype": "float16",
1727
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1728
+ },
1729
+ "valueT": {
1730
+ "shape": [1, 65, 257],
1731
+ "dtype": "float16",
1732
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1733
+ },
1734
+ "keyNormScaleT": {
1735
+ "shape": [4, 257],
1736
+ "dtype": "float16",
1737
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1738
+ },
1739
+ "queryNormScaleT": {
1740
+ "shape": [4, 257],
1741
+ "dtype": "float16",
1742
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1743
+ }
1744
+ },
1745
+ "outputs": {
1746
+ "outputT": { "shape": [1, 65, 4, 257], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1747
+ }
1748
+ },
1749
+ {
1750
+ "name": "packing_override_float32_h65_wg64_depth1",
1751
+ "inputs": {
1752
+ "keyT": {
1753
+ "shape": [1, 65, 4, 65],
1754
+ "dtype": "float32",
1755
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1756
+ },
1757
+ "queryT": {
1758
+ "shape": [1, 65, 4, 65],
1759
+ "dtype": "float32",
1760
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1761
+ },
1762
+ "valueT": {
1763
+ "shape": [1, 65, 65],
1764
+ "dtype": "float32",
1765
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1766
+ },
1767
+ "keyNormScaleT": {
1768
+ "shape": [4, 65],
1769
+ "dtype": "float32",
1770
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1771
+ },
1772
+ "queryNormScaleT": {
1773
+ "shape": [4, 65],
1774
+ "dtype": "float32",
1775
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1776
+ }
1777
+ },
1778
+ "outputs": {
1779
+ "outputT": { "shape": [1, 65, 4, 65], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1780
+ },
1781
+ "tunables": { "WORKGROUP_SIZE": 64, "LANE_WORDS": 1 }
1782
+ },
1783
+ {
1784
+ "name": "packing_override_float32_h131_wg128_depth16",
1785
+ "inputs": {
1786
+ "keyT": {
1787
+ "shape": [1, 65, 4, 131],
1788
+ "dtype": "float32",
1789
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1790
+ },
1791
+ "queryT": {
1792
+ "shape": [1, 65, 4, 131],
1793
+ "dtype": "float32",
1794
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1795
+ },
1796
+ "valueT": {
1797
+ "shape": [1, 65, 131],
1798
+ "dtype": "float32",
1799
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1800
+ },
1801
+ "keyNormScaleT": {
1802
+ "shape": [4, 131],
1803
+ "dtype": "float32",
1804
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1805
+ },
1806
+ "queryNormScaleT": {
1807
+ "shape": [4, 131],
1808
+ "dtype": "float32",
1809
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1810
+ }
1811
+ },
1812
+ "outputs": {
1813
+ "outputT": { "shape": [1, 65, 4, 131], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1814
+ },
1815
+ "tunables": { "WORKGROUP_SIZE": 128, "LANE_WORDS": 16 }
1816
+ },
1817
+ {
1818
+ "name": "packing_override_float16_h65_wg64_depth1",
1819
+ "inputs": {
1820
+ "keyT": {
1821
+ "shape": [1, 65, 4, 65],
1822
+ "dtype": "float16",
1823
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1824
+ },
1825
+ "queryT": {
1826
+ "shape": [1, 65, 4, 65],
1827
+ "dtype": "float16",
1828
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1829
+ },
1830
+ "valueT": {
1831
+ "shape": [1, 65, 65],
1832
+ "dtype": "float16",
1833
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1834
+ },
1835
+ "keyNormScaleT": {
1836
+ "shape": [4, 65],
1837
+ "dtype": "float16",
1838
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1839
+ },
1840
+ "queryNormScaleT": {
1841
+ "shape": [4, 65],
1842
+ "dtype": "float16",
1843
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1844
+ }
1845
+ },
1846
+ "outputs": {
1847
+ "outputT": { "shape": [1, 65, 4, 65], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1848
+ },
1849
+ "tunables": { "WORKGROUP_SIZE": 64, "LANE_WORDS": 1 }
1850
+ },
1851
+ {
1852
+ "name": "packing_override_float16_h131_wg128_depth16",
1853
+ "inputs": {
1854
+ "keyT": {
1855
+ "shape": [1, 65, 4, 131],
1856
+ "dtype": "float16",
1857
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1858
+ },
1859
+ "queryT": {
1860
+ "shape": [1, 65, 4, 131],
1861
+ "dtype": "float16",
1862
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1863
+ },
1864
+ "valueT": {
1865
+ "shape": [1, 65, 131],
1866
+ "dtype": "float16",
1867
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1868
+ },
1869
+ "keyNormScaleT": {
1870
+ "shape": [4, 131],
1871
+ "dtype": "float16",
1872
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1873
+ },
1874
+ "queryNormScaleT": {
1875
+ "shape": [4, 131],
1876
+ "dtype": "float16",
1877
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1878
+ }
1879
+ },
1880
+ "outputs": {
1881
+ "outputT": { "shape": [1, 65, 4, 131], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
1882
+ },
1883
+ "tunables": { "WORKGROUP_SIZE": 128, "LANE_WORDS": 16 }
1884
+ },
1885
+ {
1886
+ "name": "vector_depth_float32_h252_r195_wg256",
1887
+ "inputs": {
1888
+ "keyT": {
1889
+ "shape": [1, 65, 3, 252],
1890
+ "dtype": "float32",
1891
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1892
+ },
1893
+ "queryT": {
1894
+ "shape": [1, 65, 3, 252],
1895
+ "dtype": "float32",
1896
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1897
+ },
1898
+ "valueT": {
1899
+ "shape": [1, 65, 252],
1900
+ "dtype": "float32",
1901
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1902
+ },
1903
+ "keyNormScaleT": {
1904
+ "shape": [3, 252],
1905
+ "dtype": "float32",
1906
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1907
+ },
1908
+ "queryNormScaleT": {
1909
+ "shape": [3, 252],
1910
+ "dtype": "float32",
1911
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1912
+ }
1913
+ },
1914
+ "outputs": {
1915
+ "outputT": { "shape": [1, 65, 3, 252], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1916
+ },
1917
+ "provenance": {
1918
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
1919
+ }
1920
+ },
1921
+ {
1922
+ "name": "vector_depth_float32_h260_r195_wg256",
1923
+ "inputs": {
1924
+ "keyT": {
1925
+ "shape": [1, 65, 3, 260],
1926
+ "dtype": "float32",
1927
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1928
+ },
1929
+ "queryT": {
1930
+ "shape": [1, 65, 3, 260],
1931
+ "dtype": "float32",
1932
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1933
+ },
1934
+ "valueT": {
1935
+ "shape": [1, 65, 260],
1936
+ "dtype": "float32",
1937
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1938
+ },
1939
+ "keyNormScaleT": {
1940
+ "shape": [3, 260],
1941
+ "dtype": "float32",
1942
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1943
+ },
1944
+ "queryNormScaleT": {
1945
+ "shape": [3, 260],
1946
+ "dtype": "float32",
1947
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1948
+ }
1949
+ },
1950
+ "outputs": {
1951
+ "outputT": { "shape": [1, 65, 3, 260], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1952
+ },
1953
+ "provenance": {
1954
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
1955
+ }
1956
+ },
1957
+ {
1958
+ "name": "vector_depth_float32_h320_r129_wg256",
1959
+ "inputs": {
1960
+ "keyT": {
1961
+ "shape": [1, 43, 3, 320],
1962
+ "dtype": "float32",
1963
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
1964
+ },
1965
+ "queryT": {
1966
+ "shape": [1, 43, 3, 320],
1967
+ "dtype": "float32",
1968
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
1969
+ },
1970
+ "valueT": {
1971
+ "shape": [1, 43, 320],
1972
+ "dtype": "float32",
1973
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
1974
+ },
1975
+ "keyNormScaleT": {
1976
+ "shape": [3, 320],
1977
+ "dtype": "float32",
1978
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
1979
+ },
1980
+ "queryNormScaleT": {
1981
+ "shape": [3, 320],
1982
+ "dtype": "float32",
1983
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
1984
+ }
1985
+ },
1986
+ "outputs": {
1987
+ "outputT": { "shape": [1, 43, 3, 320], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
1988
+ },
1989
+ "provenance": {
1990
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
1991
+ }
1992
+ },
1993
+ {
1994
+ "name": "vector_depth_float32_h516_r129_wg256",
1995
+ "inputs": {
1996
+ "keyT": {
1997
+ "shape": [1, 43, 3, 516],
1998
+ "dtype": "float32",
1999
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2000
+ },
2001
+ "queryT": {
2002
+ "shape": [1, 43, 3, 516],
2003
+ "dtype": "float32",
2004
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2005
+ },
2006
+ "valueT": {
2007
+ "shape": [1, 43, 516],
2008
+ "dtype": "float32",
2009
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2010
+ },
2011
+ "keyNormScaleT": {
2012
+ "shape": [3, 516],
2013
+ "dtype": "float32",
2014
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2015
+ },
2016
+ "queryNormScaleT": {
2017
+ "shape": [3, 516],
2018
+ "dtype": "float32",
2019
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2020
+ }
2021
+ },
2022
+ "outputs": {
2023
+ "outputT": { "shape": [1, 43, 3, 516], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
2024
+ },
2025
+ "provenance": {
2026
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2027
+ }
2028
+ },
2029
+ {
2030
+ "name": "vector_depth_float32_h1028_r195_wg64",
2031
+ "inputs": {
2032
+ "keyT": {
2033
+ "shape": [1, 65, 3, 1028],
2034
+ "dtype": "float32",
2035
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2036
+ },
2037
+ "queryT": {
2038
+ "shape": [1, 65, 3, 1028],
2039
+ "dtype": "float32",
2040
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2041
+ },
2042
+ "valueT": {
2043
+ "shape": [1, 65, 1028],
2044
+ "dtype": "float32",
2045
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2046
+ },
2047
+ "keyNormScaleT": {
2048
+ "shape": [3, 1028],
2049
+ "dtype": "float32",
2050
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2051
+ },
2052
+ "queryNormScaleT": {
2053
+ "shape": [3, 1028],
2054
+ "dtype": "float32",
2055
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2056
+ }
2057
+ },
2058
+ "outputs": {
2059
+ "outputT": { "shape": [1, 65, 3, 1028], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
2060
+ },
2061
+ "tunables": { "WORKGROUP_SIZE": 64 },
2062
+ "provenance": {
2063
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2064
+ }
2065
+ },
2066
+ {
2067
+ "name": "vector_depth_float32_h320_r3_wg256",
2068
+ "inputs": {
2069
+ "keyT": {
2070
+ "shape": [1, 1, 3, 320],
2071
+ "dtype": "float32",
2072
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2073
+ },
2074
+ "queryT": {
2075
+ "shape": [1, 1, 3, 320],
2076
+ "dtype": "float32",
2077
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2078
+ },
2079
+ "valueT": {
2080
+ "shape": [1, 1, 320],
2081
+ "dtype": "float32",
2082
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2083
+ },
2084
+ "keyNormScaleT": {
2085
+ "shape": [3, 320],
2086
+ "dtype": "float32",
2087
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2088
+ },
2089
+ "queryNormScaleT": {
2090
+ "shape": [3, 320],
2091
+ "dtype": "float32",
2092
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2093
+ }
2094
+ },
2095
+ "outputs": {
2096
+ "outputT": { "shape": [1, 1, 3, 320], "dtype": "float32", "tolerance": 0.000002, "relTolerance": 0.00002 }
2097
+ },
2098
+ "provenance": {
2099
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2100
+ }
2101
+ },
2102
+ {
2103
+ "name": "vector_depth_float16_h252_r195_wg256",
2104
+ "inputs": {
2105
+ "keyT": {
2106
+ "shape": [1, 65, 3, 252],
2107
+ "dtype": "float16",
2108
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2109
+ },
2110
+ "queryT": {
2111
+ "shape": [1, 65, 3, 252],
2112
+ "dtype": "float16",
2113
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2114
+ },
2115
+ "valueT": {
2116
+ "shape": [1, 65, 252],
2117
+ "dtype": "float16",
2118
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2119
+ },
2120
+ "keyNormScaleT": {
2121
+ "shape": [3, 252],
2122
+ "dtype": "float16",
2123
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2124
+ },
2125
+ "queryNormScaleT": {
2126
+ "shape": [3, 252],
2127
+ "dtype": "float16",
2128
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2129
+ }
2130
+ },
2131
+ "outputs": {
2132
+ "outputT": { "shape": [1, 65, 3, 252], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2133
+ },
2134
+ "provenance": {
2135
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2136
+ }
2137
+ },
2138
+ {
2139
+ "name": "vector_depth_float16_h260_r195_wg256",
2140
+ "inputs": {
2141
+ "keyT": {
2142
+ "shape": [1, 65, 3, 260],
2143
+ "dtype": "float16",
2144
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2145
+ },
2146
+ "queryT": {
2147
+ "shape": [1, 65, 3, 260],
2148
+ "dtype": "float16",
2149
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2150
+ },
2151
+ "valueT": {
2152
+ "shape": [1, 65, 260],
2153
+ "dtype": "float16",
2154
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2155
+ },
2156
+ "keyNormScaleT": {
2157
+ "shape": [3, 260],
2158
+ "dtype": "float16",
2159
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2160
+ },
2161
+ "queryNormScaleT": {
2162
+ "shape": [3, 260],
2163
+ "dtype": "float16",
2164
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2165
+ }
2166
+ },
2167
+ "outputs": {
2168
+ "outputT": { "shape": [1, 65, 3, 260], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2169
+ },
2170
+ "provenance": {
2171
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2172
+ }
2173
+ },
2174
+ {
2175
+ "name": "vector_depth_float16_h320_r129_wg256",
2176
+ "inputs": {
2177
+ "keyT": {
2178
+ "shape": [1, 43, 3, 320],
2179
+ "dtype": "float16",
2180
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2181
+ },
2182
+ "queryT": {
2183
+ "shape": [1, 43, 3, 320],
2184
+ "dtype": "float16",
2185
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2186
+ },
2187
+ "valueT": {
2188
+ "shape": [1, 43, 320],
2189
+ "dtype": "float16",
2190
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2191
+ },
2192
+ "keyNormScaleT": {
2193
+ "shape": [3, 320],
2194
+ "dtype": "float16",
2195
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2196
+ },
2197
+ "queryNormScaleT": {
2198
+ "shape": [3, 320],
2199
+ "dtype": "float16",
2200
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2201
+ }
2202
+ },
2203
+ "outputs": {
2204
+ "outputT": { "shape": [1, 43, 3, 320], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2205
+ },
2206
+ "provenance": {
2207
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2208
+ }
2209
+ },
2210
+ {
2211
+ "name": "vector_depth_float16_h516_r129_wg256",
2212
+ "inputs": {
2213
+ "keyT": {
2214
+ "shape": [1, 43, 3, 516],
2215
+ "dtype": "float16",
2216
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2217
+ },
2218
+ "queryT": {
2219
+ "shape": [1, 43, 3, 516],
2220
+ "dtype": "float16",
2221
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2222
+ },
2223
+ "valueT": {
2224
+ "shape": [1, 43, 516],
2225
+ "dtype": "float16",
2226
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2227
+ },
2228
+ "keyNormScaleT": {
2229
+ "shape": [3, 516],
2230
+ "dtype": "float16",
2231
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2232
+ },
2233
+ "queryNormScaleT": {
2234
+ "shape": [3, 516],
2235
+ "dtype": "float16",
2236
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2237
+ }
2238
+ },
2239
+ "outputs": {
2240
+ "outputT": { "shape": [1, 43, 3, 516], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2241
+ },
2242
+ "provenance": {
2243
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2244
+ }
2245
+ },
2246
+ {
2247
+ "name": "vector_depth_float16_h1028_r195_wg64",
2248
+ "inputs": {
2249
+ "keyT": {
2250
+ "shape": [1, 65, 3, 1028],
2251
+ "dtype": "float16",
2252
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2253
+ },
2254
+ "queryT": {
2255
+ "shape": [1, 65, 3, 1028],
2256
+ "dtype": "float16",
2257
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2258
+ },
2259
+ "valueT": {
2260
+ "shape": [1, 65, 1028],
2261
+ "dtype": "float16",
2262
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2263
+ },
2264
+ "keyNormScaleT": {
2265
+ "shape": [3, 1028],
2266
+ "dtype": "float16",
2267
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2268
+ },
2269
+ "queryNormScaleT": {
2270
+ "shape": [3, 1028],
2271
+ "dtype": "float16",
2272
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2273
+ }
2274
+ },
2275
+ "outputs": {
2276
+ "outputT": { "shape": [1, 65, 3, 1028], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2277
+ },
2278
+ "tunables": { "WORKGROUP_SIZE": 64 },
2279
+ "provenance": {
2280
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2281
+ }
2282
+ },
2283
+ {
2284
+ "name": "vector_depth_float16_h320_r3_wg256",
2285
+ "inputs": {
2286
+ "keyT": {
2287
+ "shape": [1, 1, 3, 320],
2288
+ "dtype": "float16",
2289
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.71, "scale": 1.0 }
2290
+ },
2291
+ "queryT": {
2292
+ "shape": [1, 1, 3, 320],
2293
+ "dtype": "float16",
2294
+ "data": { "kind": "fillFloat32", "sinStep": 0.48, "cosStep": 0.84, "scale": 1.0 }
2295
+ },
2296
+ "valueT": {
2297
+ "shape": [1, 1, 320],
2298
+ "dtype": "float16",
2299
+ "data": { "kind": "fillFloat32", "sinStep": 0.59, "cosStep": 0.97, "scale": 1.0 }
2300
+ },
2301
+ "keyNormScaleT": {
2302
+ "shape": [3, 320],
2303
+ "dtype": "float16",
2304
+ "data": { "kind": "fillFloat32", "sinStep": 0.7, "cosStep": 1.1, "scale": 0.5, "offset": 1.0 }
2305
+ },
2306
+ "queryNormScaleT": {
2307
+ "shape": [3, 320],
2308
+ "dtype": "float16",
2309
+ "data": { "kind": "fillFloat32", "sinStep": 0.81, "cosStep": 1.23, "scale": 0.5, "offset": 1.0 }
2310
+ }
2311
+ },
2312
+ "outputs": {
2313
+ "outputT": { "shape": [1, 1, 3, 320], "dtype": "float16", "tolerance": 0.0005, "relTolerance": 0.002 }
2314
+ },
2315
+ "provenance": {
2316
+ "notes": "Lane-depth boundary with nonuniform affine scales and hyper-connection value reuse; row and vector tails exercise shared row groups at the default dtype tolerance."
2317
+ }
2318
+ }
2319
+ ]
2320
+ }