File size: 12,247 Bytes
e82d8e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
{
  "op": "ai.onnx.CausalConvWithState",
  "cases": [
    {
      "name": "scalar_zero_state",
      "attrs": { "activation": "none" },
      "inputs": {
        "inputT": {
          "shape": [1, 2, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11, "scale": 0.2 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 3], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 2], "dtype": "float32" }
      }
    },
    {
      "name": "scalar_bias_no_state",
      "attrs": { "activation": "none" },
      "inputs": {
        "inputT": {
          "shape": [1, 2, 5],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.31, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 5],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.27, "scale": 0.2 }
        },
        "biasT": {
          "shape": [2],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.07, "scale": 0.1 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 5], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 4], "dtype": "float32" }
      }
    },
    {
      "name": "scalar_state_no_bias_swish",
      "attrs": { "activation": "swish" },
      "inputs": {
        "inputT": {
          "shape": [1, 2, 1],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.33, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 4],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.17, "scale": 0.2 }
        },
        "pastStateT": {
          "shape": [1, 2, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.21, "scale": 0.25 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 1], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 3], "dtype": "float32" }
      }
    },
    {
      "name": "scalar_f16_state_bias_silu_cast_boundary",
      "attrs": { "activation": "silu" },
      "inputs": {
        "inputT": {
          "shape": [1, 1, 3],
          "dtype": "float16",
          "data": { "kind": "values", "values": [1.001, -0.731, 0.287] }
        },
        "weightT": {
          "shape": [1, 1, 3],
          "dtype": "float16",
          "data": { "kind": "values", "values": [0.619, -1.127, 0.443] }
        },
        "biasT": { "shape": [1], "dtype": "float16", "data": { "kind": "values", "values": [0.037] } },
        "pastStateT": {
          "shape": [1, 1, 2],
          "dtype": "float16",
          "data": { "kind": "values", "values": [-0.219, 0.887] }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 3], "dtype": "float16" },
        "presentStateT": { "shape": [1, 1, 2], "dtype": "float16" }
      }
    },
    {
      "name": "kernel_size_one",
      "inputs": {
        "inputT": {
          "shape": [2, 2, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.19, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 1],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.09, "scale": 0.2 }
        }
      },
      "outputs": {
        "outputT": { "shape": [2, 2, 3], "dtype": "float32" },
        "presentStateT": { "shape": [2, 2, 0], "dtype": "float32" }
      }
    },
    {
      "name": "input_shorter_than_state_zero_padding",
      "inputs": {
        "inputT": { "shape": [1, 1, 2], "dtype": "float32", "data": { "kind": "values", "values": [2.0, 3.0] } },
        "weightT": {
          "shape": [1, 1, 5],
          "dtype": "float32",
          "data": { "kind": "values", "values": [1.0, 1.0, 1.0, 1.0, 1.0] }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 2], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 4], "dtype": "float32" }
      }
    },
    {
      "name": "zero_length_reemits_past_state",
      "inputs": {
        "inputT": { "shape": [1, 1, 0], "dtype": "float32", "data": { "kind": "values", "values": [] } },
        "weightT": { "shape": [1, 1, 3], "dtype": "float32", "data": { "kind": "values", "values": [1.0, 1.0, 1.0] } },
        "pastStateT": { "shape": [1, 1, 2], "dtype": "float32", "data": { "kind": "values", "values": [4.0, 5.0] } }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 0], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 2], "dtype": "float32" }
      }
    },
    {
      "name": "vec4_zero_state_f16_silu",
      "attrs": { "activation": "silu" },
      "inputs": {
        "inputT": {
          "shape": [2, 3, 8],
          "dtype": "float16",
          "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.23, "scale": 0.25 }
        },
        "weightT": {
          "shape": [3, 1, 4],
          "dtype": "float16",
          "data": { "kind": "fillFloat32", "sinStep": 0.27, "cosStep": 0.11, "scale": 0.2 }
        }
      },
      "outputs": {
        "outputT": { "shape": [2, 3, 8], "dtype": "float16" },
        "presentStateT": { "shape": [2, 3, 3], "dtype": "float16" }
      }
    },
    {
      "name": "vec4_bias_no_state_swish",
      "attrs": { "activation": "swish" },
      "inputs": {
        "inputT": {
          "shape": [1, 2, 8],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.09, "cosStep": 0.31, "scale": 0.2 }
        },
        "biasT": {
          "shape": [2],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.33, "cosStep": 0.07, "scale": 0.1 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 8], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 2], "dtype": "float32" }
      }
    },
    {
      "name": "vec4_state_no_bias",
      "inputs": {
        "inputT": {
          "shape": [1, 2, 4],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.15, "cosStep": 0.25, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 2],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.35, "cosStep": 0.05, "scale": 0.2 }
        },
        "pastStateT": {
          "shape": [1, 2, 1],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.29, "scale": 0.25 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 4], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 1], "dtype": "float32" }
      }
    },
    {
      "name": "vec4_state_bias_silu",
      "attrs": { "activation": "silu" },
      "inputs": {
        "inputT": {
          "shape": [1, 2, 8],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.27, "scale": 0.25 }
        },
        "weightT": {
          "shape": [2, 1, 4],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.25, "cosStep": 0.13, "scale": 0.2 }
        },
        "biasT": {
          "shape": [2],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.39, "cosStep": 0.05, "scale": 0.1 }
        },
        "pastStateT": {
          "shape": [1, 2, 3],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.33, "scale": 0.25 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 2, 8], "dtype": "float32" },
        "presentStateT": { "shape": [1, 2, 3], "dtype": "float32" }
      }
    },
    {
      "name": "tiled_zero_state",
      "inputs": {
        "inputT": {
          "shape": [1, 1, 256],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.05, "scale": 0.25 }
        },
        "weightT": {
          "shape": [1, 1, 32],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.09, "scale": 0.1 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 256], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 31], "dtype": "float32" }
      }
    },
    {
      "name": "tiled_bias_no_state_silu",
      "attrs": { "activation": "silu" },
      "inputs": {
        "inputT": {
          "shape": [1, 1, 256],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.04, "cosStep": 0.06, "scale": 0.25 }
        },
        "weightT": {
          "shape": [1, 1, 32],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.08, "cosStep": 0.1, "scale": 0.1 }
        },
        "biasT": { "shape": [1], "dtype": "float32", "data": { "kind": "constant", "value": 0.05 } }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 256], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 31], "dtype": "float32" }
      }
    },
    {
      "name": "tiled_state_no_bias",
      "inputs": {
        "inputT": {
          "shape": [1, 1, 256],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.07, "scale": 0.25 }
        },
        "weightT": {
          "shape": [1, 1, 32],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.09, "cosStep": 0.11, "scale": 0.1 }
        },
        "pastStateT": {
          "shape": [1, 1, 31],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17, "scale": 0.25 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 256], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 31], "dtype": "float32" }
      }
    },
    {
      "name": "tiled_state_bias_f16_swish",
      "attrs": { "activation": "swish" },
      "inputs": {
        "inputT": {
          "shape": [1, 1, 256],
          "dtype": "float16",
          "data": { "kind": "fillFloat32", "sinStep": 0.06, "cosStep": 0.08, "scale": 0.25 }
        },
        "weightT": {
          "shape": [1, 1, 32],
          "dtype": "float16",
          "data": { "kind": "fillFloat32", "sinStep": 0.1, "cosStep": 0.12, "scale": 0.1 }
        },
        "biasT": { "shape": [1], "dtype": "float16", "data": { "kind": "constant", "value": -0.05 } },
        "pastStateT": {
          "shape": [1, 1, 31],
          "dtype": "float16",
          "data": { "kind": "fillFloat32", "sinStep": 0.14, "cosStep": 0.18, "scale": 0.25 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 256], "dtype": "float16" },
        "presentStateT": { "shape": [1, 1, 31], "dtype": "float16" }
      }
    },
    {
      "name": "tiled_zero_state_unaligned_k35_weight_tile_pad",
      "inputs": {
        "inputT": {
          "shape": [1, 1, 256],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.05, "scale": 0.25 }
        },
        "weightT": {
          "shape": [1, 1, 35],
          "dtype": "float32",
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.09, "scale": 0.1 }
        }
      },
      "outputs": {
        "outputT": { "shape": [1, 1, 256], "dtype": "float32" },
        "presentStateT": { "shape": [1, 1, 34], "dtype": "float32" }
      },
      "provenance": {
        "notes": "Kernel length 3 mod 4. The shared tiled kernel consumes four taps per iteration, so this shape reaches it only through the zero-padded weight tile; ai.onnx carries its own copy of that gate, so it needs its own lock."
      }
    }
  ]
}