Xenova HF Staff commited on
Commit
8aaab97
·
verified ·
1 Parent(s): 476435a

sync 6fdf6301e2bb

Browse files
README.md CHANGED
@@ -20,17 +20,17 @@ See the [ONNX Runtime `CausalConvWithState` contrib-operator spec](https://githu
20
 
21
  | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
22
  | --- | --- | --- | --- | --- | --- | --- |
23
- | `inputT` | `input` | `T` | `3` | — | Channels-first input tensor with shape `(batch_size, channels, sequence_length)` for the supported 1-D mode. | required |
24
  | `weightT` | `weight` | `T` | `3` | — | Depthwise convolution kernel with shape `(channels, 1, kernel_size)` for the supported 1-D mode. | required |
25
  | `biasT` | `bias` | `T` | `1` | — | Optional per-channel bias with shape `(channels,)`. | optional |
26
- | `pastStateT` | `past_state` | `T` | derived | — | Carry state from the previous step; shape `(batch_size, channels, kernel_size - 1)`, or `(W, batch_size, channels, kernel_size - 1)` when `state_window = W > 0`, in which case only slot `W - 1` is read. If absent, the left-side padding is zero. | optional |
27
 
28
  ## Outputs
29
 
30
  | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
31
  | --- | --- | --- | --- | --- | --- | --- |
32
  | `outputT` | `output` | `T` | `3` | same as `inputT` | Convolution output with the same shape as `input`. | required |
33
- | `presentStateT` | `present_state` | `T` | derived | derived | Updated carry state; shape `(batch_size, channels, kernel_size - 1)`, or `(W, batch_size, channels, kernel_size - 1)` when `state_window = W > 0`. Slot `W - 1` holds the last `kernel_size - 1` values along the causal axis; slot `j` holds the same values for the prefix ending at position `sequence_length - W + j`. | required |
34
 
35
  ## Attributes
36
 
@@ -39,6 +39,8 @@ Default values (overridable per request):
39
  | Attribute | Default | Description |
40
  | --- | --- | --- |
41
  | `activation` | `"none"` | Activation applied after convolution and bias. Defaults to `none`; `swish` is an alias of SiLU. |
 
 
42
  | `ndim` | `1` | Number of spatial dimensions. This implementation supports the contrib 1D mode (`ndim = 1`). |
43
  | `state_window` | `0` | Contrib extension selecting the number of rollback state slots to retain, in the range 0 through 8. Defaults to 0. |
44
 
@@ -53,7 +55,7 @@ Default values (overridable per request):
53
  - [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)
54
  - [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)
55
  - [`test.json`](build/webgpu/test.json) — correctness cases
56
- - [`bench.json`](build/webgpu/bench.json) — benchmark + tuning cases
57
  - [`causal-conv-with-state-tiled.wgsl.jinja`](build/webgpu/causal-conv-with-state-tiled.wgsl.jinja)
58
  - [`causal-conv-with-state-vec4.wgsl.jinja`](build/webgpu/causal-conv-with-state-vec4.wgsl.jinja)
59
  - [`causal-conv-with-state.wgsl.jinja`](build/webgpu/causal-conv-with-state.wgsl.jinja)
@@ -61,7 +63,7 @@ Default values (overridable per request):
61
  ## Use with `@huggingface/kernels`
62
 
63
  ```sh
64
- npm install --save-exact @huggingface/kernels@0.0.1-preview.2
65
  ```
66
 
67
  Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
 
20
 
21
  | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
22
  | --- | --- | --- | --- | --- | --- | --- |
23
+ | `inputT` | `input` | `T` | `3` | — | Input with shape `(batch, channels, length)`, or `(batch, length, channels)` when `channels_last` is 1. | required |
24
  | `weightT` | `weight` | `T` | `3` | — | Depthwise convolution kernel with shape `(channels, 1, kernel_size)` for the supported 1-D mode. | required |
25
  | `biasT` | `bias` | `T` | `1` | — | Optional per-channel bias with shape `(channels,)`. | optional |
26
+ | `pastStateT` | `past_state` | `T` | derived | — | Carry state from the previous step; shape `(batch_size, channels, (kernel_size - 1) * dilation)`, or `(W, batch_size, channels, (kernel_size - 1) * dilation)` when `state_window = W > 0`, in which case only slot `W - 1` is read. If absent, the left-side padding is zero. With `channels_last`=1, the length and channel axes are swapped. | optional |
27
 
28
  ## Outputs
29
 
30
  | Name | Upstream name | Logical dtype | Rank | Shape | Description | Presence |
31
  | --- | --- | --- | --- | --- | --- | --- |
32
  | `outputT` | `output` | `T` | `3` | same as `inputT` | Convolution output with the same shape as `input`. | required |
33
+ | `presentStateT` | `present_state` | `T` | derived | derived | Updated carry state; shape `(batch_size, channels, (kernel_size - 1) * dilation)`, or `(W, batch_size, channels, (kernel_size - 1) * dilation)` when `state_window = W > 0`. Slot `W - 1` holds the last `(kernel_size - 1) * dilation` values along the causal axis; slot `j` holds the same values for the prefix ending at position `sequence_length - W + j`. With `channels_last`=1, the length and channel axes are swapped. | required |
34
 
35
  ## Attributes
36
 
 
39
  | Attribute | Default | Description |
40
  | --- | --- | --- |
41
  | `activation` | `"none"` | Activation applied after convolution and bias. Defaults to `none`; `swish` is an alias of SiLU. |
42
+ | `channels_last` | `0` | Activation and state layout: 0 selects `(batch, channels, length)`; 1 selects `(batch, length, channels)`. |
43
+ | `dilation` | `1` | Positive integer spacing between taps; the carry state holds (`kernel_size` - 1) * dilation raw samples. |
44
  | `ndim` | `1` | Number of spatial dimensions. This implementation supports the contrib 1D mode (`ndim = 1`). |
45
  | `state_window` | `0` | Contrib extension selecting the number of rollback state slots to retain, in the range 0 through 8. Defaults to 0. |
46
 
 
55
  - [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)
56
  - [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)
57
  - [`test.json`](build/webgpu/test.json) — correctness cases
58
+ - [`bench.json`](build/webgpu/bench.json) — benchmark cases
59
  - [`causal-conv-with-state-tiled.wgsl.jinja`](build/webgpu/causal-conv-with-state-tiled.wgsl.jinja)
60
  - [`causal-conv-with-state-vec4.wgsl.jinja`](build/webgpu/causal-conv-with-state-vec4.wgsl.jinja)
61
  - [`causal-conv-with-state.wgsl.jinja`](build/webgpu/causal-conv-with-state.wgsl.jinja)
 
63
  ## Use with `@huggingface/kernels`
64
 
65
  ```sh
66
+ npm install --save-exact @huggingface/kernels@0.0.1-preview.3
67
  ```
68
 
69
  Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
build/webgpu/bench.json CHANGED
@@ -80,7 +80,7 @@
80
  "name": "causal-conv-f32-large-kernel127-prefill-b2c1024t512-alignment-pathology",
81
  "preset": "stress",
82
  "provenance": {
83
- "notes": "A valid odd-width causal kernel with `K = 127` fails the tiled path's four-tap alignment requirement and selects the scalar zero-state implementation."
84
  },
85
  "vars": { "batch": 2, "channels": 1024, "length": 512, "kernel": 127 },
86
  "attrs": { "activation": "none" },
@@ -396,6 +396,78 @@
396
  }
397
  ]
398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  }
400
  ]
401
  }
 
80
  "name": "causal-conv-f32-large-kernel127-prefill-b2c1024t512-alignment-pathology",
81
  "preset": "stress",
82
  "provenance": {
83
+ "notes": "A causal convolution with odd kernel width 127, two batches, 1,024 channels, and 512 time steps checks long zero-state windows."
84
  },
85
  "vars": { "batch": 2, "channels": 1024, "length": 512, "kernel": 127 },
86
  "attrs": { "activation": "none" },
 
396
  }
397
  ]
398
  }
399
+ },
400
+ {
401
+ "name": "causal-conv-f32-b2c32t256k4-layout1-dilation1",
402
+ "preset": "smoke",
403
+ "vars": { "batch": 2, "channels": 32, "length": 256, "kernel": 4 },
404
+ "attrs": { "activation": "none", "channels_last": 1, "dilation": 1 },
405
+ "inputs": {
406
+ "inputT": { "shape": [2, 256, 32], "dtype": "float32", "dist": "normal", "seed": 205, "scale": 0.2 },
407
+ "weightT": { "shape": [32, 1, 4], "dtype": "float32", "dist": "normal", "seed": 206, "scale": 0.1 }
408
+ },
409
+ "outputs": {
410
+ "outputT": { "shape": [2, 256, 32], "dtype": "float32" },
411
+ "presentStateT": { "shape": [2, 3, 32], "dtype": "float32" }
412
+ },
413
+ "bench": {
414
+ "primary": true,
415
+ "metrics": [
416
+ { "type": "gflops", "value": "2 * numel(shapes.outputT) * dim(shapes.weightT, 1)" },
417
+ {
418
+ "type": "bandwidth",
419
+ "value": "(numel(shapes.inputT) + numel(shapes.weightT) + numel(shapes.outputT) + numel(shapes.presentStateT)) * 4"
420
+ }
421
+ ]
422
+ }
423
+ },
424
+ {
425
+ "name": "causal-conv-f32-b2c32t256k4-layout0-dilation2",
426
+ "preset": "smoke",
427
+ "vars": { "batch": 2, "channels": 32, "length": 256, "kernel": 4 },
428
+ "attrs": { "activation": "none", "channels_last": 0, "dilation": 2 },
429
+ "inputs": {
430
+ "inputT": { "shape": [2, 32, 256], "dtype": "float32", "dist": "normal", "seed": 205, "scale": 0.2 },
431
+ "weightT": { "shape": [32, 1, 4], "dtype": "float32", "dist": "normal", "seed": 206, "scale": 0.1 }
432
+ },
433
+ "outputs": {
434
+ "outputT": { "shape": [2, 32, 256], "dtype": "float32" },
435
+ "presentStateT": { "shape": [2, 32, 6], "dtype": "float32" }
436
+ },
437
+ "bench": {
438
+ "primary": true,
439
+ "metrics": [
440
+ { "type": "gflops", "value": "2 * numel(shapes.outputT) * dim(shapes.weightT, 1)" },
441
+ {
442
+ "type": "bandwidth",
443
+ "value": "(numel(shapes.inputT) + numel(shapes.weightT) + numel(shapes.outputT) + numel(shapes.presentStateT)) * 4"
444
+ }
445
+ ]
446
+ }
447
+ },
448
+ {
449
+ "name": "causal-conv-f32-b2c32t256k4-layout1-dilation2",
450
+ "preset": "smoke",
451
+ "vars": { "batch": 2, "channels": 32, "length": 256, "kernel": 4 },
452
+ "attrs": { "activation": "none", "channels_last": 1, "dilation": 2 },
453
+ "inputs": {
454
+ "inputT": { "shape": [2, 256, 32], "dtype": "float32", "dist": "normal", "seed": 205, "scale": 0.2 },
455
+ "weightT": { "shape": [32, 1, 4], "dtype": "float32", "dist": "normal", "seed": 206, "scale": 0.1 }
456
+ },
457
+ "outputs": {
458
+ "outputT": { "shape": [2, 256, 32], "dtype": "float32" },
459
+ "presentStateT": { "shape": [2, 6, 32], "dtype": "float32" }
460
+ },
461
+ "bench": {
462
+ "primary": true,
463
+ "metrics": [
464
+ { "type": "gflops", "value": "2 * numel(shapes.outputT) * dim(shapes.weightT, 1)" },
465
+ {
466
+ "type": "bandwidth",
467
+ "value": "(numel(shapes.inputT) + numel(shapes.weightT) + numel(shapes.outputT) + numel(shapes.presentStateT)) * 4"
468
+ }
469
+ ]
470
+ }
471
  }
472
  ]
473
  }
build/webgpu/causal-conv-with-state-tiled.wgsl.jinja CHANGED
@@ -1,7 +1,4 @@
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
2
- {% if usesF16 %}
3
- enable f16;
4
- {% endif -%}
5
  {{ env.wgsl.resourceDeclarations }}
6
 
7
  const WG: u32 = {{ workgroupSize }}u;
@@ -13,8 +10,8 @@ const KERNEL_SIZE: u32 = {{ kernelSize }}u;
13
  // use it: the phantom taps contribute nothing. The input tile grows to match,
14
  // because the last lane reads TILE + KERNEL_PADDED - 2.
15
  const KERNEL_PADDED: u32 = {{ kernelSizePadded }}u;
16
- const STATE_LENGTH: u32 = KERNEL_SIZE - 1u;
17
- const INPUT_TILE_SIZE: u32 = TILE + KERNEL_PADDED - 1u;
18
 
19
  var<workgroup> input_tile: array<f32, {{ inputTileSize }}>;
20
  var<workgroup> weight_tile: array<f32, {{ kernelSizePadded }}>;
@@ -93,7 +90,11 @@ fn main(@builtin(local_invocation_id) lid3: vec3<u32>,
93
  weight_tile[k + 2u],
94
  weight_tile[k + 3u]
95
  );
96
- let base0 = lane * OUTPUTS_PER_THREAD + k;
 
 
 
 
97
  let base1 = base0 + 4u;
98
  let x00 = vec4<f32>(input_tile[base0], input_tile[base0 + 1u], input_tile[base0 + 2u], input_tile[base0 + 3u]);
99
  let x01 = vec4<f32>(input_tile[base0 + 1u], input_tile[base0 + 2u], input_tile[base0 + 3u], input_tile[base0 + 4u]);
@@ -103,7 +104,7 @@ fn main(@builtin(local_invocation_id) lid3: vec3<u32>,
103
  let x11 = vec4<f32>(input_tile[base1 + 1u], input_tile[base1 + 2u], input_tile[base1 + 3u], input_tile[base1 + 4u]);
104
  let x12 = vec4<f32>(input_tile[base1 + 2u], input_tile[base1 + 3u], input_tile[base1 + 4u], input_tile[base1 + 5u]);
105
  let x13 = vec4<f32>(input_tile[base1 + 3u], input_tile[base1 + 4u], input_tile[base1 + 5u], input_tile[base1 + 6u]);
106
- acc0 = fma(x00, vec4<f32>(w.x), acc0);
107
  acc0 = fma(x01, vec4<f32>(w.y), acc0);
108
  acc0 = fma(x02, vec4<f32>(w.z), acc0);
109
  acc0 = fma(x03, vec4<f32>(w.w), acc0);
 
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
 
 
 
2
  {{ env.wgsl.resourceDeclarations }}
3
 
4
  const WG: u32 = {{ workgroupSize }}u;
 
10
  // use it: the phantom taps contribute nothing. The input tile grows to match,
11
  // because the last lane reads TILE + KERNEL_PADDED - 2.
12
  const KERNEL_PADDED: u32 = {{ kernelSizePadded }}u;
13
+ const STATE_LENGTH: u32 = {% if causalDilation is defined and causalDilation != 1 %}(KERNEL_SIZE - 1u) * {{ causalDilation }}u{% else %}KERNEL_SIZE - 1u{% endif %};
14
+ const INPUT_TILE_SIZE: u32 = {% if causalDilation is defined and causalDilation != 1 %}TILE + (KERNEL_PADDED - 1u) * {{ causalDilation }}u{% else %}TILE + KERNEL_PADDED - 1u{% endif %};
15
 
16
  var<workgroup> input_tile: array<f32, {{ inputTileSize }}>;
17
  var<workgroup> weight_tile: array<f32, {{ kernelSizePadded }}>;
 
90
  weight_tile[k + 2u],
91
  weight_tile[k + 3u]
92
  );
93
+ {% if causalDilation is defined and causalDilation != 1 %}
94
+ let base0 = lane * OUTPUTS_PER_THREAD + k * {{ causalDilation }}u;
95
+ let base1 = base0 + 4u;
96
+ {% for block in range(2) %}{% for tap in range(4) %} let x{{ block }}{{ tap }} = vec4<f32>({% for o in range(4) %}{{ ", " if not loop.first else "" }}input_tile[base{{ block }} + {{ tap * causalDilation + o }}u]{% endfor %});
97
+ {% endfor %}{% endfor %}{% else %} let base0 = lane * OUTPUTS_PER_THREAD + k;
98
  let base1 = base0 + 4u;
99
  let x00 = vec4<f32>(input_tile[base0], input_tile[base0 + 1u], input_tile[base0 + 2u], input_tile[base0 + 3u]);
100
  let x01 = vec4<f32>(input_tile[base0 + 1u], input_tile[base0 + 2u], input_tile[base0 + 3u], input_tile[base0 + 4u]);
 
104
  let x11 = vec4<f32>(input_tile[base1 + 1u], input_tile[base1 + 2u], input_tile[base1 + 3u], input_tile[base1 + 4u]);
105
  let x12 = vec4<f32>(input_tile[base1 + 2u], input_tile[base1 + 3u], input_tile[base1 + 4u], input_tile[base1 + 5u]);
106
  let x13 = vec4<f32>(input_tile[base1 + 3u], input_tile[base1 + 4u], input_tile[base1 + 5u], input_tile[base1 + 6u]);
107
+ {% endif %} acc0 = fma(x00, vec4<f32>(w.x), acc0);
108
  acc0 = fma(x01, vec4<f32>(w.y), acc0);
109
  acc0 = fma(x02, vec4<f32>(w.z), acc0);
110
  acc0 = fma(x03, vec4<f32>(w.w), acc0);
build/webgpu/causal-conv-with-state-vec4.wgsl.jinja CHANGED
@@ -1,7 +1,12 @@
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
2
- {% if usesF16 %}
3
- enable f16;
4
- {% endif -%}
 
 
 
 
 
5
  {{ env.wgsl.resourceDeclarations }}
6
 
7
  // Four outputs per invocation for a kernel narrow enough that every tap of a
@@ -24,11 +29,7 @@ fn activate4(value: vec4<f32>) -> vec4<f32> {
24
  fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
25
  let row_vecs = params.length / 4u;
26
  let work_size = params.batchSize * params.channels * row_vecs;
27
- // Recover the logical 1D index after an oversized dispatch is folded into y.
28
- let index = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * WG;
29
- if (index >= work_size) {
30
- return;
31
- }
32
 
33
  let pos4 = index % row_vecs;
34
  let bc = index / row_vecs;
@@ -55,20 +56,13 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
55
  let w{{ k }} = f32(weight[channel * {{ kernelSize }}u + {{ k }}u]);
56
  {% endfor %}
57
  {% endif %}
 
58
  {% for k in range(kernelSize) %}
59
  {% set wk = ("w." ~ ["x", "y", "z", "w"][k]) if kernelSize == 4 else ("w" ~ k) %}
60
- {% if loop.first and hasBias %}
61
- var value = vec4<f32>(f32(bias[channel])) + {{ wk }} * vec4<f32>(
62
- {%- for j in range(4) %}{{ ("current." ~ ["x", "y", "z", "w"][j - S + k]) if j - S + k >= 0 else ("previous." ~ ["x", "y", "z", "w"][4 + j - S + k]) }}{{ ", " if not loop.last else "" }}{% endfor -%}
63
- );
64
- {% elif loop.first %}
65
- var value = {{ wk }} * vec4<f32>(
66
- {%- for j in range(4) %}{{ ("current." ~ ["x", "y", "z", "w"][j - S + k]) if j - S + k >= 0 else ("previous." ~ ["x", "y", "z", "w"][4 + j - S + k]) }}{{ ", " if not loop.last else "" }}{% endfor -%}
67
- );
68
  {% else %}
69
- value = value + {{ wk }} * vec4<f32>(
70
- {%- for j in range(4) %}{{ ("current." ~ ["x", "y", "z", "w"][j - S + k]) if j - S + k >= 0 else ("previous." ~ ["x", "y", "z", "w"][4 + j - S + k]) }}{{ ", " if not loop.last else "" }}{% endfor -%}
71
- );
72
  {% endif %}
73
  {% endfor %}
74
  output[index] = {{ outputVec4 }}(activate4(value));
 
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
2
+ {% macro flat_index_2d(workgroupSize, name="i", bound="params.count", guardInline=false) %}
3
+ {% set wgTerm = workgroupSize ~ "u" if workgroupSize is number else workgroupSize %}
4
+ // 2D-folded flat index: gid.y carries the high bits past the dispatch's
5
+ // per-axis workgroup fold width.
6
+ let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};
7
+ if ({{ name }} >= {{ bound }}) {
8
+ return;
9
+ }{% endmacro %}
10
  {{ env.wgsl.resourceDeclarations }}
11
 
12
  // Four outputs per invocation for a kernel narrow enough that every tap of a
 
29
  fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
30
  let row_vecs = params.length / 4u;
31
  let work_size = params.batchSize * params.channels * row_vecs;
32
+ {{ flat_index_2d("WG", "index", "work_size") }}
 
 
 
 
33
 
34
  let pos4 = index % row_vecs;
35
  let bc = index / row_vecs;
 
56
  let w{{ k }} = f32(weight[channel * {{ kernelSize }}u + {{ k }}u]);
57
  {% endfor %}
58
  {% endif %}
59
+ {% macro taps(k) %}{% for j in range(4) %}{{ ("current." ~ ["x", "y", "z", "w"][j - S + k]) if j - S + k >= 0 else ("previous." ~ ["x", "y", "z", "w"][4 + j - S + k]) }}{{ ", " if not loop.last else "" }}{% endfor %}{% endmacro %}
60
  {% for k in range(kernelSize) %}
61
  {% set wk = ("w." ~ ["x", "y", "z", "w"][k]) if kernelSize == 4 else ("w" ~ k) %}
62
+ {% if loop.first %}
63
+ var value = {{ "vec4<f32>(f32(bias[channel])) + " if hasBias else "" }}{{ wk }} * vec4<f32>({{ taps(k) }});
 
 
 
 
 
 
64
  {% else %}
65
+ value = value + {{ wk }} * vec4<f32>({{ taps(k) }});
 
 
66
  {% endif %}
67
  {% endfor %}
68
  output[index] = {{ outputVec4 }}(activate4(value));
build/webgpu/causal-conv-with-state.wgsl.jinja CHANGED
@@ -1,7 +1,12 @@
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
2
- {% if usesF16 %}
3
- enable f16;
4
- {% endif -%}
 
 
 
 
 
5
  {{ env.wgsl.resourceDeclarations }}
6
 
7
  const WG: u32 = {{ workgroupSize }}u;
@@ -20,17 +25,17 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
20
  // one state-writing thread per (batch, channel) even when there is no output.
21
  let len_nz = max(1u, params.length);
22
  let work_size = params.batchSize * params.channels * len_nz;
23
- // gid.y carries the high bits past the per-dimension dispatch limit.
24
- let index = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * WG;
25
- if (index >= work_size) {
26
- return;
27
- }
28
 
29
- let pos = index % len_nz;
 
 
 
 
30
  let bc = index / len_nz;
31
  let batch = bc / params.channels;
32
  let channel = bc % params.channels;
33
- let state_length = params.kernelSize - 1u;
34
 
35
  // Output exists only for real positions. At length zero this thread performs
36
  // only the present_state carryover below.
@@ -42,14 +47,14 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
42
  {% endif %}
43
  for (var k: u32 = 0u; k < params.kernelSize; k = k + 1u) {
44
  var value = 0.0;
45
- let virtual_pos = pos + k;
46
  if (virtual_pos >= state_length) {
47
  let input_pos = virtual_pos - state_length;
48
- let input_index = (batch * params.channels + channel) * params.length + input_pos;
49
  value = f32(input[input_index]);
50
  } else {
51
  {% if hasState %}
52
- let state_index = {{ pastSlot }}(batch * params.channels + channel) * state_length + virtual_pos;
53
  value = f32(past_state[state_index]);
54
  {% endif %}
55
  }
@@ -71,16 +76,16 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
71
  let virtual_pos = params.length + slot + 1u - params.stateWindow + s;
72
  if (virtual_pos >= state_length) {
73
  let input_pos = virtual_pos - state_length;
74
- let input_index = (batch * params.channels + channel) * params.length + input_pos;
75
  state_value = f32(input[input_index]);
76
  } else {
77
  {% if hasState %}
78
- let state_index = {{ pastSlot }}(batch * params.channels + channel) * state_length + virtual_pos;
79
  state_value = f32(past_state[state_index]);
80
  {% endif %}
81
  }
82
  }
83
- present_state[slot * params.stateSlotStride + (batch * params.channels + channel) * state_length + s] = {{ outputScalar }}(state_value);
84
  }
85
  }
86
  {% else %}
@@ -89,15 +94,15 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
89
  let virtual_pos = params.length + s;
90
  if (virtual_pos >= state_length) {
91
  let input_pos = virtual_pos - state_length;
92
- let input_index = (batch * params.channels + channel) * params.length + input_pos;
93
  state_value = f32(input[input_index]);
94
  } else {
95
  {% if hasState %}
96
- let state_index = (batch * params.channels + channel) * state_length + virtual_pos;
97
  state_value = f32(past_state[state_index]);
98
  {% endif %}
99
  }
100
- present_state[(batch * params.channels + channel) * state_length + s] = {{ outputScalar }}(state_value);
101
  }
102
  {% endif %}
103
  }
 
1
  {% set pastSlot = "(params.stateWindow - 1u) * params.stateSlotStride + " if hasStateWindow else "" %}
2
+ {% macro flat_index_2d(workgroupSize, name="i", bound="params.count", guardInline=false) %}
3
+ {% set wgTerm = workgroupSize ~ "u" if workgroupSize is number else workgroupSize %}
4
+ // 2D-folded flat index: gid.y carries the high bits past the dispatch's
5
+ // per-axis workgroup fold width.
6
+ let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};
7
+ if ({{ name }} >= {{ bound }}) {
8
+ return;
9
+ }{% endmacro %}
10
  {{ env.wgsl.resourceDeclarations }}
11
 
12
  const WG: u32 = {{ workgroupSize }}u;
 
25
  // one state-writing thread per (batch, channel) even when there is no output.
26
  let len_nz = max(1u, params.length);
27
  let work_size = params.batchSize * params.channels * len_nz;
28
+ {{ flat_index_2d("WG", "index", "work_size") }}
 
 
 
 
29
 
30
+ {% if channelsLast is defined and channelsLast %}
31
+ let channel = index % params.channels;
32
+ let pos = (index / params.channels) % len_nz;
33
+ let batch = index / (params.channels * len_nz);
34
+ {% else %} let pos = index % len_nz;
35
  let bc = index / len_nz;
36
  let batch = bc / params.channels;
37
  let channel = bc % params.channels;
38
+ {% endif %} let state_length = {% if causalDilation is defined and causalDilation != 1 %}(params.kernelSize - 1u) * {{ causalDilation }}u{% else %}params.kernelSize - 1u{% endif %};
39
 
40
  // Output exists only for real positions. At length zero this thread performs
41
  // only the present_state carryover below.
 
47
  {% endif %}
48
  for (var k: u32 = 0u; k < params.kernelSize; k = k + 1u) {
49
  var value = 0.0;
50
+ let virtual_pos = pos + k{% if causalDilation is defined and causalDilation != 1 %} * {{ causalDilation }}u{% endif %};
51
  if (virtual_pos >= state_length) {
52
  let input_pos = virtual_pos - state_length;
53
+ let input_index = {% if channelsLast is defined and channelsLast %}batch * params.channels * params.length + input_pos * params.channels + channel{% else %}(batch * params.channels + channel) * params.length + input_pos{% endif %};
54
  value = f32(input[input_index]);
55
  } else {
56
  {% if hasState %}
57
+ let state_index = {{ pastSlot }}{% if channelsLast is defined and channelsLast %}batch * params.channels * state_length + virtual_pos * params.channels + channel{% else %}(batch * params.channels + channel) * state_length + virtual_pos{% endif %};
58
  value = f32(past_state[state_index]);
59
  {% endif %}
60
  }
 
76
  let virtual_pos = params.length + slot + 1u - params.stateWindow + s;
77
  if (virtual_pos >= state_length) {
78
  let input_pos = virtual_pos - state_length;
79
+ let input_index = {% if channelsLast is defined and channelsLast %}batch * params.channels * params.length + input_pos * params.channels + channel{% else %}(batch * params.channels + channel) * params.length + input_pos{% endif %};
80
  state_value = f32(input[input_index]);
81
  } else {
82
  {% if hasState %}
83
+ let state_index = {{ pastSlot }}{% if channelsLast is defined and channelsLast %}batch * params.channels * state_length + virtual_pos * params.channels + channel{% else %}(batch * params.channels + channel) * state_length + virtual_pos{% endif %};
84
  state_value = f32(past_state[state_index]);
85
  {% endif %}
86
  }
87
  }
88
+ present_state[slot * params.stateSlotStride + {% if channelsLast is defined and channelsLast %}batch * params.channels * state_length + s * params.channels + channel{% else %}(batch * params.channels + channel) * state_length + s{% endif %}] = {{ outputScalar }}(state_value);
89
  }
90
  }
91
  {% else %}
 
94
  let virtual_pos = params.length + s;
95
  if (virtual_pos >= state_length) {
96
  let input_pos = virtual_pos - state_length;
97
+ let input_index = {% if channelsLast is defined and channelsLast %}batch * params.channels * params.length + input_pos * params.channels + channel{% else %}(batch * params.channels + channel) * params.length + input_pos{% endif %};
98
  state_value = f32(input[input_index]);
99
  } else {
100
  {% if hasState %}
101
+ let state_index = {% if channelsLast is defined and channelsLast %}batch * params.channels * state_length + virtual_pos * params.channels + channel{% else %}(batch * params.channels + channel) * state_length + virtual_pos{% endif %};
102
  state_value = f32(past_state[state_index]);
103
  {% endif %}
104
  }
105
+ present_state[{% if channelsLast is defined and channelsLast %}batch * params.channels * state_length + s * params.channels + channel{% else %}(batch * params.channels + channel) * state_length + s{% endif %}] = {{ outputScalar }}(state_value);
106
  }
107
  {% endif %}
108
  }
build/webgpu/manifest.json CHANGED
@@ -19,58 +19,77 @@
19
  "onnx": "present_state",
20
  "dtype": "T",
21
  "rank": "3 if attrs.state_window == 0 else 4",
22
- "shape": "[dim(shapes.inputT, 0), dim(shapes.inputT, 1), dim(shapes.weightT, 2) - 1] if attrs.state_window == 0 else [attrs.state_window, dim(shapes.inputT, 0), dim(shapes.inputT, 1), dim(shapes.weightT, 2) - 1]"
23
  }
24
  },
25
- "attributes": { "activation": { "default": "none" }, "ndim": { "default": 1 }, "state_window": { "default": 0 } },
26
- "attributeConstraints": { "activation": { "values": ["none", "silu", "swish"] }, "ndim": { "values": [1] } },
 
 
 
 
 
 
 
 
 
 
27
  "typeConstraints": { "T": ["float32", "float16"] },
28
  "tunables": { "workgroupSize": { "default": 256 }, "tiledWorkgroupSize": { "default": 128 } },
29
  "derive": {
 
 
 
 
30
  "stateWindow": "attrs.state_window",
31
  "windowed": "stateWindow > 0",
32
  "stateWindowOk": "stateWindow >= 0 and stateWindow <= 8",
33
  "kernelSize": "dim(shapes.weightT, ranks.weightT - 1)",
34
  "kernelSizePadded": "ceilDiv(kernelSize, 4) * 4",
35
  "weightRankOk": "ranks.weightT == 3 and dim(shapes.weightT, 1) == 1",
36
- "stateLength": "kernelSize - 1",
37
- "stateSlotStride": "dim(shapes.inputT, 0) * dim(shapes.inputT, 1) * stateLength",
38
- "windowedLengthOk": "not windowed or dim(shapes.inputT, 2) > 0",
39
- "presentStateOk": "(ranks.presentStateT == 3 and dim(shapes.presentStateT, 0) == dim(shapes.inputT, 0) and dim(shapes.presentStateT, 1) == dim(shapes.inputT, 1) and dim(shapes.presentStateT, 2) == stateLength) if not windowed else (ranks.presentStateT == 4 and dim(shapes.presentStateT, 0) == stateWindow and dim(shapes.presentStateT, 1) == dim(shapes.inputT, 0) and dim(shapes.presentStateT, 2) == dim(shapes.inputT, 1) and dim(shapes.presentStateT, 3) == stateLength)",
40
- "pastStateShapeOk": "present.pastStateT and ((ranks.pastStateT == 3 and dim(shapes.pastStateT, 0) == dim(shapes.inputT, 0) and dim(shapes.pastStateT, 1) == dim(shapes.inputT, 1) and dim(shapes.pastStateT, 2) == stateLength) if not windowed else (ranks.pastStateT == 4 and dim(shapes.pastStateT, 0) == stateWindow and dim(shapes.pastStateT, 1) == dim(shapes.inputT, 0) and dim(shapes.pastStateT, 2) == dim(shapes.inputT, 1) and dim(shapes.pastStateT, 3) == stateLength))",
41
- "commonContract": "ranks.inputT == 3 and weightRankOk and ranks.outputT == 3 and (tensorDtypes.inputT == \"float32\" or tensorDtypes.inputT == \"float16\") and tensorDtypes.weightT == tensorDtypes.inputT and tensorDtypes.outputT == tensorDtypes.inputT and tensorDtypes.presentStateT == tensorDtypes.inputT and f16Ok(dtypes.T) and dim(shapes.inputT, 1) == dim(shapes.weightT, 0) and dim(shapes.outputT, 0) == dim(shapes.inputT, 0) and dim(shapes.outputT, 1) == dim(shapes.inputT, 1) and dim(shapes.outputT, 2) == dim(shapes.inputT, 2) and stateWindowOk and windowedLengthOk and presentStateOk",
 
42
  "zeroStateContract": "commonContract and not present.pastStateT and not present.biasT",
43
- "biasNoStateContract": "commonContract and not present.pastStateT and present.biasT and ranks.biasT == 1 and tensorDtypes.biasT == tensorDtypes.inputT and dim(shapes.biasT, 0) == dim(shapes.inputT, 1)",
44
  "stateNoBiasContract": "commonContract and present.pastStateT and not present.biasT and tensorDtypes.pastStateT == tensorDtypes.inputT and pastStateShapeOk",
45
- "stateBiasContract": "commonContract and present.pastStateT and present.biasT and ranks.biasT == 1 and tensorDtypes.pastStateT == tensorDtypes.inputT and tensorDtypes.biasT == tensorDtypes.inputT and pastStateShapeOk and dim(shapes.biasT, 0) == dim(shapes.inputT, 1)"
 
 
 
 
 
 
46
  },
47
  "bindings": {
48
- "input": { "arg": "inputT", "buffer": "read-only-storage", "elementType": "$inputVec4" },
49
- "weight": { "arg": "weightT", "buffer": "read-only-storage", "elementType": "$weightElem" },
50
- "output": { "arg": "outputT", "buffer": "storage", "elementType": "$outputVec4" },
51
- "present_state": { "arg": "presentStateT", "buffer": "storage", "elementType": "$outputScalar" },
52
  "params": {
53
- "buffer": "uniform",
54
  "struct": [
55
  { "name": "batchSize", "type": "u32", "value": "dim(shapes.inputT, 0)" },
56
- { "name": "channels", "type": "u32", "value": "dim(shapes.inputT, 1)" },
57
- { "name": "length", "type": "u32", "value": "dim(shapes.inputT, 2)" },
58
  { "name": "stateWindow", "type": "u32", "value": "stateWindow" },
59
  { "name": "stateSlotStride", "type": "u32", "value": "stateSlotStride" }
60
  ]
61
  },
62
- "bias": { "arg": "biasT", "buffer": "read-only-storage", "elementType": "$inputScalar" },
63
- "past_state": { "arg": "pastStateT", "buffer": "read-only-storage", "elementType": "$inputScalar" },
64
- "input_2": { "arg": "inputT", "name": "input", "buffer": "read-only-storage", "elementType": "$inputScalar" },
65
- "weight_2": { "arg": "weightT", "name": "weight", "buffer": "read-only-storage", "elementType": "$inputScalar" },
66
- "output_2": { "arg": "outputT", "name": "output", "buffer": "storage", "elementType": "$outputScalar" },
67
- "params_2": {
68
  "name": "params",
69
- "buffer": "uniform",
70
  "struct": [
71
  { "name": "batchSize", "type": "u32", "value": "dim(shapes.inputT, 0)" },
72
- { "name": "channels", "type": "u32", "value": "dim(shapes.inputT, 1)" },
73
- { "name": "length", "type": "u32", "value": "dim(shapes.inputT, 2)" },
74
  { "name": "kernelSize", "type": "u32", "value": "kernelSize" },
75
  { "name": "stateWindow", "type": "u32", "value": "stateWindow" },
76
  { "name": "stateSlotStride", "type": "u32", "value": "stateSlotStride" }
@@ -81,18 +100,11 @@
81
  {
82
  "id": "zero_state_vec4",
83
  "priority": 20,
84
- "when": ["zeroStateContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0"],
85
  "derive": {
86
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
87
  "workgroupSize": 256,
88
- "hasStateWindow": "windowed",
89
- "usesF16": "tensorDtypes.inputT == \"float16\"",
90
- "inputScalar": "dtypes.T",
91
- "outputScalar": "dtypes.T",
92
  "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
93
  "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
94
- "hasBias": false,
95
- "hasState": false,
96
  "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
97
  },
98
  "passes": [
@@ -100,7 +112,6 @@
100
  "id": "main",
101
  "name": "CausalConvWithState.Vec4",
102
  "shader": "causal-conv-with-state-vec4.wgsl.jinja",
103
- "derive": { "materializeConvBeforeActivation": false },
104
  "bindings": ["input", "weight", "output", "present_state", "params"],
105
  "dispatch": {
106
  "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
@@ -111,84 +122,55 @@
111
  ]
112
  },
113
  {
114
- "id": "state_bias_vec4",
115
- "priority": 20,
116
- "when": ["stateBiasContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0"],
117
  "derive": {
118
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
119
- "workgroupSize": 256,
120
- "hasStateWindow": "windowed",
121
- "usesF16": "tensorDtypes.inputT == \"float16\"",
122
- "inputScalar": "dtypes.T",
123
- "outputScalar": "dtypes.T",
124
- "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
125
- "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
126
- "hasBias": true,
127
- "hasState": true,
128
- "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
129
  },
130
  "passes": [
131
  {
132
  "id": "main",
133
- "name": "CausalConvWithState.Vec4",
134
- "shader": "causal-conv-with-state-vec4.wgsl.jinja",
135
- "derive": { "materializeConvBeforeActivation": false },
136
- "bindings": ["input", "weight", "bias", "past_state", "output", "present_state", "params"],
137
  "dispatch": {
138
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
139
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
140
  "z": 1
141
  }
142
  }
143
  ]
144
  },
145
  {
146
- "id": "bias_no_state_vec4",
147
- "priority": 20,
148
- "when": ["biasNoStateContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0"],
149
- "derive": {
150
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
151
- "workgroupSize": 256,
152
- "hasStateWindow": "windowed",
153
- "usesF16": "tensorDtypes.inputT == \"float16\"",
154
- "inputScalar": "dtypes.T",
155
- "outputScalar": "dtypes.T",
156
- "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
157
- "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
158
- "hasBias": true,
159
- "hasState": false,
160
- "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
161
- },
162
  "passes": [
163
  {
164
  "id": "main",
165
- "name": "CausalConvWithState.Vec4",
166
- "shader": "causal-conv-with-state-vec4.wgsl.jinja",
167
- "derive": { "materializeConvBeforeActivation": false },
168
- "bindings": ["input", "weight", "bias", "output", "present_state", "params"],
169
  "dispatch": {
170
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
171
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
172
  "z": 1
173
  }
174
  }
175
  ]
176
  },
177
  {
178
- "id": "state_no_bias_vec4",
179
  "priority": 20,
180
- "when": ["stateNoBiasContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0"],
181
  "derive": {
182
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
183
  "workgroupSize": 256,
184
- "hasStateWindow": "windowed",
185
- "usesF16": "tensorDtypes.inputT == \"float16\"",
186
- "inputScalar": "dtypes.T",
187
- "outputScalar": "dtypes.T",
188
  "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
189
  "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
190
- "hasBias": false,
191
- "hasState": true,
192
  "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
193
  },
194
  "passes": [
@@ -196,8 +178,7 @@
196
  "id": "main",
197
  "name": "CausalConvWithState.Vec4",
198
  "shader": "causal-conv-with-state-vec4.wgsl.jinja",
199
- "derive": { "materializeConvBeforeActivation": false },
200
- "bindings": ["input", "weight", "past_state", "output", "present_state", "params"],
201
  "dispatch": {
202
  "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
203
  "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
@@ -207,28 +188,20 @@
207
  ]
208
  },
209
  {
210
- "id": "zero_state_tiled_large_kernel",
211
  "priority": 10,
212
- "when": ["zeroStateContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + 2 * kernelSizePadded - 1) * 4 <= device.limits.maxComputeWorkgroupStorageSize"],
213
  "derive": {
214
- "hasBias": false,
215
- "hasState": false,
216
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
217
- "inputScalar": "dtypes.T",
218
- "outputScalar": "dtypes.T",
219
  "workgroupSize": "tunables.tiledWorkgroupSize",
220
  "tileSize": "tunables.tiledWorkgroupSize * 8",
221
- "inputTileSize": "tunables.tiledWorkgroupSize * 8 + kernelSizePadded - 1",
222
- "hasStateWindow": "windowed",
223
- "usesF16": "tensorDtypes.inputT == \"float16\""
224
  },
225
  "passes": [
226
  {
227
  "id": "main",
228
  "name": "CausalConvWithState.TiledLargeKernel",
229
  "shader": "causal-conv-with-state-tiled.wgsl.jinja",
230
- "derive": { "materializeConvBeforeActivation": false },
231
- "bindings": ["input_2", "weight_2", "output_2", "present_state", "params"],
232
  "dispatch": {
233
  "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
234
  "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
@@ -238,90 +211,63 @@
238
  ]
239
  },
240
  {
241
- "id": "state_bias_tiled_large_kernel",
242
- "priority": 10,
243
- "when": ["stateBiasContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + 2 * kernelSizePadded - 1) * 4 <= device.limits.maxComputeWorkgroupStorageSize"],
244
- "derive": {
245
- "hasBias": true,
246
- "hasState": true,
247
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
248
- "inputScalar": "dtypes.T",
249
- "outputScalar": "dtypes.T",
250
- "workgroupSize": "tunables.tiledWorkgroupSize",
251
- "tileSize": "tunables.tiledWorkgroupSize * 8",
252
- "inputTileSize": "tunables.tiledWorkgroupSize * 8 + kernelSizePadded - 1",
253
- "hasStateWindow": "windowed",
254
- "usesF16": "tensorDtypes.inputT == \"float16\""
255
- },
256
  "passes": [
257
  {
258
  "id": "main",
259
- "name": "CausalConvWithState.TiledLargeKernel",
260
- "shader": "causal-conv-with-state-tiled.wgsl.jinja",
261
- "derive": { "materializeConvBeforeActivation": false },
262
- "bindings": ["input_2", "weight_2", "bias", "past_state", "output_2", "present_state", "params"],
263
  "dispatch": {
264
- "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
265
- "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
266
  "z": 1
267
  }
268
  }
269
  ]
270
  },
271
  {
272
- "id": "bias_no_state_tiled_large_kernel",
273
- "priority": 10,
274
- "when": ["biasNoStateContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + 2 * kernelSizePadded - 1) * 4 <= device.limits.maxComputeWorkgroupStorageSize"],
275
  "derive": {
276
- "hasBias": true,
277
- "hasState": false,
278
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
279
- "inputScalar": "dtypes.T",
280
- "outputScalar": "dtypes.T",
281
- "workgroupSize": "tunables.tiledWorkgroupSize",
282
- "tileSize": "tunables.tiledWorkgroupSize * 8",
283
- "inputTileSize": "tunables.tiledWorkgroupSize * 8 + kernelSizePadded - 1",
284
- "hasStateWindow": "windowed",
285
- "usesF16": "tensorDtypes.inputT == \"float16\""
286
  },
287
  "passes": [
288
  {
289
  "id": "main",
290
- "name": "CausalConvWithState.TiledLargeKernel",
291
- "shader": "causal-conv-with-state-tiled.wgsl.jinja",
292
- "derive": { "materializeConvBeforeActivation": false },
293
- "bindings": ["input_2", "weight_2", "bias", "output_2", "present_state", "params"],
294
  "dispatch": {
295
- "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
296
- "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
297
  "z": 1
298
  }
299
  }
300
  ]
301
  },
302
  {
303
- "id": "state_no_bias_tiled_large_kernel",
304
  "priority": 10,
305
- "when": ["stateNoBiasContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + 2 * kernelSizePadded - 1) * 4 <= device.limits.maxComputeWorkgroupStorageSize"],
306
  "derive": {
307
- "hasBias": false,
308
- "hasState": true,
309
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
310
- "inputScalar": "dtypes.T",
311
- "outputScalar": "dtypes.T",
312
  "workgroupSize": "tunables.tiledWorkgroupSize",
313
  "tileSize": "tunables.tiledWorkgroupSize * 8",
314
- "inputTileSize": "tunables.tiledWorkgroupSize * 8 + kernelSizePadded - 1",
315
- "hasStateWindow": "windowed",
316
- "usesF16": "tensorDtypes.inputT == \"float16\""
317
  },
318
  "passes": [
319
  {
320
  "id": "main",
321
  "name": "CausalConvWithState.TiledLargeKernel",
322
  "shader": "causal-conv-with-state-tiled.wgsl.jinja",
323
- "derive": { "materializeConvBeforeActivation": false },
324
- "bindings": ["input_2", "weight_2", "past_state", "output_2", "present_state", "params"],
325
  "dispatch": {
326
  "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
327
  "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
@@ -331,87 +277,66 @@
331
  ]
332
  },
333
  {
334
- "id": "zero_state",
335
  "priority": 0,
336
- "when": ["zeroStateContract"],
337
- "derive": {
338
- "hasBias": false,
339
- "hasState": false,
340
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
341
- "inputScalar": "dtypes.T",
342
- "outputScalar": "dtypes.T",
343
- "workgroupSize": "tunables.workgroupSize",
344
- "hasStateWindow": "windowed",
345
- "usesF16": "tensorDtypes.inputT == \"float16\""
346
- },
347
  "passes": [
348
  {
349
  "id": "main",
350
  "name": "CausalConvWithState",
351
  "shader": "causal-conv-with-state.wgsl.jinja",
352
- "derive": { "materializeConvBeforeActivation": false },
353
- "bindings": ["input_2", "weight_2", "output_2", "present_state", "params_2"],
354
  "dispatch": {
355
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
356
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
357
  "z": 1
358
  }
359
  }
360
  ]
361
  },
362
  {
363
- "id": "state_bias",
364
- "priority": 0,
365
- "when": ["stateBiasContract"],
366
  "derive": {
367
- "hasBias": true,
368
- "hasState": true,
369
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
370
- "inputScalar": "dtypes.T",
371
- "outputScalar": "dtypes.T",
372
- "workgroupSize": "tunables.workgroupSize",
373
- "hasStateWindow": "windowed",
374
- "usesF16": "tensorDtypes.inputT == \"float16\""
375
  },
376
  "passes": [
377
  {
378
  "id": "main",
379
- "name": "CausalConvWithState",
380
- "shader": "causal-conv-with-state.wgsl.jinja",
381
- "derive": { "materializeConvBeforeActivation": false },
382
- "bindings": ["input_2", "weight_2", "bias", "past_state", "output_2", "present_state", "params_2"],
383
  "dispatch": {
384
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
385
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
386
  "z": 1
387
  }
388
  }
389
  ]
390
  },
391
  {
392
- "id": "bias_no_state",
393
- "priority": 0,
394
- "when": ["biasNoStateContract"],
395
  "derive": {
396
- "hasBias": true,
397
- "hasState": false,
398
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
399
- "inputScalar": "dtypes.T",
400
- "outputScalar": "dtypes.T",
401
- "workgroupSize": "tunables.workgroupSize",
402
- "hasStateWindow": "windowed",
403
- "usesF16": "tensorDtypes.inputT == \"float16\""
404
  },
405
  "passes": [
406
  {
407
  "id": "main",
408
- "name": "CausalConvWithState",
409
- "shader": "causal-conv-with-state.wgsl.jinja",
410
- "derive": { "materializeConvBeforeActivation": false },
411
- "bindings": ["input_2", "weight_2", "bias", "output_2", "present_state", "params_2"],
412
  "dispatch": {
413
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
414
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
415
  "z": 1
416
  }
417
  }
@@ -421,26 +346,16 @@
421
  "id": "state_no_bias",
422
  "priority": 0,
423
  "when": ["stateNoBiasContract"],
424
- "derive": {
425
- "hasBias": false,
426
- "hasState": true,
427
- "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
428
- "inputScalar": "dtypes.T",
429
- "outputScalar": "dtypes.T",
430
- "workgroupSize": "tunables.workgroupSize",
431
- "hasStateWindow": "windowed",
432
- "usesF16": "tensorDtypes.inputT == \"float16\""
433
- },
434
  "passes": [
435
  {
436
  "id": "main",
437
  "name": "CausalConvWithState",
438
  "shader": "causal-conv-with-state.wgsl.jinja",
439
- "derive": { "materializeConvBeforeActivation": false },
440
- "bindings": ["input_2", "weight_2", "past_state", "output_2", "present_state", "params_2"],
441
  "dispatch": {
442
- "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
443
- "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * max(1, dim(shapes.outputT, 2))), (workgroupSize)), 65535)",
444
  "z": 1
445
  }
446
  }
 
19
  "onnx": "present_state",
20
  "dtype": "T",
21
  "rank": "3 if attrs.state_window == 0 else 4",
22
+ "shape": "([stateWindow] + stateShape) if windowed else stateShape"
23
  }
24
  },
25
+ "attributes": {
26
+ "activation": { "default": "none" },
27
+ "channels_last": { "default": 0 },
28
+ "dilation": { "default": 1 },
29
+ "ndim": { "default": 1 },
30
+ "state_window": { "default": 0 }
31
+ },
32
+ "attributeConstraints": {
33
+ "activation": { "values": ["none", "silu", "swish"] },
34
+ "channels_last": { "values": [0, 1] },
35
+ "ndim": { "values": [1] }
36
+ },
37
  "typeConstraints": { "T": ["float32", "float16"] },
38
  "tunables": { "workgroupSize": { "default": 256 }, "tiledWorkgroupSize": { "default": 128 } },
39
  "derive": {
40
+ "channels": "dim(shapes.inputT, 2 if attrs.channels_last == 1 else 1)",
41
+ "inputLength": "dim(shapes.inputT, 1 if attrs.channels_last == 1 else 2)",
42
+ "causalDilation": "attrs.dilation",
43
+ "channelsLast": "attrs.channels_last == 1",
44
  "stateWindow": "attrs.state_window",
45
  "windowed": "stateWindow > 0",
46
  "stateWindowOk": "stateWindow >= 0 and stateWindow <= 8",
47
  "kernelSize": "dim(shapes.weightT, ranks.weightT - 1)",
48
  "kernelSizePadded": "ceilDiv(kernelSize, 4) * 4",
49
  "weightRankOk": "ranks.weightT == 3 and dim(shapes.weightT, 1) == 1",
50
+ "stateLength": "(kernelSize - 1) * causalDilation",
51
+ "stateSlotStride": "dim(shapes.inputT, 0) * channels * stateLength",
52
+ "windowedLengthOk": "not windowed or inputLength > 0",
53
+ "stateShape": "[dim(shapes.inputT, 0), stateLength, channels] if channelsLast else [dim(shapes.inputT, 0), channels, stateLength]",
54
+ "presentStateOk": "sameShape(shapes.presentStateT, ([stateWindow] + stateShape) if windowed else stateShape)",
55
+ "pastStateShapeOk": "present.pastStateT and sameShape(shapes.pastStateT, ([stateWindow] + stateShape) if windowed else stateShape)",
56
+ "commonContract": "ranks.inputT == 3 and weightRankOk and ranks.outputT == 3 and (tensorDtypes.inputT == \"float32\" or tensorDtypes.inputT == \"float16\") and tensorDtypes.weightT == tensorDtypes.inputT and tensorDtypes.outputT == tensorDtypes.inputT and tensorDtypes.presentStateT == tensorDtypes.inputT and f16Ok(dtypes.T) and channels == dim(shapes.weightT, 0) and sameShape(shapes.outputT, shapes.inputT) and stateWindowOk and windowedLengthOk and presentStateOk and kernelSize >= 1 and causalDilation >= 1 and floor(causalDilation) == causalDilation",
57
  "zeroStateContract": "commonContract and not present.pastStateT and not present.biasT",
58
+ "biasNoStateContract": "commonContract and not present.pastStateT and present.biasT and ranks.biasT == 1 and tensorDtypes.biasT == tensorDtypes.inputT and dim(shapes.biasT, 0) == channels",
59
  "stateNoBiasContract": "commonContract and present.pastStateT and not present.biasT and tensorDtypes.pastStateT == tensorDtypes.inputT and pastStateShapeOk",
60
+ "stateBiasContract": "commonContract and present.pastStateT and present.biasT and ranks.biasT == 1 and tensorDtypes.pastStateT == tensorDtypes.inputT and tensorDtypes.biasT == tensorDtypes.inputT and pastStateShapeOk and dim(shapes.biasT, 0) == channels",
61
+ "useSilu": "attrs.activation == \"silu\" or attrs.activation == \"swish\"",
62
+ "inputScalar": "dtypes.T",
63
+ "outputScalar": "dtypes.T",
64
+ "hasStateWindow": "windowed",
65
+ "hasBias": "present.biasT",
66
+ "hasState": "present.pastStateT"
67
  },
68
  "bindings": {
69
+ "input": { "arg": "inputT", "elementType": "$inputVec4" },
70
+ "weight": { "arg": "weightT", "elementType": "$weightElem" },
71
+ "output": { "arg": "outputT", "elementType": "$outputVec4" },
72
+ "present_state": { "arg": "presentStateT", "elementType": "$outputScalar" },
73
  "params": {
 
74
  "struct": [
75
  { "name": "batchSize", "type": "u32", "value": "dim(shapes.inputT, 0)" },
76
+ { "name": "channels", "type": "u32", "value": "channels" },
77
+ { "name": "length", "type": "u32", "value": "inputLength" },
78
  { "name": "stateWindow", "type": "u32", "value": "stateWindow" },
79
  { "name": "stateSlotStride", "type": "u32", "value": "stateSlotStride" }
80
  ]
81
  },
82
+ "bias": { "arg": "biasT", "elementType": "$inputScalar" },
83
+ "past_state": { "arg": "pastStateT", "elementType": "$inputScalar" },
84
+ "input_main": { "arg": "inputT", "name": "input", "elementType": "$inputScalar" },
85
+ "weight_main": { "arg": "weightT", "name": "weight", "elementType": "$inputScalar" },
86
+ "output_main": { "arg": "outputT", "name": "output", "elementType": "$outputScalar" },
87
+ "params_main": {
88
  "name": "params",
 
89
  "struct": [
90
  { "name": "batchSize", "type": "u32", "value": "dim(shapes.inputT, 0)" },
91
+ { "name": "channels", "type": "u32", "value": "channels" },
92
+ { "name": "length", "type": "u32", "value": "inputLength" },
93
  { "name": "kernelSize", "type": "u32", "value": "kernelSize" },
94
  { "name": "stateWindow", "type": "u32", "value": "stateWindow" },
95
  { "name": "stateSlotStride", "type": "u32", "value": "stateSlotStride" }
 
100
  {
101
  "id": "zero_state_vec4",
102
  "priority": 20,
103
+ "when": ["zeroStateContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0", "not channelsLast", "causalDilation == 1"],
104
  "derive": {
 
105
  "workgroupSize": 256,
 
 
 
 
106
  "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
107
  "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
 
 
108
  "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
109
  },
110
  "passes": [
 
112
  "id": "main",
113
  "name": "CausalConvWithState.Vec4",
114
  "shader": "causal-conv-with-state-vec4.wgsl.jinja",
 
115
  "bindings": ["input", "weight", "output", "present_state", "params"],
116
  "dispatch": {
117
  "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
 
122
  ]
123
  },
124
  {
125
+ "id": "zero_state_tiled_large_kernel",
126
+ "priority": 10,
127
+ "when": ["zeroStateContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + kernelSizePadded + (kernelSizePadded - 1) * causalDilation) * 4 <= device.limits.maxComputeWorkgroupStorageSize", "not channelsLast"],
128
  "derive": {
129
+ "workgroupSize": "tunables.tiledWorkgroupSize",
130
+ "tileSize": "tunables.tiledWorkgroupSize * 8",
131
+ "inputTileSize": "tunables.tiledWorkgroupSize * 8 + (kernelSizePadded - 1) * causalDilation"
 
 
 
 
 
 
 
 
132
  },
133
  "passes": [
134
  {
135
  "id": "main",
136
+ "name": "CausalConvWithState.TiledLargeKernel",
137
+ "shader": "causal-conv-with-state-tiled.wgsl.jinja",
138
+ "bindings": ["input_main", "weight_main", "output_main", "present_state", "params"],
 
139
  "dispatch": {
140
+ "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
141
+ "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
142
  "z": 1
143
  }
144
  }
145
  ]
146
  },
147
  {
148
+ "id": "zero_state",
149
+ "priority": 0,
150
+ "when": ["zeroStateContract"],
151
+ "derive": { "workgroupSize": "tunables.workgroupSize" },
 
 
 
 
 
 
 
 
 
 
 
 
152
  "passes": [
153
  {
154
  "id": "main",
155
+ "name": "CausalConvWithState",
156
+ "shader": "causal-conv-with-state.wgsl.jinja",
157
+ "bindings": ["input_main", "weight_main", "output_main", "present_state", "params_main"],
 
158
  "dispatch": {
159
+ "x": "min(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
160
+ "y": "ceilDiv(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
161
  "z": 1
162
  }
163
  }
164
  ]
165
  },
166
  {
167
+ "id": "state_bias_vec4",
168
  "priority": 20,
169
+ "when": ["stateBiasContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0", "not channelsLast", "causalDilation == 1"],
170
  "derive": {
 
171
  "workgroupSize": 256,
 
 
 
 
172
  "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
173
  "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
 
 
174
  "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
175
  },
176
  "passes": [
 
178
  "id": "main",
179
  "name": "CausalConvWithState.Vec4",
180
  "shader": "causal-conv-with-state-vec4.wgsl.jinja",
181
+ "bindings": ["input", "weight", "bias", "past_state", "output", "present_state", "params"],
 
182
  "dispatch": {
183
  "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
184
  "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
 
188
  ]
189
  },
190
  {
191
+ "id": "state_bias_tiled_large_kernel",
192
  "priority": 10,
193
+ "when": ["stateBiasContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + kernelSizePadded + (kernelSizePadded - 1) * causalDilation) * 4 <= device.limits.maxComputeWorkgroupStorageSize", "not channelsLast"],
194
  "derive": {
 
 
 
 
 
195
  "workgroupSize": "tunables.tiledWorkgroupSize",
196
  "tileSize": "tunables.tiledWorkgroupSize * 8",
197
+ "inputTileSize": "tunables.tiledWorkgroupSize * 8 + (kernelSizePadded - 1) * causalDilation"
 
 
198
  },
199
  "passes": [
200
  {
201
  "id": "main",
202
  "name": "CausalConvWithState.TiledLargeKernel",
203
  "shader": "causal-conv-with-state-tiled.wgsl.jinja",
204
+ "bindings": ["input_main", "weight_main", "bias", "past_state", "output_main", "present_state", "params"],
 
205
  "dispatch": {
206
  "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
207
  "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
 
211
  ]
212
  },
213
  {
214
+ "id": "state_bias",
215
+ "priority": 0,
216
+ "when": ["stateBiasContract"],
217
+ "derive": { "workgroupSize": "tunables.workgroupSize" },
 
 
 
 
 
 
 
 
 
 
 
218
  "passes": [
219
  {
220
  "id": "main",
221
+ "name": "CausalConvWithState",
222
+ "shader": "causal-conv-with-state.wgsl.jinja",
223
+ "bindings": ["input_main", "weight_main", "bias", "past_state", "output_main", "present_state", "params_main"],
 
224
  "dispatch": {
225
+ "x": "min(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
226
+ "y": "ceilDiv(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
227
  "z": 1
228
  }
229
  }
230
  ]
231
  },
232
  {
233
+ "id": "bias_no_state_vec4",
234
+ "priority": 20,
235
+ "when": ["biasNoStateContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0", "not channelsLast", "causalDilation == 1"],
236
  "derive": {
237
+ "workgroupSize": 256,
238
+ "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
239
+ "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
240
+ "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
 
 
 
 
 
 
241
  },
242
  "passes": [
243
  {
244
  "id": "main",
245
+ "name": "CausalConvWithState.Vec4",
246
+ "shader": "causal-conv-with-state-vec4.wgsl.jinja",
247
+ "bindings": ["input", "weight", "bias", "output", "present_state", "params"],
 
248
  "dispatch": {
249
+ "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
250
+ "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
251
  "z": 1
252
  }
253
  }
254
  ]
255
  },
256
  {
257
+ "id": "bias_no_state_tiled_large_kernel",
258
  "priority": 10,
259
+ "when": ["biasNoStateContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + kernelSizePadded + (kernelSizePadded - 1) * causalDilation) * 4 <= device.limits.maxComputeWorkgroupStorageSize", "not channelsLast"],
260
  "derive": {
 
 
 
 
 
261
  "workgroupSize": "tunables.tiledWorkgroupSize",
262
  "tileSize": "tunables.tiledWorkgroupSize * 8",
263
+ "inputTileSize": "tunables.tiledWorkgroupSize * 8 + (kernelSizePadded - 1) * causalDilation"
 
 
264
  },
265
  "passes": [
266
  {
267
  "id": "main",
268
  "name": "CausalConvWithState.TiledLargeKernel",
269
  "shader": "causal-conv-with-state-tiled.wgsl.jinja",
270
+ "bindings": ["input_main", "weight_main", "bias", "output_main", "present_state", "params"],
 
271
  "dispatch": {
272
  "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
273
  "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
 
277
  ]
278
  },
279
  {
280
+ "id": "bias_no_state",
281
  "priority": 0,
282
+ "when": ["biasNoStateContract"],
283
+ "derive": { "workgroupSize": "tunables.workgroupSize" },
 
 
 
 
 
 
 
 
 
284
  "passes": [
285
  {
286
  "id": "main",
287
  "name": "CausalConvWithState",
288
  "shader": "causal-conv-with-state.wgsl.jinja",
289
+ "bindings": ["input_main", "weight_main", "bias", "output_main", "present_state", "params_main"],
 
290
  "dispatch": {
291
+ "x": "min(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
292
+ "y": "ceilDiv(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
293
  "z": 1
294
  }
295
  }
296
  ]
297
  },
298
  {
299
+ "id": "state_no_bias_vec4",
300
+ "priority": 20,
301
+ "when": ["stateNoBiasContract", "kernelSize >= 2", "kernelSize <= 4", "dim(shapes.inputT, 2) >= 4", "dim(shapes.inputT, 2) % 4 == 0", "not channelsLast", "causalDilation == 1"],
302
  "derive": {
303
+ "workgroupSize": 256,
304
+ "inputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
305
+ "outputVec4": "\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\"",
306
+ "weightElem": "(\"vec4<f16>\" if tensorDtypes.inputT == \"float16\" else \"vec4<f32>\") if kernelSize == 4 else dtypes.T"
 
 
 
 
307
  },
308
  "passes": [
309
  {
310
  "id": "main",
311
+ "name": "CausalConvWithState.Vec4",
312
+ "shader": "causal-conv-with-state-vec4.wgsl.jinja",
313
+ "bindings": ["input", "weight", "past_state", "output", "present_state", "params"],
 
314
  "dispatch": {
315
+ "x": "min(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
316
+ "y": "ceilDiv(ceilDiv((dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * (dim(shapes.outputT, 2) / 4)), (workgroupSize)), 65535)",
317
  "z": 1
318
  }
319
  }
320
  ]
321
  },
322
  {
323
+ "id": "state_no_bias_tiled_large_kernel",
324
+ "priority": 10,
325
+ "when": ["stateNoBiasContract", "kernelSize >= 32", "dim(shapes.inputT, 2) >= 256", "dim(shapes.inputT, 2) % 8 == 0", "tunables.tiledWorkgroupSize >= 1", "floor(tunables.tiledWorkgroupSize) == tunables.tiledWorkgroupSize", "tunables.tiledWorkgroupSize <= device.limits.maxComputeInvocationsPerWorkgroup", "tunables.tiledWorkgroupSize <= device.limits.maxComputeWorkgroupSizeX", "(tunables.tiledWorkgroupSize * 8 + kernelSizePadded + (kernelSizePadded - 1) * causalDilation) * 4 <= device.limits.maxComputeWorkgroupStorageSize", "not channelsLast"],
326
  "derive": {
327
+ "workgroupSize": "tunables.tiledWorkgroupSize",
328
+ "tileSize": "tunables.tiledWorkgroupSize * 8",
329
+ "inputTileSize": "tunables.tiledWorkgroupSize * 8 + (kernelSizePadded - 1) * causalDilation"
 
 
 
 
 
330
  },
331
  "passes": [
332
  {
333
  "id": "main",
334
+ "name": "CausalConvWithState.TiledLargeKernel",
335
+ "shader": "causal-conv-with-state-tiled.wgsl.jinja",
336
+ "bindings": ["input_main", "weight_main", "past_state", "output_main", "present_state", "params"],
 
337
  "dispatch": {
338
+ "x": "min(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
339
+ "y": "ceilDiv(dim(shapes.outputT, 0) * dim(shapes.outputT, 1) * ceilDiv(dim(shapes.outputT, 2), tileSize), 65535)",
340
  "z": 1
341
  }
342
  }
 
346
  "id": "state_no_bias",
347
  "priority": 0,
348
  "when": ["stateNoBiasContract"],
349
+ "derive": { "workgroupSize": "tunables.workgroupSize" },
 
 
 
 
 
 
 
 
 
350
  "passes": [
351
  {
352
  "id": "main",
353
  "name": "CausalConvWithState",
354
  "shader": "causal-conv-with-state.wgsl.jinja",
355
+ "bindings": ["input_main", "weight_main", "past_state", "output_main", "present_state", "params_main"],
 
356
  "dispatch": {
357
+ "x": "min(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
358
+ "y": "ceilDiv(ceilDiv((dim(shapes.inputT, 0) * channels * max(1, inputLength)), (workgroupSize)), 65535)",
359
  "z": 1
360
  }
361
  }
build/webgpu/metadata.json CHANGED
@@ -1,35 +1,35 @@
1
  {
2
  "name": "com.microsoft.CausalConvWithState",
3
- "id": "_com_microsoft_causalconvwithstate_webgpu_2f94cdc",
4
  "version": 1,
5
  "license": "Apache-2.0",
6
  "backend": { "type": "webgpu" },
7
  "digest": {
8
  "algorithm": "sha256",
9
  "files": {
10
- "bench.json": "xexf85uhEj1seBHH80A/gzgwsempJwEy1IPsqs2Q81w=",
11
- "causal-conv-with-state-tiled.wgsl.jinja": "VcSN9BQ2I4NO+PfsdA4qMne9kISCvAZeturYtZLWpmI=",
12
- "causal-conv-with-state-vec4.wgsl.jinja": "rxqAeKAR/c0Qpy1FL2kyiNO1Ki+dusqnxkQcYtnhV4E=",
13
- "causal-conv-with-state.wgsl.jinja": "QrQcWLijzv+pENPVNjTA/UNNzCCNXrjiEySPL/rOuMQ=",
14
- "manifest.json": "nUvFIfdnmA2uQhwLhzjd141hkTwVnTFEppipUB6Fk+E=",
15
- "test.json": "ITwDaH/kaBYxzYqj2uGRdZXBX7uN8/++FZ/mKSQvnho="
16
  }
17
  },
18
- "provenance": { "kernel": { "sha": "91d990483a174128daf7673f3f37a7c890493ae1", "dirty": false } },
19
  "webgpu": {
20
- "manifestSpec": "2.0",
21
  "variants": {
22
  "zero_state_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
23
- "state_bias_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
24
- "bias_no_state_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
25
- "state_no_bias_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
26
  "zero_state_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
27
- "state_bias_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
28
- "bias_no_state_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
29
- "state_no_bias_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
30
  "zero_state": ["causal-conv-with-state.wgsl.jinja"],
 
 
31
  "state_bias": ["causal-conv-with-state.wgsl.jinja"],
 
 
32
  "bias_no_state": ["causal-conv-with-state.wgsl.jinja"],
 
 
33
  "state_no_bias": ["causal-conv-with-state.wgsl.jinja"]
34
  }
35
  }
 
1
  {
2
  "name": "com.microsoft.CausalConvWithState",
3
+ "id": "_com_microsoft_causalconvwithstate_webgpu_497b636",
4
  "version": 1,
5
  "license": "Apache-2.0",
6
  "backend": { "type": "webgpu" },
7
  "digest": {
8
  "algorithm": "sha256",
9
  "files": {
10
+ "bench.json": "VZ4iX04MaTq+cGsDaUFxIgUMPbEm9X5xXeAp+B/c+gw=",
11
+ "causal-conv-with-state-tiled.wgsl.jinja": "Q5bbjBXpHMRSmHovwIXIQnDaeHJniM+tS48x3lTDPAw=",
12
+ "causal-conv-with-state-vec4.wgsl.jinja": "vM/mv4hndKQ05w6NVLjq1rBHA2qPEXMdI3/nwwagvYk=",
13
+ "causal-conv-with-state.wgsl.jinja": "Pr6GwBHPU2HnWONPjCbz46QB24JK+34Qj3gu8P6GJBY=",
14
+ "manifest.json": "/R4bylER5z0eL1IPPdzJTMTvdcec+NNC/xh4gBR3cIc=",
15
+ "test.json": "rEWMf93peBX7/6HRgGQLjEPNevPSqCOmaATkY22GaEI="
16
  }
17
  },
18
+ "provenance": { "kernel": { "sha": "6fdf6301e2bbcc2f03bf1eaf493b7ad55ef33afc", "dirty": false } },
19
  "webgpu": {
20
+ "manifestSpec": "2.1",
21
  "variants": {
22
  "zero_state_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
 
 
 
23
  "zero_state_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
 
 
 
24
  "zero_state": ["causal-conv-with-state.wgsl.jinja"],
25
+ "state_bias_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
26
+ "state_bias_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
27
  "state_bias": ["causal-conv-with-state.wgsl.jinja"],
28
+ "bias_no_state_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
29
+ "bias_no_state_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
30
  "bias_no_state": ["causal-conv-with-state.wgsl.jinja"],
31
+ "state_no_bias_vec4": ["causal-conv-with-state-vec4.wgsl.jinja"],
32
+ "state_no_bias_tiled_large_kernel": ["causal-conv-with-state-tiled.wgsl.jinja"],
33
  "state_no_bias": ["causal-conv-with-state.wgsl.jinja"]
34
  }
35
  }
build/webgpu/test.json CHANGED
@@ -421,7 +421,7 @@
421
  "presentStateT": { "dtype": "float32", "shape": [1, 3, 2], "tolerance": 0.000001 }
422
  },
423
  "provenance": {
424
- "notes": "Odd sequence length keeps the bias/no-state scalar fallback covered when the vec4 route is ineligible."
425
  }
426
  },
427
  {
@@ -624,7 +624,7 @@
624
  {
625
  "name": "vec4_zero_state_silu_compact",
626
  "provenance": {
627
- "notes": "Compact correctness lock for the aligned K=4 vec4 prefill path, including causal zero padding, SiLU, multi-batch rows, and present-state tails."
628
  },
629
  "attrs": { "activation": "silu" },
630
  "inputs": {
@@ -646,9 +646,7 @@
646
  },
647
  {
648
  "name": "large_kernel_tiled_zero_state_compact",
649
- "provenance": {
650
- "notes": "Compact correctness lock for the workgroup-tiled large-kernel prefill path and its cooperative present-state update."
651
- },
652
  "attrs": { "activation": "none" },
653
  "inputs": {
654
  "inputT": {
@@ -669,9 +667,7 @@
669
  },
670
  {
671
  "name": "large_kernel_tiled_bias_no_state_compact",
672
- "provenance": {
673
- "notes": "Compact correctness lock for the bias-only specialization of the workgroup-tiled large-kernel prefill path."
674
- },
675
  "attrs": { "activation": "silu" },
676
  "inputs": {
677
  "inputT": {
@@ -694,7 +690,7 @@
694
  {
695
  "name": "large_kernel_tiled_state_no_bias_compact",
696
  "provenance": {
697
- "notes": "Compact correctness lock for the carry-state specialization of the workgroup-tiled large-kernel prefill path."
698
  },
699
  "attrs": { "activation": "none" },
700
  "inputs": {
@@ -722,7 +718,7 @@
722
  {
723
  "name": "large_kernel_tiled_state_bias_silu_compact",
724
  "provenance": {
725
- "notes": "Compact correctness lock for the carry-state, bias, and SiLU specialization used by the production-shape fixture."
726
  },
727
  "attrs": { "activation": "silu" },
728
  "inputs": {
@@ -751,7 +747,7 @@
751
  {
752
  "name": "large_kernel_tiled_state_bias_k128_wg64_multitile",
753
  "provenance": {
754
- "notes": "Smallest swept workgroup at the production kernel size; length 520 forces a partial second output tile."
755
  },
756
  "attrs": { "activation": "silu" },
757
  "tunables": { "tiledWorkgroupSize": 64 },
@@ -780,7 +776,9 @@
780
  },
781
  {
782
  "name": "large_kernel_tiled_state_bias_k128_wg256",
783
- "provenance": { "notes": "Largest swept workgroup at the production kernel and sequence sizes." },
 
 
784
  "attrs": { "activation": "silu" },
785
  "tunables": { "tiledWorkgroupSize": 256 },
786
  "inputs": {
@@ -1253,7 +1251,7 @@
1253
  {
1254
  "name": "large_kernel_tiled_unaligned_k37_state_weight_tile_pad",
1255
  "provenance": {
1256
- "notes": "Kernel length 1 mod 4 carrying past state, so the padded weight tile is covered on the stateful arm where STATE_LENGTH stays the true kernel-1."
1257
  },
1258
  "attrs": { "activation": "none" },
1259
  "inputs": {
@@ -1338,6 +1336,1510 @@
1338
  "outputT": { "dtype": "float32", "shape": [1, 2, 8], "tolerance": 0.00002 },
1339
  "presentStateT": { "dtype": "float32", "shape": [3, 1, 2, 3], "tolerance": 0.000001 }
1340
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1341
  }
1342
  ]
1343
  }
 
421
  "presentStateT": { "dtype": "float32", "shape": [1, 3, 2], "tolerance": 0.000001 }
422
  },
423
  "provenance": {
424
+ "notes": "A depthwise causal convolution with kernel length 3, a bias and no incoming state processes a 5-element (odd-length) sequence per channel, producing a 2-element carried state."
425
  }
426
  },
427
  {
 
624
  {
625
  "name": "vec4_zero_state_silu_compact",
626
  "provenance": {
627
+ "notes": "A four-tap causal convolution checks zero padding, SiLU, multiple batches and present-state tails."
628
  },
629
  "attrs": { "activation": "silu" },
630
  "inputs": {
 
646
  },
647
  {
648
  "name": "large_kernel_tiled_zero_state_compact",
649
+ "provenance": { "notes": "A large causal kernel checks prefill output and present-state updates." },
 
 
650
  "attrs": { "activation": "none" },
651
  "inputs": {
652
  "inputT": {
 
667
  },
668
  {
669
  "name": "large_kernel_tiled_bias_no_state_compact",
670
+ "provenance": { "notes": "A large causal kernel with bias checks prefill output and present-state updates." },
 
 
671
  "attrs": { "activation": "silu" },
672
  "inputs": {
673
  "inputT": {
 
690
  {
691
  "name": "large_kernel_tiled_state_no_bias_compact",
692
  "provenance": {
693
+ "notes": "A large causal kernel with carry state checks prefill output and present-state updates."
694
  },
695
  "attrs": { "activation": "none" },
696
  "inputs": {
 
718
  {
719
  "name": "large_kernel_tiled_state_bias_silu_compact",
720
  "provenance": {
721
+ "notes": "A large causal kernel with carry state, bias and SiLU checks prefill output and present-state updates."
722
  },
723
  "attrs": { "activation": "silu" },
724
  "inputs": {
 
747
  {
748
  "name": "large_kernel_tiled_state_bias_k128_wg64_multitile",
749
  "provenance": {
750
+ "notes": "A causal convolution with a 128-element kernel, incoming 127-element state and Silu activation processes a 520-element sequence, 8 past a multiple of the 128-element kernel length."
751
  },
752
  "attrs": { "activation": "silu" },
753
  "tunables": { "tiledWorkgroupSize": 64 },
 
776
  },
777
  {
778
  "name": "large_kernel_tiled_state_bias_k128_wg256",
779
+ "provenance": {
780
+ "notes": "A causal convolution with a 128-element kernel, incoming 127-element state and Silu activation processes a 512-element sequence, an exact multiple of the kernel length."
781
+ },
782
  "attrs": { "activation": "silu" },
783
  "tunables": { "tiledWorkgroupSize": 256 },
784
  "inputs": {
 
1251
  {
1252
  "name": "large_kernel_tiled_unaligned_k37_state_weight_tile_pad",
1253
  "provenance": {
1254
+ "notes": "A depthwise causal convolution with a 37-element kernel (one more than a multiple of four) carries a 36-element incoming state across a 256-element, 2-channel sequence."
1255
  },
1256
  "attrs": { "activation": "none" },
1257
  "inputs": {
 
1336
  "outputT": { "dtype": "float32", "shape": [1, 2, 8], "tolerance": 0.00002 },
1337
  "presentStateT": { "dtype": "float32", "shape": [3, 1, 2, 3], "tolerance": 0.000001 }
1338
  }
1339
+ },
1340
+ {
1341
+ "name": "ort_state_window3_batched_prefill_b2_c8_l6_k4",
1342
+ "attrs": { "activation": "silu", "state_window": 3 },
1343
+ "inputs": {
1344
+ "inputT": {
1345
+ "dtype": "float32",
1346
+ "shape": [2, 8, 6],
1347
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.19, "scale": 0.5 }
1348
+ },
1349
+ "weightT": {
1350
+ "dtype": "float32",
1351
+ "shape": [8, 1, 4],
1352
+ "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.11, "scale": 0.25 }
1353
+ },
1354
+ "biasT": { "dtype": "float32", "shape": [8], "data": { "kind": "linspace", "start": 0.0, "end": 0.07 } },
1355
+ "pastStateT": {
1356
+ "dtype": "float32",
1357
+ "shape": [3, 2, 8, 3],
1358
+ "data": { "kind": "fillFloat32", "sinStep": 0.3, "cosStep": 0.13, "scale": 0.5 }
1359
+ }
1360
+ },
1361
+ "outputs": {
1362
+ "outputT": { "dtype": "float32", "shape": [2, 8, 6], "tolerance": 0.000001, "relTolerance": 0.000001 },
1363
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 8, 3], "tolerance": 0.000001, "relTolerance": 0.000001 }
1364
+ }
1365
+ },
1366
+ {
1367
+ "name": "ort_state_window3_decode_generic_k7_b2_c8",
1368
+ "attrs": { "activation": "silu", "state_window": 3 },
1369
+ "inputs": {
1370
+ "inputT": {
1371
+ "dtype": "float32",
1372
+ "shape": [2, 8, 1],
1373
+ "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.19, "scale": 0.5 }
1374
+ },
1375
+ "weightT": {
1376
+ "dtype": "float32",
1377
+ "shape": [8, 1, 7],
1378
+ "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.11, "scale": 0.25 }
1379
+ },
1380
+ "biasT": { "dtype": "float32", "shape": [8], "data": { "kind": "linspace", "start": 0.0, "end": 0.07 } }
1381
+ },
1382
+ "outputs": {
1383
+ "outputT": { "dtype": "float32", "shape": [2, 8, 1], "tolerance": 0.000001, "relTolerance": 0.000001 },
1384
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 8, 6], "tolerance": 0.000001, "relTolerance": 0.000001 }
1385
+ }
1386
+ },
1387
+ {
1388
+ "name": "layout0_dilation2_state0_bias0_float32",
1389
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
1390
+ "inputs": {
1391
+ "inputT": {
1392
+ "dtype": "float32",
1393
+ "shape": [2, 3, 5],
1394
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1395
+ },
1396
+ "weightT": {
1397
+ "dtype": "float32",
1398
+ "shape": [3, 1, 4],
1399
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1400
+ }
1401
+ },
1402
+ "outputs": {
1403
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1404
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 6], "tolerance": 0 }
1405
+ }
1406
+ },
1407
+ {
1408
+ "name": "layout0_dilation2_state0_bias0_float16",
1409
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
1410
+ "inputs": {
1411
+ "inputT": {
1412
+ "dtype": "float16",
1413
+ "shape": [2, 3, 5],
1414
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1415
+ },
1416
+ "weightT": {
1417
+ "dtype": "float16",
1418
+ "shape": [3, 1, 4],
1419
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1420
+ }
1421
+ },
1422
+ "outputs": {
1423
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1424
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 6], "tolerance": 0 }
1425
+ }
1426
+ },
1427
+ {
1428
+ "name": "layout0_dilation2_state0_bias1_float32",
1429
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
1430
+ "inputs": {
1431
+ "inputT": {
1432
+ "dtype": "float32",
1433
+ "shape": [2, 3, 5],
1434
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1435
+ },
1436
+ "weightT": {
1437
+ "dtype": "float32",
1438
+ "shape": [3, 1, 4],
1439
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1440
+ },
1441
+ "biasT": {
1442
+ "dtype": "float32",
1443
+ "shape": [3],
1444
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1445
+ }
1446
+ },
1447
+ "outputs": {
1448
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1449
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 6], "tolerance": 0 }
1450
+ }
1451
+ },
1452
+ {
1453
+ "name": "layout0_dilation2_state0_bias1_float16",
1454
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
1455
+ "inputs": {
1456
+ "inputT": {
1457
+ "dtype": "float16",
1458
+ "shape": [2, 3, 5],
1459
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1460
+ },
1461
+ "weightT": {
1462
+ "dtype": "float16",
1463
+ "shape": [3, 1, 4],
1464
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1465
+ },
1466
+ "biasT": {
1467
+ "dtype": "float16",
1468
+ "shape": [3],
1469
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1470
+ }
1471
+ },
1472
+ "outputs": {
1473
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1474
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 6], "tolerance": 0 }
1475
+ }
1476
+ },
1477
+ {
1478
+ "name": "layout0_dilation2_state1_bias0_float32",
1479
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
1480
+ "inputs": {
1481
+ "inputT": {
1482
+ "dtype": "float32",
1483
+ "shape": [2, 3, 5],
1484
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1485
+ },
1486
+ "weightT": {
1487
+ "dtype": "float32",
1488
+ "shape": [3, 1, 4],
1489
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1490
+ },
1491
+ "pastStateT": {
1492
+ "dtype": "float32",
1493
+ "shape": [2, 3, 6],
1494
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1495
+ }
1496
+ },
1497
+ "outputs": {
1498
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1499
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 6], "tolerance": 0 }
1500
+ }
1501
+ },
1502
+ {
1503
+ "name": "layout0_dilation2_state1_bias0_float16",
1504
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
1505
+ "inputs": {
1506
+ "inputT": {
1507
+ "dtype": "float16",
1508
+ "shape": [2, 3, 5],
1509
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1510
+ },
1511
+ "weightT": {
1512
+ "dtype": "float16",
1513
+ "shape": [3, 1, 4],
1514
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1515
+ },
1516
+ "pastStateT": {
1517
+ "dtype": "float16",
1518
+ "shape": [2, 3, 6],
1519
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1520
+ }
1521
+ },
1522
+ "outputs": {
1523
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1524
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 6], "tolerance": 0 }
1525
+ }
1526
+ },
1527
+ {
1528
+ "name": "layout0_dilation2_state1_bias1_float32",
1529
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
1530
+ "inputs": {
1531
+ "inputT": {
1532
+ "dtype": "float32",
1533
+ "shape": [2, 3, 5],
1534
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1535
+ },
1536
+ "weightT": {
1537
+ "dtype": "float32",
1538
+ "shape": [3, 1, 4],
1539
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1540
+ },
1541
+ "pastStateT": {
1542
+ "dtype": "float32",
1543
+ "shape": [2, 3, 6],
1544
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1545
+ },
1546
+ "biasT": {
1547
+ "dtype": "float32",
1548
+ "shape": [3],
1549
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1550
+ }
1551
+ },
1552
+ "outputs": {
1553
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1554
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 6], "tolerance": 0 }
1555
+ }
1556
+ },
1557
+ {
1558
+ "name": "layout0_dilation2_state1_bias1_float16",
1559
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
1560
+ "inputs": {
1561
+ "inputT": {
1562
+ "dtype": "float16",
1563
+ "shape": [2, 3, 5],
1564
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1565
+ },
1566
+ "weightT": {
1567
+ "dtype": "float16",
1568
+ "shape": [3, 1, 4],
1569
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1570
+ },
1571
+ "pastStateT": {
1572
+ "dtype": "float16",
1573
+ "shape": [2, 3, 6],
1574
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1575
+ },
1576
+ "biasT": {
1577
+ "dtype": "float16",
1578
+ "shape": [3],
1579
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1580
+ }
1581
+ },
1582
+ "outputs": {
1583
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1584
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 6], "tolerance": 0 }
1585
+ }
1586
+ },
1587
+ {
1588
+ "name": "layout0_dilation3_state0_bias0_float32",
1589
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "none" },
1590
+ "inputs": {
1591
+ "inputT": {
1592
+ "dtype": "float32",
1593
+ "shape": [2, 3, 5],
1594
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1595
+ },
1596
+ "weightT": {
1597
+ "dtype": "float32",
1598
+ "shape": [3, 1, 4],
1599
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1600
+ }
1601
+ },
1602
+ "outputs": {
1603
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1604
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 9], "tolerance": 0 }
1605
+ }
1606
+ },
1607
+ {
1608
+ "name": "layout0_dilation3_state0_bias0_float16",
1609
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "none" },
1610
+ "inputs": {
1611
+ "inputT": {
1612
+ "dtype": "float16",
1613
+ "shape": [2, 3, 5],
1614
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1615
+ },
1616
+ "weightT": {
1617
+ "dtype": "float16",
1618
+ "shape": [3, 1, 4],
1619
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1620
+ }
1621
+ },
1622
+ "outputs": {
1623
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1624
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 9], "tolerance": 0 }
1625
+ }
1626
+ },
1627
+ {
1628
+ "name": "layout0_dilation3_state0_bias1_float32",
1629
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "silu" },
1630
+ "inputs": {
1631
+ "inputT": {
1632
+ "dtype": "float32",
1633
+ "shape": [2, 3, 5],
1634
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1635
+ },
1636
+ "weightT": {
1637
+ "dtype": "float32",
1638
+ "shape": [3, 1, 4],
1639
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1640
+ },
1641
+ "biasT": {
1642
+ "dtype": "float32",
1643
+ "shape": [3],
1644
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1645
+ }
1646
+ },
1647
+ "outputs": {
1648
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1649
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 9], "tolerance": 0 }
1650
+ }
1651
+ },
1652
+ {
1653
+ "name": "layout0_dilation3_state0_bias1_float16",
1654
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "silu" },
1655
+ "inputs": {
1656
+ "inputT": {
1657
+ "dtype": "float16",
1658
+ "shape": [2, 3, 5],
1659
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1660
+ },
1661
+ "weightT": {
1662
+ "dtype": "float16",
1663
+ "shape": [3, 1, 4],
1664
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1665
+ },
1666
+ "biasT": {
1667
+ "dtype": "float16",
1668
+ "shape": [3],
1669
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1670
+ }
1671
+ },
1672
+ "outputs": {
1673
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1674
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 9], "tolerance": 0 }
1675
+ }
1676
+ },
1677
+ {
1678
+ "name": "layout0_dilation3_state1_bias0_float32",
1679
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 3, "activation": "none" },
1680
+ "inputs": {
1681
+ "inputT": {
1682
+ "dtype": "float32",
1683
+ "shape": [2, 3, 5],
1684
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1685
+ },
1686
+ "weightT": {
1687
+ "dtype": "float32",
1688
+ "shape": [3, 1, 4],
1689
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1690
+ },
1691
+ "pastStateT": {
1692
+ "dtype": "float32",
1693
+ "shape": [3, 2, 3, 9],
1694
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1695
+ }
1696
+ },
1697
+ "outputs": {
1698
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1699
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 3, 9], "tolerance": 0 }
1700
+ }
1701
+ },
1702
+ {
1703
+ "name": "layout0_dilation3_state1_bias0_float16",
1704
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 3, "activation": "none" },
1705
+ "inputs": {
1706
+ "inputT": {
1707
+ "dtype": "float16",
1708
+ "shape": [2, 3, 5],
1709
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1710
+ },
1711
+ "weightT": {
1712
+ "dtype": "float16",
1713
+ "shape": [3, 1, 4],
1714
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1715
+ },
1716
+ "pastStateT": {
1717
+ "dtype": "float16",
1718
+ "shape": [3, 2, 3, 9],
1719
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1720
+ }
1721
+ },
1722
+ "outputs": {
1723
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1724
+ "presentStateT": { "dtype": "float16", "shape": [3, 2, 3, 9], "tolerance": 0 }
1725
+ }
1726
+ },
1727
+ {
1728
+ "name": "layout0_dilation3_state1_bias1_float32",
1729
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 3, "activation": "silu" },
1730
+ "inputs": {
1731
+ "inputT": {
1732
+ "dtype": "float32",
1733
+ "shape": [2, 3, 5],
1734
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1735
+ },
1736
+ "weightT": {
1737
+ "dtype": "float32",
1738
+ "shape": [3, 1, 4],
1739
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1740
+ },
1741
+ "pastStateT": {
1742
+ "dtype": "float32",
1743
+ "shape": [3, 2, 3, 9],
1744
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1745
+ },
1746
+ "biasT": {
1747
+ "dtype": "float32",
1748
+ "shape": [3],
1749
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1750
+ }
1751
+ },
1752
+ "outputs": {
1753
+ "outputT": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001, "relTolerance": 0.00001 },
1754
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 3, 9], "tolerance": 0 }
1755
+ }
1756
+ },
1757
+ {
1758
+ "name": "layout0_dilation3_state1_bias1_float16",
1759
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 3, "activation": "silu" },
1760
+ "inputs": {
1761
+ "inputT": {
1762
+ "dtype": "float16",
1763
+ "shape": [2, 3, 5],
1764
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1765
+ },
1766
+ "weightT": {
1767
+ "dtype": "float16",
1768
+ "shape": [3, 1, 4],
1769
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1770
+ },
1771
+ "pastStateT": {
1772
+ "dtype": "float16",
1773
+ "shape": [3, 2, 3, 9],
1774
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1775
+ },
1776
+ "biasT": {
1777
+ "dtype": "float16",
1778
+ "shape": [3],
1779
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1780
+ }
1781
+ },
1782
+ "outputs": {
1783
+ "outputT": { "dtype": "float16", "shape": [2, 3, 5], "tolerance": 0.002, "relTolerance": 0.002 },
1784
+ "presentStateT": { "dtype": "float16", "shape": [3, 2, 3, 9], "tolerance": 0 }
1785
+ }
1786
+ },
1787
+ {
1788
+ "name": "layout1_dilation1_state0_bias0_float32",
1789
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "none" },
1790
+ "inputs": {
1791
+ "inputT": {
1792
+ "dtype": "float32",
1793
+ "shape": [2, 5, 3],
1794
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1795
+ },
1796
+ "weightT": {
1797
+ "dtype": "float32",
1798
+ "shape": [3, 1, 4],
1799
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1800
+ }
1801
+ },
1802
+ "outputs": {
1803
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
1804
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 }
1805
+ }
1806
+ },
1807
+ {
1808
+ "name": "layout1_dilation1_state0_bias0_float16",
1809
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "none" },
1810
+ "inputs": {
1811
+ "inputT": {
1812
+ "dtype": "float16",
1813
+ "shape": [2, 5, 3],
1814
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1815
+ },
1816
+ "weightT": {
1817
+ "dtype": "float16",
1818
+ "shape": [3, 1, 4],
1819
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1820
+ }
1821
+ },
1822
+ "outputs": {
1823
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
1824
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 3], "tolerance": 0 }
1825
+ }
1826
+ },
1827
+ {
1828
+ "name": "layout1_dilation1_state0_bias1_float32",
1829
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "silu" },
1830
+ "inputs": {
1831
+ "inputT": {
1832
+ "dtype": "float32",
1833
+ "shape": [2, 5, 3],
1834
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1835
+ },
1836
+ "weightT": {
1837
+ "dtype": "float32",
1838
+ "shape": [3, 1, 4],
1839
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1840
+ },
1841
+ "biasT": {
1842
+ "dtype": "float32",
1843
+ "shape": [3],
1844
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1845
+ }
1846
+ },
1847
+ "outputs": {
1848
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
1849
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 }
1850
+ }
1851
+ },
1852
+ {
1853
+ "name": "layout1_dilation1_state0_bias1_float16",
1854
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "silu" },
1855
+ "inputs": {
1856
+ "inputT": {
1857
+ "dtype": "float16",
1858
+ "shape": [2, 5, 3],
1859
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1860
+ },
1861
+ "weightT": {
1862
+ "dtype": "float16",
1863
+ "shape": [3, 1, 4],
1864
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1865
+ },
1866
+ "biasT": {
1867
+ "dtype": "float16",
1868
+ "shape": [3],
1869
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1870
+ }
1871
+ },
1872
+ "outputs": {
1873
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
1874
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 3], "tolerance": 0 }
1875
+ }
1876
+ },
1877
+ {
1878
+ "name": "layout1_dilation1_state1_bias0_float32",
1879
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "none" },
1880
+ "inputs": {
1881
+ "inputT": {
1882
+ "dtype": "float32",
1883
+ "shape": [2, 5, 3],
1884
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1885
+ },
1886
+ "weightT": {
1887
+ "dtype": "float32",
1888
+ "shape": [3, 1, 4],
1889
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1890
+ },
1891
+ "pastStateT": {
1892
+ "dtype": "float32",
1893
+ "shape": [2, 3, 3],
1894
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1895
+ }
1896
+ },
1897
+ "outputs": {
1898
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
1899
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 }
1900
+ }
1901
+ },
1902
+ {
1903
+ "name": "layout1_dilation1_state1_bias0_float16",
1904
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "none" },
1905
+ "inputs": {
1906
+ "inputT": {
1907
+ "dtype": "float16",
1908
+ "shape": [2, 5, 3],
1909
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1910
+ },
1911
+ "weightT": {
1912
+ "dtype": "float16",
1913
+ "shape": [3, 1, 4],
1914
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1915
+ },
1916
+ "pastStateT": {
1917
+ "dtype": "float16",
1918
+ "shape": [2, 3, 3],
1919
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1920
+ }
1921
+ },
1922
+ "outputs": {
1923
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
1924
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 3], "tolerance": 0 }
1925
+ }
1926
+ },
1927
+ {
1928
+ "name": "layout1_dilation1_state1_bias1_float32",
1929
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "silu" },
1930
+ "inputs": {
1931
+ "inputT": {
1932
+ "dtype": "float32",
1933
+ "shape": [2, 5, 3],
1934
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1935
+ },
1936
+ "weightT": {
1937
+ "dtype": "float32",
1938
+ "shape": [3, 1, 4],
1939
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1940
+ },
1941
+ "pastStateT": {
1942
+ "dtype": "float32",
1943
+ "shape": [2, 3, 3],
1944
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1945
+ },
1946
+ "biasT": {
1947
+ "dtype": "float32",
1948
+ "shape": [3],
1949
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1950
+ }
1951
+ },
1952
+ "outputs": {
1953
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
1954
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 }
1955
+ }
1956
+ },
1957
+ {
1958
+ "name": "layout1_dilation1_state1_bias1_float16",
1959
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "silu" },
1960
+ "inputs": {
1961
+ "inputT": {
1962
+ "dtype": "float16",
1963
+ "shape": [2, 5, 3],
1964
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1965
+ },
1966
+ "weightT": {
1967
+ "dtype": "float16",
1968
+ "shape": [3, 1, 4],
1969
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
1970
+ },
1971
+ "pastStateT": {
1972
+ "dtype": "float16",
1973
+ "shape": [2, 3, 3],
1974
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
1975
+ },
1976
+ "biasT": {
1977
+ "dtype": "float16",
1978
+ "shape": [3],
1979
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
1980
+ }
1981
+ },
1982
+ "outputs": {
1983
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
1984
+ "presentStateT": { "dtype": "float16", "shape": [2, 3, 3], "tolerance": 0 }
1985
+ }
1986
+ },
1987
+ {
1988
+ "name": "layout1_dilation2_state0_bias0_float32",
1989
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "none" },
1990
+ "inputs": {
1991
+ "inputT": {
1992
+ "dtype": "float32",
1993
+ "shape": [2, 5, 3],
1994
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
1995
+ },
1996
+ "weightT": {
1997
+ "dtype": "float32",
1998
+ "shape": [3, 1, 4],
1999
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2000
+ }
2001
+ },
2002
+ "outputs": {
2003
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2004
+ "presentStateT": { "dtype": "float32", "shape": [2, 6, 3], "tolerance": 0 }
2005
+ }
2006
+ },
2007
+ {
2008
+ "name": "layout1_dilation2_state0_bias0_float16",
2009
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "none" },
2010
+ "inputs": {
2011
+ "inputT": {
2012
+ "dtype": "float16",
2013
+ "shape": [2, 5, 3],
2014
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2015
+ },
2016
+ "weightT": {
2017
+ "dtype": "float16",
2018
+ "shape": [3, 1, 4],
2019
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2020
+ }
2021
+ },
2022
+ "outputs": {
2023
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2024
+ "presentStateT": { "dtype": "float16", "shape": [2, 6, 3], "tolerance": 0 }
2025
+ }
2026
+ },
2027
+ {
2028
+ "name": "layout1_dilation2_state0_bias1_float32",
2029
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "silu" },
2030
+ "inputs": {
2031
+ "inputT": {
2032
+ "dtype": "float32",
2033
+ "shape": [2, 5, 3],
2034
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2035
+ },
2036
+ "weightT": {
2037
+ "dtype": "float32",
2038
+ "shape": [3, 1, 4],
2039
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2040
+ },
2041
+ "biasT": {
2042
+ "dtype": "float32",
2043
+ "shape": [3],
2044
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2045
+ }
2046
+ },
2047
+ "outputs": {
2048
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2049
+ "presentStateT": { "dtype": "float32", "shape": [2, 6, 3], "tolerance": 0 }
2050
+ }
2051
+ },
2052
+ {
2053
+ "name": "layout1_dilation2_state0_bias1_float16",
2054
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "silu" },
2055
+ "inputs": {
2056
+ "inputT": {
2057
+ "dtype": "float16",
2058
+ "shape": [2, 5, 3],
2059
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2060
+ },
2061
+ "weightT": {
2062
+ "dtype": "float16",
2063
+ "shape": [3, 1, 4],
2064
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2065
+ },
2066
+ "biasT": {
2067
+ "dtype": "float16",
2068
+ "shape": [3],
2069
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2070
+ }
2071
+ },
2072
+ "outputs": {
2073
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2074
+ "presentStateT": { "dtype": "float16", "shape": [2, 6, 3], "tolerance": 0 }
2075
+ }
2076
+ },
2077
+ {
2078
+ "name": "layout1_dilation2_state1_bias0_float32",
2079
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "none" },
2080
+ "inputs": {
2081
+ "inputT": {
2082
+ "dtype": "float32",
2083
+ "shape": [2, 5, 3],
2084
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2085
+ },
2086
+ "weightT": {
2087
+ "dtype": "float32",
2088
+ "shape": [3, 1, 4],
2089
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2090
+ },
2091
+ "pastStateT": {
2092
+ "dtype": "float32",
2093
+ "shape": [2, 6, 3],
2094
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2095
+ }
2096
+ },
2097
+ "outputs": {
2098
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2099
+ "presentStateT": { "dtype": "float32", "shape": [2, 6, 3], "tolerance": 0 }
2100
+ }
2101
+ },
2102
+ {
2103
+ "name": "layout1_dilation2_state1_bias0_float16",
2104
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "none" },
2105
+ "inputs": {
2106
+ "inputT": {
2107
+ "dtype": "float16",
2108
+ "shape": [2, 5, 3],
2109
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2110
+ },
2111
+ "weightT": {
2112
+ "dtype": "float16",
2113
+ "shape": [3, 1, 4],
2114
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2115
+ },
2116
+ "pastStateT": {
2117
+ "dtype": "float16",
2118
+ "shape": [2, 6, 3],
2119
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2120
+ }
2121
+ },
2122
+ "outputs": {
2123
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2124
+ "presentStateT": { "dtype": "float16", "shape": [2, 6, 3], "tolerance": 0 }
2125
+ }
2126
+ },
2127
+ {
2128
+ "name": "layout1_dilation2_state1_bias1_float32",
2129
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "silu" },
2130
+ "inputs": {
2131
+ "inputT": {
2132
+ "dtype": "float32",
2133
+ "shape": [2, 5, 3],
2134
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2135
+ },
2136
+ "weightT": {
2137
+ "dtype": "float32",
2138
+ "shape": [3, 1, 4],
2139
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2140
+ },
2141
+ "pastStateT": {
2142
+ "dtype": "float32",
2143
+ "shape": [2, 6, 3],
2144
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2145
+ },
2146
+ "biasT": {
2147
+ "dtype": "float32",
2148
+ "shape": [3],
2149
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2150
+ }
2151
+ },
2152
+ "outputs": {
2153
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2154
+ "presentStateT": { "dtype": "float32", "shape": [2, 6, 3], "tolerance": 0 }
2155
+ }
2156
+ },
2157
+ {
2158
+ "name": "layout1_dilation2_state1_bias1_float16",
2159
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "silu" },
2160
+ "inputs": {
2161
+ "inputT": {
2162
+ "dtype": "float16",
2163
+ "shape": [2, 5, 3],
2164
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2165
+ },
2166
+ "weightT": {
2167
+ "dtype": "float16",
2168
+ "shape": [3, 1, 4],
2169
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2170
+ },
2171
+ "pastStateT": {
2172
+ "dtype": "float16",
2173
+ "shape": [2, 6, 3],
2174
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2175
+ },
2176
+ "biasT": {
2177
+ "dtype": "float16",
2178
+ "shape": [3],
2179
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2180
+ }
2181
+ },
2182
+ "outputs": {
2183
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2184
+ "presentStateT": { "dtype": "float16", "shape": [2, 6, 3], "tolerance": 0 }
2185
+ }
2186
+ },
2187
+ {
2188
+ "name": "layout1_dilation3_state0_bias0_float32",
2189
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "none" },
2190
+ "inputs": {
2191
+ "inputT": {
2192
+ "dtype": "float32",
2193
+ "shape": [2, 5, 3],
2194
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2195
+ },
2196
+ "weightT": {
2197
+ "dtype": "float32",
2198
+ "shape": [3, 1, 4],
2199
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2200
+ }
2201
+ },
2202
+ "outputs": {
2203
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2204
+ "presentStateT": { "dtype": "float32", "shape": [2, 9, 3], "tolerance": 0 }
2205
+ }
2206
+ },
2207
+ {
2208
+ "name": "layout1_dilation3_state0_bias0_float16",
2209
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "none" },
2210
+ "inputs": {
2211
+ "inputT": {
2212
+ "dtype": "float16",
2213
+ "shape": [2, 5, 3],
2214
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2215
+ },
2216
+ "weightT": {
2217
+ "dtype": "float16",
2218
+ "shape": [3, 1, 4],
2219
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2220
+ }
2221
+ },
2222
+ "outputs": {
2223
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2224
+ "presentStateT": { "dtype": "float16", "shape": [2, 9, 3], "tolerance": 0 }
2225
+ }
2226
+ },
2227
+ {
2228
+ "name": "layout1_dilation3_state0_bias1_float32",
2229
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "silu" },
2230
+ "inputs": {
2231
+ "inputT": {
2232
+ "dtype": "float32",
2233
+ "shape": [2, 5, 3],
2234
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2235
+ },
2236
+ "weightT": {
2237
+ "dtype": "float32",
2238
+ "shape": [3, 1, 4],
2239
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2240
+ },
2241
+ "biasT": {
2242
+ "dtype": "float32",
2243
+ "shape": [3],
2244
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2245
+ }
2246
+ },
2247
+ "outputs": {
2248
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2249
+ "presentStateT": { "dtype": "float32", "shape": [2, 9, 3], "tolerance": 0 }
2250
+ }
2251
+ },
2252
+ {
2253
+ "name": "layout1_dilation3_state0_bias1_float16",
2254
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "silu" },
2255
+ "inputs": {
2256
+ "inputT": {
2257
+ "dtype": "float16",
2258
+ "shape": [2, 5, 3],
2259
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2260
+ },
2261
+ "weightT": {
2262
+ "dtype": "float16",
2263
+ "shape": [3, 1, 4],
2264
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2265
+ },
2266
+ "biasT": {
2267
+ "dtype": "float16",
2268
+ "shape": [3],
2269
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2270
+ }
2271
+ },
2272
+ "outputs": {
2273
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2274
+ "presentStateT": { "dtype": "float16", "shape": [2, 9, 3], "tolerance": 0 }
2275
+ }
2276
+ },
2277
+ {
2278
+ "name": "layout1_dilation3_state1_bias0_float32",
2279
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 3, "activation": "none" },
2280
+ "inputs": {
2281
+ "inputT": {
2282
+ "dtype": "float32",
2283
+ "shape": [2, 5, 3],
2284
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2285
+ },
2286
+ "weightT": {
2287
+ "dtype": "float32",
2288
+ "shape": [3, 1, 4],
2289
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2290
+ },
2291
+ "pastStateT": {
2292
+ "dtype": "float32",
2293
+ "shape": [3, 2, 9, 3],
2294
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2295
+ }
2296
+ },
2297
+ "outputs": {
2298
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2299
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 9, 3], "tolerance": 0 }
2300
+ }
2301
+ },
2302
+ {
2303
+ "name": "layout1_dilation3_state1_bias0_float16",
2304
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 3, "activation": "none" },
2305
+ "inputs": {
2306
+ "inputT": {
2307
+ "dtype": "float16",
2308
+ "shape": [2, 5, 3],
2309
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2310
+ },
2311
+ "weightT": {
2312
+ "dtype": "float16",
2313
+ "shape": [3, 1, 4],
2314
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2315
+ },
2316
+ "pastStateT": {
2317
+ "dtype": "float16",
2318
+ "shape": [3, 2, 9, 3],
2319
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2320
+ }
2321
+ },
2322
+ "outputs": {
2323
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2324
+ "presentStateT": { "dtype": "float16", "shape": [3, 2, 9, 3], "tolerance": 0 }
2325
+ }
2326
+ },
2327
+ {
2328
+ "name": "layout1_dilation3_state1_bias1_float32",
2329
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 3, "activation": "silu" },
2330
+ "inputs": {
2331
+ "inputT": {
2332
+ "dtype": "float32",
2333
+ "shape": [2, 5, 3],
2334
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2335
+ },
2336
+ "weightT": {
2337
+ "dtype": "float32",
2338
+ "shape": [3, 1, 4],
2339
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2340
+ },
2341
+ "pastStateT": {
2342
+ "dtype": "float32",
2343
+ "shape": [3, 2, 9, 3],
2344
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2345
+ },
2346
+ "biasT": {
2347
+ "dtype": "float32",
2348
+ "shape": [3],
2349
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2350
+ }
2351
+ },
2352
+ "outputs": {
2353
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2354
+ "presentStateT": { "dtype": "float32", "shape": [3, 2, 9, 3], "tolerance": 0 }
2355
+ }
2356
+ },
2357
+ {
2358
+ "name": "layout1_dilation3_state1_bias1_float16",
2359
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 3, "activation": "silu" },
2360
+ "inputs": {
2361
+ "inputT": {
2362
+ "dtype": "float16",
2363
+ "shape": [2, 5, 3],
2364
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2365
+ },
2366
+ "weightT": {
2367
+ "dtype": "float16",
2368
+ "shape": [3, 1, 4],
2369
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2370
+ },
2371
+ "pastStateT": {
2372
+ "dtype": "float16",
2373
+ "shape": [3, 2, 9, 3],
2374
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2375
+ },
2376
+ "biasT": {
2377
+ "dtype": "float16",
2378
+ "shape": [3],
2379
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2380
+ }
2381
+ },
2382
+ "outputs": {
2383
+ "outputT": { "dtype": "float16", "shape": [2, 5, 3], "tolerance": 0.002, "relTolerance": 0.002 },
2384
+ "presentStateT": { "dtype": "float16", "shape": [3, 2, 9, 3], "tolerance": 0 }
2385
+ }
2386
+ },
2387
+ {
2388
+ "name": "tiled_dilation2_state0_bias0",
2389
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
2390
+ "inputs": {
2391
+ "inputT": {
2392
+ "dtype": "float32",
2393
+ "shape": [1, 2, 256],
2394
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2395
+ },
2396
+ "weightT": {
2397
+ "dtype": "float32",
2398
+ "shape": [2, 1, 33],
2399
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2400
+ }
2401
+ },
2402
+ "outputs": {
2403
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2404
+ "presentStateT": { "dtype": "float32", "shape": [1, 2, 64], "tolerance": 0 }
2405
+ }
2406
+ },
2407
+ {
2408
+ "name": "tiled_dilation2_state0_bias1",
2409
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
2410
+ "inputs": {
2411
+ "inputT": {
2412
+ "dtype": "float32",
2413
+ "shape": [1, 2, 256],
2414
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2415
+ },
2416
+ "weightT": {
2417
+ "dtype": "float32",
2418
+ "shape": [2, 1, 33],
2419
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2420
+ },
2421
+ "biasT": {
2422
+ "dtype": "float32",
2423
+ "shape": [2],
2424
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2425
+ }
2426
+ },
2427
+ "outputs": {
2428
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2429
+ "presentStateT": { "dtype": "float32", "shape": [1, 2, 64], "tolerance": 0 }
2430
+ }
2431
+ },
2432
+ {
2433
+ "name": "tiled_dilation2_state1_bias0",
2434
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 2, "activation": "none" },
2435
+ "inputs": {
2436
+ "inputT": {
2437
+ "dtype": "float32",
2438
+ "shape": [1, 2, 256],
2439
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2440
+ },
2441
+ "weightT": {
2442
+ "dtype": "float32",
2443
+ "shape": [2, 1, 33],
2444
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2445
+ },
2446
+ "pastStateT": {
2447
+ "dtype": "float32",
2448
+ "shape": [2, 1, 2, 64],
2449
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2450
+ }
2451
+ },
2452
+ "outputs": {
2453
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2454
+ "presentStateT": { "dtype": "float32", "shape": [2, 1, 2, 64], "tolerance": 0 }
2455
+ }
2456
+ },
2457
+ {
2458
+ "name": "tiled_dilation2_state1_bias1",
2459
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 2, "activation": "silu" },
2460
+ "inputs": {
2461
+ "inputT": {
2462
+ "dtype": "float32",
2463
+ "shape": [1, 2, 256],
2464
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2465
+ },
2466
+ "weightT": {
2467
+ "dtype": "float32",
2468
+ "shape": [2, 1, 33],
2469
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2470
+ },
2471
+ "pastStateT": {
2472
+ "dtype": "float32",
2473
+ "shape": [2, 1, 2, 64],
2474
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2475
+ },
2476
+ "biasT": {
2477
+ "dtype": "float32",
2478
+ "shape": [2],
2479
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2480
+ }
2481
+ },
2482
+ "outputs": {
2483
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2484
+ "presentStateT": { "dtype": "float32", "shape": [2, 1, 2, 64], "tolerance": 0 }
2485
+ }
2486
+ },
2487
+ {
2488
+ "name": "tiled_dilation3_state0_bias0",
2489
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "none" },
2490
+ "inputs": {
2491
+ "inputT": {
2492
+ "dtype": "float32",
2493
+ "shape": [1, 2, 256],
2494
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2495
+ },
2496
+ "weightT": {
2497
+ "dtype": "float32",
2498
+ "shape": [2, 1, 33],
2499
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2500
+ }
2501
+ },
2502
+ "outputs": {
2503
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2504
+ "presentStateT": { "dtype": "float32", "shape": [1, 2, 96], "tolerance": 0 }
2505
+ }
2506
+ },
2507
+ {
2508
+ "name": "tiled_dilation3_state0_bias1",
2509
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "silu" },
2510
+ "inputs": {
2511
+ "inputT": {
2512
+ "dtype": "float32",
2513
+ "shape": [1, 2, 256],
2514
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2515
+ },
2516
+ "weightT": {
2517
+ "dtype": "float32",
2518
+ "shape": [2, 1, 33],
2519
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2520
+ },
2521
+ "biasT": {
2522
+ "dtype": "float32",
2523
+ "shape": [2],
2524
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2525
+ }
2526
+ },
2527
+ "outputs": {
2528
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2529
+ "presentStateT": { "dtype": "float32", "shape": [1, 2, 96], "tolerance": 0 }
2530
+ }
2531
+ },
2532
+ {
2533
+ "name": "tiled_dilation3_state1_bias0",
2534
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 2, "activation": "none" },
2535
+ "inputs": {
2536
+ "inputT": {
2537
+ "dtype": "float32",
2538
+ "shape": [1, 2, 256],
2539
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2540
+ },
2541
+ "weightT": {
2542
+ "dtype": "float32",
2543
+ "shape": [2, 1, 33],
2544
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2545
+ },
2546
+ "pastStateT": {
2547
+ "dtype": "float32",
2548
+ "shape": [2, 1, 2, 96],
2549
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2550
+ }
2551
+ },
2552
+ "outputs": {
2553
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2554
+ "presentStateT": { "dtype": "float32", "shape": [2, 1, 2, 96], "tolerance": 0 }
2555
+ }
2556
+ },
2557
+ {
2558
+ "name": "tiled_dilation3_state1_bias1",
2559
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 2, "activation": "silu" },
2560
+ "inputs": {
2561
+ "inputT": {
2562
+ "dtype": "float32",
2563
+ "shape": [1, 2, 256],
2564
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2565
+ },
2566
+ "weightT": {
2567
+ "dtype": "float32",
2568
+ "shape": [2, 1, 33],
2569
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2570
+ },
2571
+ "pastStateT": {
2572
+ "dtype": "float32",
2573
+ "shape": [2, 1, 2, 96],
2574
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2575
+ },
2576
+ "biasT": {
2577
+ "dtype": "float32",
2578
+ "shape": [2],
2579
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2580
+ }
2581
+ },
2582
+ "outputs": {
2583
+ "outputT": { "dtype": "float32", "shape": [1, 2, 256], "tolerance": 0.00001, "relTolerance": 0.00001 },
2584
+ "presentStateT": { "dtype": "float32", "shape": [2, 1, 2, 96], "tolerance": 0 }
2585
+ }
2586
+ },
2587
+ {
2588
+ "name": "tiled_dilation2_f16",
2589
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "silu" },
2590
+ "inputs": {
2591
+ "inputT": {
2592
+ "dtype": "float16",
2593
+ "shape": [1, 2, 256],
2594
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2595
+ },
2596
+ "weightT": {
2597
+ "dtype": "float16",
2598
+ "shape": [2, 1, 32],
2599
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2600
+ },
2601
+ "pastStateT": {
2602
+ "dtype": "float16",
2603
+ "shape": [1, 2, 62],
2604
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2605
+ },
2606
+ "biasT": {
2607
+ "dtype": "float16",
2608
+ "shape": [2],
2609
+ "data": { "kind": "fillFloat32", "sinStep": 0.284, "cosStep": 0.185, "scale": 0.2 }
2610
+ }
2611
+ },
2612
+ "outputs": {
2613
+ "outputT": { "dtype": "float16", "shape": [1, 2, 256], "tolerance": 0.002, "relTolerance": 0.002 },
2614
+ "presentStateT": { "dtype": "float16", "shape": [1, 2, 62], "tolerance": 0 }
2615
+ }
2616
+ },
2617
+ {
2618
+ "name": "dilated_empty_carry_layout0",
2619
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "none" },
2620
+ "inputs": {
2621
+ "inputT": {
2622
+ "dtype": "float32",
2623
+ "shape": [2, 3, 0],
2624
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2625
+ },
2626
+ "weightT": {
2627
+ "dtype": "float32",
2628
+ "shape": [3, 1, 4],
2629
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2630
+ },
2631
+ "pastStateT": {
2632
+ "dtype": "float32",
2633
+ "shape": [2, 3, 9],
2634
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2635
+ }
2636
+ },
2637
+ "outputs": {
2638
+ "outputT": { "dtype": "float32", "shape": [2, 3, 0], "tolerance": 0.00001, "relTolerance": 0.00001 },
2639
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 9], "tolerance": 0 }
2640
+ }
2641
+ },
2642
+ {
2643
+ "name": "dilated_kernel1_layout0",
2644
+ "attrs": { "channels_last": 0, "dilation": 3, "state_window": 0, "activation": "none" },
2645
+ "inputs": {
2646
+ "inputT": {
2647
+ "dtype": "float32",
2648
+ "shape": [2, 3, 1],
2649
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2650
+ },
2651
+ "weightT": {
2652
+ "dtype": "float32",
2653
+ "shape": [3, 1, 1],
2654
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2655
+ }
2656
+ },
2657
+ "outputs": {
2658
+ "outputT": { "dtype": "float32", "shape": [2, 3, 1], "tolerance": 0.00001, "relTolerance": 0.00001 },
2659
+ "presentStateT": { "dtype": "float32", "shape": [2, 3, 0], "tolerance": 0 }
2660
+ }
2661
+ },
2662
+ {
2663
+ "name": "dilated_empty_carry_layout1",
2664
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "none" },
2665
+ "inputs": {
2666
+ "inputT": {
2667
+ "dtype": "float32",
2668
+ "shape": [2, 0, 3],
2669
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2670
+ },
2671
+ "weightT": {
2672
+ "dtype": "float32",
2673
+ "shape": [3, 1, 4],
2674
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2675
+ },
2676
+ "pastStateT": {
2677
+ "dtype": "float32",
2678
+ "shape": [2, 9, 3],
2679
+ "data": { "kind": "fillFloat32", "sinStep": 0.21299999999999997, "cosStep": 0.148, "scale": 0.2 }
2680
+ }
2681
+ },
2682
+ "outputs": {
2683
+ "outputT": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2684
+ "presentStateT": { "dtype": "float32", "shape": [2, 9, 3], "tolerance": 0 }
2685
+ }
2686
+ },
2687
+ {
2688
+ "name": "dilated_kernel1_layout1",
2689
+ "attrs": { "channels_last": 1, "dilation": 3, "state_window": 0, "activation": "none" },
2690
+ "inputs": {
2691
+ "inputT": {
2692
+ "dtype": "float32",
2693
+ "shape": [2, 1, 3],
2694
+ "data": { "kind": "fillFloat32", "sinStep": 0.071, "cosStep": 0.074, "scale": 0.2 }
2695
+ },
2696
+ "weightT": {
2697
+ "dtype": "float32",
2698
+ "shape": [3, 1, 1],
2699
+ "data": { "kind": "fillFloat32", "sinStep": 0.142, "cosStep": 0.11099999999999999, "scale": 0.2 }
2700
+ }
2701
+ },
2702
+ "outputs": {
2703
+ "outputT": { "dtype": "float32", "shape": [2, 1, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2704
+ "presentStateT": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0 }
2705
+ }
2706
+ },
2707
+ {
2708
+ "name": "ort_dilated_no_state",
2709
+ "attrs": { "channels_last": 0, "dilation": 2, "state_window": 0, "activation": "none" },
2710
+ "inputs": {
2711
+ "inputT": {
2712
+ "dtype": "float32",
2713
+ "shape": [1, 2, 6],
2714
+ "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5] }
2715
+ },
2716
+ "weightT": {
2717
+ "dtype": "float32",
2718
+ "shape": [2, 1, 3],
2719
+ "data": { "kind": "values", "values": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6] }
2720
+ }
2721
+ },
2722
+ "outputs": {
2723
+ "outputT": {
2724
+ "dtype": "float32",
2725
+ "shape": [1, 2, 6],
2726
+ "tolerance": 0.00001,
2727
+ "relTolerance": 0.00001,
2728
+ "data": { "kind": "values", "values": [0.3, 0.6, 1.1, 1.6, 2.2, 2.8, 0.3, 0.9, 1.75, 2.85, 4.15, 5.65] }
2729
+ },
2730
+ "presentStateT": { "dtype": "float32", "shape": [1, 2, 4], "tolerance": 0 }
2731
+ },
2732
+ "provenance": {
2733
+ "source": "onnxruntime/test/contrib_ops/causal_conv_with_state_op_test.cc",
2734
+ "test": "DilatedNoState"
2735
+ }
2736
+ },
2737
+ {
2738
+ "name": "ort_ChannelsLastNoState",
2739
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "none" },
2740
+ "inputs": {
2741
+ "inputT": {
2742
+ "dtype": "float32",
2743
+ "shape": [2, 4, 3],
2744
+ "data": {
2745
+ "kind": "values",
2746
+ "values": [0.0, 0.49794042226882, 0.09029813394711646, 0.180807715982481, 0.48063760148764995, -0.09364733177145158, 0.3371439558140725, 0.3982827361180434, -0.2649180704542467, 0.4478493428400238, 0.26202217084363805, -0.40033339108790883, -0.4815654652866582, -0.17762677999402132, 0.44935404790581346, -0.49761991288458135, 0.003407320037385088, 0.49823780737030027, -0.4463238397141173, 0.18398025528619233, 0.4796874169464321, -0.334619928638131, 0.3396523260724074, 0.3962135849542642]
2747
+ }
2748
+ },
2749
+ "weightT": {
2750
+ "dtype": "float32",
2751
+ "shape": [3, 1, 3],
2752
+ "data": {
2753
+ "kind": "values",
2754
+ "values": [0.25, 0.24450772868103707, 0.22827223507807706, 0.20200687707803797, 0.16686570646032703, 0.12439276197293174, 0.07645422709457234, 0.025156433346732933, -0.02724668805996778]
2755
+ }
2756
+ }
2757
+ },
2758
+ "outputs": {
2759
+ "outputT": { "dtype": "float32", "shape": [2, 4, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2760
+ "presentStateT": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0 }
2761
+ },
2762
+ "provenance": {
2763
+ "source": "onnxruntime/test/contrib_ops/causal_conv_with_state_op_test.cc",
2764
+ "test": "ChannelsLastNoState"
2765
+ }
2766
+ },
2767
+ {
2768
+ "name": "ort_ChannelsLastWithStateAndBias",
2769
+ "attrs": { "channels_last": 1, "dilation": 1, "state_window": 0, "activation": "silu" },
2770
+ "inputs": {
2771
+ "inputT": {
2772
+ "dtype": "float32",
2773
+ "shape": [2, 5, 3],
2774
+ "data": {
2775
+ "kind": "values",
2776
+ "values": [0.0, 0.49635649551879424, 0.11962466460699121, 0.14297611255241777, 0.49285958941777674, -0.024194221684207075, 0.2740119683959368, 0.44820287057578, -0.16599259411036685, 0.3821644685127525, 0.3661157220151257, -0.2939285516892412, 0.4584015543858834, 0.2534534261240267, -0.3973178748786984, -0.46752628877922453, -0.23230108970687868, 0.4115404395057525, -0.49869053084904663, -0.09599295836497751, 0.4755556962035543, -0.48820800514532486, 0.04833176081570862, 0.499856227198713, -0.4369541309645112, 0.1886201859537722, 0.48241264049654564, -0.3492092346081068, 0.3131565151608276, 0.42468168925273364]
2777
+ }
2778
+ },
2779
+ "weightT": {
2780
+ "dtype": "float32",
2781
+ "shape": [3, 1, 3],
2782
+ "data": {
2783
+ "kind": "values",
2784
+ "values": [0.25, 0.24450772868103707, 0.22827223507807706, 0.20200687707803797, 0.16686570646032703, 0.12439276197293174, 0.07645422709457234, 0.025156433346732933, -0.02724668805996778]
2785
+ }
2786
+ },
2787
+ "pastStateT": {
2788
+ "dtype": "float32",
2789
+ "shape": [2, 2, 3],
2790
+ "data": {
2791
+ "kind": "values",
2792
+ "values": [0.1, 0.08253356149096784, 0.036235775447667366, 0.09553364891256061, 0.06216099682706645, 0.007073720166770291, -0.02272020946930869, -0.07373937155412455, -0.09899924966004454, -0.05048461045998576, -0.09040721420170611, -0.0987479769908865]
2793
+ }
2794
+ },
2795
+ "biasT": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-0.02, -0.01, 0.0] } }
2796
+ },
2797
+ "outputs": {
2798
+ "outputT": { "dtype": "float32", "shape": [2, 5, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2799
+ "presentStateT": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0 }
2800
+ },
2801
+ "provenance": {
2802
+ "source": "onnxruntime/test/contrib_ops/causal_conv_with_state_op_test.cc",
2803
+ "test": "ChannelsLastWithStateAndBias"
2804
+ }
2805
+ },
2806
+ {
2807
+ "name": "ort_ChannelsLastDilated",
2808
+ "attrs": { "channels_last": 1, "dilation": 2, "state_window": 0, "activation": "silu" },
2809
+ "inputs": {
2810
+ "inputT": {
2811
+ "dtype": "float32",
2812
+ "shape": [1, 6, 3],
2813
+ "data": {
2814
+ "kind": "values",
2815
+ "values": [0.0, 0.03260086070410765, -0.06498480608606168, 0.195270898753163, -0.16616904270849853, 0.13596155292740508, 0.3408432087797452, -0.3226470994332962, 0.30230420322282175, 0.3996671781085904, -0.3970079251679853, 0.39170711307448003, 0.3567714603813519, -0.370325872931093, 0.38141625986022976, 0.2230734869565668, -0.24939181811147415, 0.27405077876512024]
2816
+ }
2817
+ },
2818
+ "weightT": {
2819
+ "dtype": "float32",
2820
+ "shape": [3, 1, 3],
2821
+ "data": {
2822
+ "kind": "values",
2823
+ "values": [0.3, 0.29567543007286823, 0.28282639965850387, 0.2618233522937254, 0.23327181562527838, 0.19799494376549462, 0.15700978537549484, 0.11149796167815983, 0.06277159976742577]
2824
+ }
2825
+ },
2826
+ "pastStateT": {
2827
+ "dtype": "float32",
2828
+ "shape": [1, 4, 3],
2829
+ "data": {
2830
+ "kind": "values",
2831
+ "values": [-0.2, 0.08000000000000002, 0.36000000000000004, -0.13, 0.15000000000000002, 0.4300000000000001, -0.06, 0.22000000000000003, 0.5, 0.010000000000000009, 0.29000000000000004, 0.5700000000000001]
2832
+ }
2833
+ }
2834
+ },
2835
+ "outputs": {
2836
+ "outputT": { "dtype": "float32", "shape": [1, 6, 3], "tolerance": 0.00001, "relTolerance": 0.00001 },
2837
+ "presentStateT": { "dtype": "float32", "shape": [1, 4, 3], "tolerance": 0 }
2838
+ },
2839
+ "provenance": {
2840
+ "source": "onnxruntime/test/contrib_ops/causal_conv_with_state_op_test.cc",
2841
+ "test": "ChannelsLastDilated"
2842
+ }
2843
  }
2844
  ]
2845
  }