| { |
| "op": "ai.onnx.LSTM", |
| "fixtureArrays": { |
| "forward_default_input_w": [0.1, 0.3, -0.2, 0.4, 0.5, -0.1, 0.25, 0.2, -0.35, 0.15, 0.45, -0.25, 0.12, -0.18, 0.22, 0.28], |
| "forward_default_input_r": [0.2, -0.1, 0.05, 0.3, -0.15, 0.25, 0.35, -0.05, 0.12, 0.18, -0.22, 0.28, 0.04, -0.31, 0.26, 0.09], |
| "forward_default_input_b": [0.01, -0.03, 0.02, 0.04, -0.01, 0.03, -0.02, 0.01, 0.04, -0.02, 0.03, 0.02, -0.04, 0.05, -0.01, 0.02], |
| "ort_forward_clip_small_threshold_projection_input_w": [-0.494659, 0.0453352, -0.487793, 0.417264, -0.0175329, 0.489074, -0.446013, 0.414029, -0.0091708, -0.255364, -0.106952, -0.266717, -0.0888852, -0.428709, -0.283349, 0.208792], |
| "ort_forward_clip_small_threshold_projection_input_r": [0.146626, -0.0620289, -0.0815302, 0.100482, -0.219535, -0.306635, -0.28515, -0.314112, -0.228172, 0.405972, 0.31576, 0.281487, -0.394864, 0.42111, -0.386624, -0.390225], |
| "ort_forward_clip_small_threshold_projection_input_b": [0.381619, 0.0323954, -0.14449, 0.420804, -0.258721, 0.45056, -0.250755, 0.0967895, 0, 0, 0, 0, 0, 0, 0, 0] |
| }, |
| "cases": [ |
| { |
| "name": "forward_default", |
| "attrs": { "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0.2, -0.4, 0.5, 0.1] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_w" } } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_r" } } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_b" } } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_forward_input_forget_coupled_gate_two_steps", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/LSTM.py", |
| "test": "ONNXRuntimeUnitTests.ONNXRuntime_TestLSTMForwardInputForget", |
| "notes": "Focused four-input projection of ORT's input_forget coverage; peepholes and explicit initial states are left to future variants." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0.2, -0.4, 0.5, 0.1] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_w" } } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_r" } } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_b" } } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "multi_batch_cell_state", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.3, -0.4, 0.5, -0.6] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.4, -0.3, 0.2, 0.15] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [-0.2, 0.5, 0.35, -0.25] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.01, 0.02, -0.03, 0.04, -0.05, 0.06, 0.03, -0.02] } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [3, 1, 2, 1], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "tanh_saturation_no_nan", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [50.0] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 2.0] } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0.0001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.0001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.0001 } |
| } |
| }, |
| { |
| "name": "gate_saturation_extremes_no_nan", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [50.0, -50.0] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [2.0, 2.0, 0.0, 2.0] } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 2, 1], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_forward_custom_activations", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMActivation", |
| "notes": "Compact custom-activation sentinel: ONNX LSTM activations are [f, g, h], so tanh/sigmoid/tanh differs from the default sigmoid/tanh/tanh path." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 0, |
| "hidden_size": 1, |
| "activations": ["Tanh", "Sigmoid", "Tanh"] |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.6657628712596909, 0.8977452709155842] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.8977452709155842] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [1.6676807135113565] } |
| } |
| } |
| }, |
| { |
| "name": "ort_forward_activation_alpha_beta", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "RunLstmTest activation_alpha/activation_beta helper", |
| "notes": "Compact LSTM activation-parameter sentinel built from ORT's recurrent activation helper path. ONNX LSTM activations are [f,g,h]: LeakyRelu(alpha=0.5), ScaledTanh(alpha=2,beta=2), and Affine(alpha=3,beta=0.25)." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 0, |
| "hidden_size": 1, |
| "activations": ["LeakyRelu", "ScaledTanh", "Affine"], |
| "activation_alpha": [0.5, 2, 3], |
| "activation_beta": [2, 0.25] |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [6.034165480454901] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [6.034165480454901] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [1.9280551601516338] } |
| } |
| } |
| }, |
| { |
| "name": "hard_sigmoid_elu_softsign_activations_default_alpha_beta", |
| "provenance": { |
| "notes": "Covers ONNX LSTM activations [HardSigmoid, Elu, Softsign] with omitted alpha/beta lists, asserting the ONNX defaults (0.2/0.5 for HardSigmoid and 1.0 for Elu). Inputs exercise both HardSigmoid clamp knees, Elu's negative branch, and Softsign on both sides of zero. Pinned float32 expectations follow the ONNX LSTM equations with i/o/f/c gate order, no peepholes, and zero initial state; changing any activation to its default moves the result beyond tolerance." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 0, |
| "hidden_size": 2, |
| "activations": ["HardSigmoid", "Elu", "Softsign"] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 2, 2], |
| "data": { "kind": "values", "values": [1.5, -1.5, 1.5, 2.0, -2.0, -1.5, -1.5, -0.5] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [-0.75, -0.5, 0.25, 1.0, -0.5, -0.5, -0.5, 0.75, -0.5, -0.75, -0.25, -1.0, -0.75, 0.75, -0.75, 0.25] |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [-1.0, -0.75, 0.75, -0.5, -1.0, 0.75, -0.75, 0.5, 1.0, 1.0, 0.5, 0.5, -1.0, -0.5, 0.25, -0.5] |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": [0.25, 0.5, 0.5, 0.25, -0.25, 0.25, 0.25, 0.25, -0.5, -0.25, -0.75, 0.25, -0.5, -0.25, 0.75, 0.75] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [-0.09498741, -0.025510257109999657, 0.0033232634887099266, 0.20454547, 0.43906537, 0.08900041, 0.36546254, 0.33580408] |
| } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.43906537, 0.08900041, 0.36546254, 0.33580408] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [1.1673989, 0.17882462, 1.1618414, 0.9349916] } |
| } |
| } |
| }, |
| { |
| "name": "activation_alpha_shorter_than_activations_uses_defaults", |
| "provenance": { |
| "notes": "Asserts ONNX's per-activation parameter consumption and defaulting for [LeakyRelu, Elu, Affine]. A one-element activation_alpha list supplies LeakyRelu alpha=0.5 only; Elu uses alpha=1.0, and Affine uses alpha=1.0/beta=0.0. Signed pre-activations exercise the LeakyRelu and Elu branches. Pinned float32 expectations follow the ONNX LSTM equations and distinguish each parameter from incorrectly reusing the supplied value." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 0, |
| "hidden_size": 2, |
| "activations": ["LeakyRelu", "Elu", "Affine"], |
| "activation_alpha": [0.5] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 2, 2], |
| "data": { "kind": "values", "values": [0.5, -1.0, 2.0, 2.0, -0.5, -1.0, 1.0, -1.0] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.5, -1.0, 0.25, 0.5, -1.0, -0.5, -0.75, 1.0, -0.5, 0.5, -0.25, -0.5, 0.75, -0.25, -0.25, 0.75] |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [-1.0, -1.0, 0.5, 1.0, 0.5, -1.0, 0.5, 0.75, 1.0, 0.75, -0.25, -0.75, -0.5, -0.75, 0.5, 0.25] |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": [-0.5, 0.75, 0.0, 0.25, -0.5, 0.75, 0.25, -0.75, 0.5, 0.25, -0.25, 0.5, -0.5, -0.5, -0.75, -0.75] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [-0.01953125, 0.1771456, 0.40625, -1.2295916, -0.22570346, -0.22298376, 2.148377, 1.006566] |
| } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [-0.22570346, -0.22298376, 2.148377, 1.006566] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [-0.40083104, -0.8987889, 3.1468062, -1.1710597] } |
| } |
| } |
| }, |
| { |
| "name": "ort_sequence_lens_partial_zero", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMSequenceLengthPartialZeros", |
| "notes": "Valid ONNX sequence_lens edge: the second batch has length zero, so Y, Y_h, and Y_c are zero-filled for that batch." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 1], |
| "data": { "kind": "values", "values": [1.0, 10.0, 2.0, 20.0, 3.0, 30.0] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.2, -0.1, 0.3, 0.4] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.05, 0.07, 0.11, 0.13] } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [2, 0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.09781718254089355, 0.0, 0.222062349319458, 0.0, 0.0, 0.0] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.222062349319458, 0.0] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.5379558801651001, 0.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_sequence_lens_shorter_than_input", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMSequenceLengthShorterThanInputSequenceLength", |
| "notes": "Valid ONNX sequence_lens edge: each batch stops before the full input sequence length, so later Y positions are zero-filled and Y_h/Y_c come from the last valid timestep." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 1], |
| "data": { "kind": "values", "values": [1.0, 10.0, 2.0, 20.0, 3.0, 30.0] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.2, -0.1, 0.3, 0.4] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.05, 0.07, 0.11, 0.13] } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [1, 2] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [0.09781718254089355, 0.19001321494579315, 0.0, 0.1149020865559578, 0.0, 0.0] |
| } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.09781718254089355, 0.1149020865559578] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.20890888571739197, 1.860255479812622] } |
| } |
| } |
| }, |
| { |
| "name": "ort_sequence_lens_all_zero", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMSequenceLengthAllZeros", |
| "notes": "Compact projection of ORT's all-zero sequence_lens edge; all Y, Y_h, and Y_c values must be zero." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 1], |
| "data": { "kind": "values", "values": [1.0, 10.0, 2.0, 20.0, 3.0, 30.0] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.2, -0.1, 0.3, 0.4] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.05, 0.07, 0.11, 0.13] } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "constant", "value": 0.0 } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "constant", "value": 0.0 } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "constant", "value": 0.0 } |
| } |
| } |
| }, |
| { |
| "name": "ort_forward_clip_small_threshold_projection", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMForwardClip", |
| "notes": "Focused four-input projection of ORT's LSTM clip coverage; peepholes are left to a future variant." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2, "clip": 0.1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2], |
| "data": { "kind": "values", "values": [-0.455351, -0.276391, -0.185934, -0.269585] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_w" } |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_r" } |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_b" } |
| } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "onnx_backend_initial_bias_batch3", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_lstm_with_initial_bias" }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 4 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 16, 3], "data": { "kind": "constant", "value": 0.1 } }, |
| "r": { "dtype": "float32", "shape": [1, 16, 4], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 32], |
| "data": { |
| "kind": "values", |
| "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 3, 4], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 3, 4], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 3, 4], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_opset22_forward_default_activations_zero_bias", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMForward_OpSet22_CUDA", |
| "notes": "Supplies an explicit zero-valued B tensor for the omitted optional bias and requests Y_c so the fixture checks the final cell state." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [-0.455351, -0.185934] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 1], |
| "data": { |
| "kind": "values", |
| "values": [-0.494659, 0.0453352, -0.487793, 0.417264, -0.0175329, 0.489074, -0.446013, 0.414029] |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.146304, -0.0243403, -0.487793, 0.417264, -0.0175329, 0.489074, -0.446013, 0.414029, 0.146304, -0.0243403, -0.487793, 0.417264, -0.0175329, 0.489074, -0.446013, 0.414029] |
| } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_forward_simple_weights_no_bias_two_rows_zero_bias", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ForwardSimpleWeightsNoBiasTwoRows", |
| "notes": "Supplies an explicit zero-valued B tensor to represent the optional ONNX bias omitted by the upstream case." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 3 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 2, 1], "data": { "kind": "values", "values": [1.0, 2.0, 10.0, 11.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 12, 1], |
| "data": { "kind": "values", "values": [0.1, 0.2, 0.3, 0.4, 1.0, 2.0, 3.0, 4.0, 10.0, 11.0, 12.0, 13.0] } |
| }, |
| "r": { "dtype": "float32", "shape": [1, 12, 3], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { "dtype": "float32", "shape": [1, 24], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 2, 3], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 3], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 3], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_reverse_simple_weights_no_bias_two_rows", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ReverseSimpleWeightsNoBiasTwoRows", |
| "notes": "Exercises reverse direction with an explicit zero-valued B tensor representing an omitted optional ONNX bias." |
| }, |
| "attrs": { "layout": 0, "direction": "reverse", "input_forget": 0, "hidden_size": 3 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 2, 1], "data": { "kind": "values", "values": [1.0, 2.0, 10.0, 11.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 12, 1], |
| "data": { "kind": "values", "values": [0.1, 0.2, 0.3, 0.4, 1.0, 2.0, 3.0, 4.0, 10.0, 11.0, 12.0, 13.0] } |
| }, |
| "r": { "dtype": "float32", "shape": [1, 12, 3], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { "dtype": "float32", "shape": [1, 24], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [0.55391603, 0.69201493, 0.82696019, 0.64046413, 0.82303363, 0.91610711, 0.61249432, 0.70678632, 0.74094619, 0.62759886, 0.71640738, 0.74624585] |
| } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [0.55391603, 0.69201493, 0.82696019, 0.64046413, 0.82303363, 0.91610711] |
| } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [1.27850552, 1.46799496, 1.57641257, 1.34960834, 1.54772296, 1.65633056] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_bidirectional_simple_weights_no_bias_two_rows", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.BidirectionalSimpleWeightsNoBiasTwoRows", |
| "notes": "Exercises bidirectional execution with an explicit zero-valued B tensor representing an omitted optional ONNX bias." |
| }, |
| "attrs": { "layout": 0, "direction": "bidirectional", "input_forget": 0, "hidden_size": 3 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 2, 1], "data": { "kind": "values", "values": [1.0, 2.0, 10.0, 11.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [2, 12, 1], |
| "data": { |
| "kind": "values", |
| "values": [0.1, 0.2, 0.3, 0.4, 1.0, 2.0, 3.0, 4.0, 10.0, 11.0, 12.0, 13.0, 0.1, 0.2, 0.3, 0.4, 1.0, 2.0, 3.0, 4.0, 10.0, 11.0, 12.0, 13.0] |
| } |
| }, |
| "r": { "dtype": "float32", "shape": [2, 12, 3], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { "dtype": "float32", "shape": [2, 24], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 2, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [0.28828835, 0.36581863, 0.45679406, 0.34526032, 0.47220859, 0.55850911, 0.55391603, 0.69201493, 0.82696019, 0.64046413, 0.82303363, 0.91610711, 0.84196719, 0.89402526, 0.91073048, 0.85882828, 0.90703777, 0.92382453, 0.61249432, 0.70678632, 0.74094619, 0.62759886, 0.71640738, 0.74624585] |
| } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [2, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [0.84196719, 0.89402526, 0.91073048, 0.85882828, 0.90703777, 0.92382453, 0.55391603, 0.69201493, 0.82696019, 0.64046413, 0.82303363, 0.91610711] |
| } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [2, 2, 3], |
| "tolerance": 0.000001, |
| "data": { |
| "kind": "values", |
| "values": [1.27731147, 1.44181041, 1.53179041, 1.3249796, 1.51063104, 1.61451544, 1.27850552, 1.46799496, 1.57641257, 1.34960834, 1.54772296, 1.65633056] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_batch_parallel_false_seq_length_gt_one_zero_bias", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.BatchParallelFalseSeqLengthGreaterThanOne", |
| "notes": "Supplies an explicit zero-valued B tensor for the omitted optional bias and requests all outputs." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [1.0, 2.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 1], |
| "data": { "kind": "values", "values": [0.1, 0.2, 0.3, 0.4, 1.0, 2.0, 3.0, 4.0] } |
| }, |
| "r": { "dtype": "float32", "shape": [1, 8, 2], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "onnx_backend_lstm_defaults_zero_bias", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_lstm_defaults", |
| "notes": "Supplies an explicit zero-valued B tensor for the omitted optional bias and requests Y and Y_c so the fixture checks every output." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| }, |
| "w": { "dtype": "float32", "shape": [1, 12, 2], "data": { "kind": "constant", "value": 0.1 } }, |
| "r": { "dtype": "float32", "shape": [1, 12, 3], "data": { "kind": "constant", "value": 0.1 } }, |
| "b": { "dtype": "float32", "shape": [1, 24], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 3, 3], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 3, 3], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 3, 3], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_vec4_hidden4_input4_batch2_seq4", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 4 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 16, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.2 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 16, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.2 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.1 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 4], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 4], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 4], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_hidden10_input7_batch3_seq3_not_divisible_by_4", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 10 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 3, 7], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 40, 7], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.15 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 40, 10], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.12 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 80], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.1 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [3, 1, 3, 10], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 3, 10], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 3, 10], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_vec4_input_forget_hidden8_input8_batch2_seq3", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 8 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 32, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.15 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 32, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.12 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.1 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [3, 1, 2, 8], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 8], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 8], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_hidden256_input64_batch8_seq2_shared_mem_edge", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 256 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 8, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1024, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.05 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1024, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.05 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 8, 256], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 8, 256], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 8, 256], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_batch200_hidden8_input4_seq2", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 8 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 200, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 32, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.15 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 32, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.12 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.1 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 200, 8], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 200, 8], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 200, 8], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "tiled_input_proj_subgroup_batched_tail_b5_h256", |
| "provenance": { |
| "notes": "Route and tail lock for the tiled input projection plus two-state recurrent-weight reuse; batch=5 exercises the partial final batch tile." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 256 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 5, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.031, "cosStep": 0.047, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1024, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.019, "cosStep": 0.037, "scale": 0.03 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1024, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.011, "cosStep": 0.023, "scale": 0.01 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.029, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 5, 256], "tolerance": 0.001, "relTolerance": 0.0001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 5, 256], "tolerance": 0.001, "relTolerance": 0.0001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 5, 256], "tolerance": 0.001, "relTolerance": 0.0001 } |
| } |
| }, |
| { |
| "name": "parallel_input_proj_hidden256_input64_batch8_seq8", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 256 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 8, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1024, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.05 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1024, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17, "scale": 0.05 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [8, 1, 8, 256], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 8, 256], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 8, 256], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "forward_large_hidden512_vec4", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 512 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 64], |
| "data": { "kind": "fillFloat32", "scale": 0.05, "sinStep": 0.013, "cosStep": 0.027 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 2048, 64], |
| "data": { "kind": "fillFloat32", "scale": 0.05, "sinStep": 0.011, "cosStep": 0.023 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 2048, 512], |
| "data": { "kind": "fillFloat32", "scale": 0.05, "sinStep": 0.007, "cosStep": 0.017 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 4096], |
| "data": { "kind": "fillFloat32", "scale": 0.05, "sinStep": 0.005, "cosStep": 0.019 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 512], "tolerance": 0.002 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 512], "tolerance": 0.002 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 512], "tolerance": 0.002 } |
| } |
| }, |
| { |
| "name": "packed_recurrent_input_forget_hidden512_input64_batch4_seq8", |
| "provenance": { |
| "notes": "Correctness lock for coupled input/forget gates on the transposed recurrent-weight path." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 512 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 4, 64], |
| "data": { "kind": "fillFloat32", "scale": 0.1, "sinStep": 0.017, "cosStep": 0.029 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 2048, 64], |
| "data": { "kind": "fillFloat32", "scale": 0.02, "sinStep": 0.013, "cosStep": 0.031 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 2048, 512], |
| "data": { "kind": "fillFloat32", "scale": 0.01, "sinStep": 0.011, "cosStep": 0.019 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 4096], |
| "data": { "kind": "fillFloat32", "scale": 0.02, "sinStep": 0.007, "cosStep": 0.023 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [8, 1, 4, 512], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 4, 512], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 4, 512], "tolerance": 0.003 } |
| } |
| }, |
| { |
| "name": "general_attr_input_proj_explicit_default_activations", |
| "provenance": { |
| "notes": "Correctness lock for the projected general-attribute path using explicit standard activations; avoids relying on reverse-sequence output ordering." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 0, |
| "hidden_size": 32, |
| "activations": ["Sigmoid", "Tanh", "Tanh"] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [64, 8, 16], |
| "data": { "kind": "fillFloat32", "scale": 0.05, "sinStep": 0.013, "cosStep": 0.027 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 128, 16], |
| "data": { "kind": "fillFloat32", "scale": 0.02, "sinStep": 0.011, "cosStep": 0.023 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 128, 32], |
| "data": { "kind": "fillFloat32", "scale": 0.01, "sinStep": 0.007, "cosStep": 0.017 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 256], |
| "data": { "kind": "fillFloat32", "scale": 0.02, "sinStep": 0.005, "cosStep": 0.019 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [64, 1, 8, 32], "tolerance": 0.002 }, |
| "y_h": { "dtype": "float32", "shape": [1, 8, 32], "tolerance": 0.002 }, |
| "y_c": { "dtype": "float32", "shape": [1, 8, 32], "tolerance": 0.002 } |
| } |
| }, |
| { |
| "name": "ort_forward_peepholes", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMForwardPeepHole", |
| "notes": "Valid forward LSTM with peephole weights P. Explicit full sequence_lens and zero initial states keep P in the correct ONNX optional-input slot." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2], |
| "data": { "kind": "values", "values": [-0.455351, -0.276391, -0.185934, -0.269585] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_w" } |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_r" } |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_b" } |
| } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2] } }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "constant", "value": 0.0 } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "constant", "value": 0.0 } }, |
| "p": { |
| "dtype": "float32", |
| "shape": [1, 6], |
| "data": { "kind": "values", "values": [0.2345, 0.5235, 0.4378, 0.3475, 0.8927, 0.3456] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [-0.0251062475, 0.0561261699, -0.03277518, 0.05935364] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [-0.03277518, 0.05935364] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [-0.0780206, 0.098829] } |
| } |
| } |
| }, |
| { |
| "name": "ort_forward_initial_hidden_state", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMForwardHiddenState", |
| "notes": "Valid forward LSTM with full sequence_lens and non-zero initial_h." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2], |
| "data": { "kind": "values", "values": [-0.455351, -0.276391, -0.185934, -0.269585] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_w" } |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_r" } |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_b" } |
| } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2] } }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "values", "values": [0.34, 0.72] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.01797521, -0.07104912, -0.03174796, -0.0152949] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [-0.03174796, -0.0152949] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [-0.07285583, -0.02545788] } |
| } |
| } |
| }, |
| { |
| "name": "ort_forward_initial_hidden_and_cell_state", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc", |
| "test": "LSTMTest.ONNXRuntime_TestLSTMForwardCellState", |
| "notes": "Valid forward LSTM with full sequence_lens plus non-zero initial_h and initial_c." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2], |
| "data": { "kind": "values", "values": [-0.455351, -0.276391, -0.185934, -0.269585] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_w" } |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_r" } |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_forward_clip_small_threshold_projection_input_b" } |
| } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2] } }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "values", "values": [0.34, 0.72] } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 2], "data": { "kind": "values", "values": [0.63, 0.21] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.12797015, 0.0097284, 0.02716939, 0.01842997] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.02716939, 0.01842997] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.06408449, 0.03139432] } |
| } |
| } |
| }, |
| { |
| "name": "empty_zero_dim", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 0, 2], "data": { "kind": "values", "values": [] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.23 } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 0, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 0, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 0, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "ort_caseB_empty", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [0, 1, 2], "data": { "kind": "values", "values": [] } }, |
| "w": { "dtype": "float32", "shape": [1, 8, 2], "data": { "kind": "constant", "value": 0.5 } }, |
| "r": { "dtype": "float32", "shape": [1, 8, 2], "data": { "kind": "constant", "value": 0.5 } }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.5 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [0, 1, 1, 2], "tolerance": 0 }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "data": { "kind": "values", "values": [0.0, 0.0] }, |
| "tolerance": 0 |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 2], |
| "data": { "kind": "values", "values": [0.0, 0.0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "decode_seq1_batch1_hidden256_input256_vec4", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 256 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.3 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1024, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.05 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1024, 256], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.05 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 1, 256], "tolerance": 0.0005 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 256], "tolerance": 0.0005 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 256], "tolerance": 0.0005 } |
| } |
| }, |
| { |
| "name": "decode_seq1_batch1_hidden255_input255_vec4tail_nonmult4", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 255 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 255], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.3 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1020, 255], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.05 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1020, 255], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2040], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.05 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 1, 255], "tolerance": 0.0005 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 255], "tolerance": 0.0005 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 255], "tolerance": 0.0005 } |
| } |
| }, |
| { |
| "name": "parallel_input_proj_vec2_recur_hidden126_input33_batch17_seq8", |
| "provenance": { |
| "notes": "Even non-vec4 hidden rows bind R as vec2; odd input rows use the shared vec4-tail input projection. The workload crosses the two-pass selection threshold." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 126 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 17, 33], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 504, 33], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.03 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 504, 126], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 1008], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.03 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [8, 1, 17, 126], "tolerance": 0.001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 17, 126], "tolerance": 0.001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 17, 126], "tolerance": 0.001 } |
| } |
| }, |
| { |
| "name": "subgroup_gemv_vec2_hidden510_input65_batch5_seq4", |
| "provenance": { |
| "notes": "Exercises the cooperative subgroup recurrence at a realistic even/non-vec4 hidden size. Vec2 row packing avoids the H=510 scalar alignment cliff, the odd input width covers the input-projection tail, and batch=5 validates the partial final four-state reuse tile." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 510 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 5, 65], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 2040, 65], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.03 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 2040, 510], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 4080], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.03 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 5, 510], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 5, 510], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 5, 510], "tolerance": 0.003 } |
| } |
| }, |
| { |
| "name": "forward_hidden2048_workgroup_storage_boundary", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2048 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 4, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8192, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.02 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8192, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.01 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16384], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 4, 2048], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 4, 2048], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 4, 2048], "tolerance": 0.003 } |
| } |
| }, |
| { |
| "name": "packed_multiwg_hidden2048_seq2_below_subgroup_gemv_seq_floor", |
| "provenance": { |
| "notes": "Two timesteps at hidden=2048 sit below the seqLength>=4 floor of both subgroup-GEMV recurrences, so the multi-workgroup packed path owns the widest row geometry." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2048 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8192, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.02 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8192, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.01 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16384], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2048], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2048], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2048], "tolerance": 0.003 } |
| } |
| }, |
| { |
| "name": "input_proj_vec4_hidden128_input36_batch16_seq8_below_subgroup_gemv_band", |
| "provenance": { |
| "notes": "Aligned projected path below the hidden>=256 subgroup-GEMV band, with inputSize*4 > hiddenSize so the portable global fallback stays unpreferred on subgroup-less tiers." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 128 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 16, 36], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.1 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 512, 36], |
| "data": { "kind": "fillFloat32", "sinStep": 0.011, "cosStep": 0.023, "scale": 0.02 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 512, 128], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.017, "scale": 0.02 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 1024], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.019, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [8, 1, 16, 128], "tolerance": 0.002 }, |
| "y_h": { "dtype": "float32", "shape": [1, 16, 128], "tolerance": 0.002 }, |
| "y_c": { "dtype": "float32", "shape": [1, 16, 128], "tolerance": 0.002 } |
| } |
| }, |
| { |
| "name": "forward_hidden1536_workgroup_storage_seq8", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1536 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 2, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 6144, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.02 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 6144, 1536], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.01 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 12288], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [8, 1, 2, 1536], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 1536], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 1536], "tolerance": 0.003 } |
| } |
| }, |
| { |
| "name": "reverse_sequence_lens_padding_two_batches", |
| "attrs": { "layout": 0, "direction": "reverse", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.5, -0.4, 0.3, 0.6, -0.5, 0.2, 0.7, -0.1, 0.4, -0.3] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_w" } } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_r" } } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 1, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.0005082747666165233, 0.03499031439423561, 0.03617250546813011, -0.000445157551439479, -0.009662318974733353, 0.08723367005586624, 0.0, 0.0, 0.03050864487886429, 0.030694587156176567, 0.0, 0.0] |
| }, |
| "tolerance": 0.00001 |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.0005082747666165233, 0.03499031439423561, 0.03617250546813011, -0.000445157551439479] |
| }, |
| "tolerance": 0.00001 |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.0009712924947962165, 0.07090413570404053, 0.06332358717918396, -0.0008707273518666625] |
| }, |
| "tolerance": 0.00001 |
| } |
| } |
| }, |
| { |
| "name": "bidirectional_sequence_lens_multi_output", |
| "attrs": { "layout": 0, "direction": "bidirectional", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.5, -0.4, 0.3, 0.6, -0.5, 0.2, 0.7, -0.1, 0.4, -0.3] } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [2, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.1, 0.3, -0.2, 0.4, 0.5, -0.1, 0.25, 0.2, -0.35, 0.15, 0.45, -0.25, 0.12, -0.18, 0.22, 0.28, 0.1, 0.3, -0.2, 0.4, 0.5, -0.1, 0.25, 0.2, -0.35, 0.15, 0.45, -0.25, 0.12, -0.18, 0.22, 0.28] |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [2, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.2, -0.1, 0.05, 0.3, -0.15, 0.25, 0.35, -0.05, 0.12, 0.18, -0.22, 0.28, 0.04, -0.31, 0.26, 0.09, 0.2, -0.1, 0.05, 0.3, -0.15, 0.25, 0.35, -0.05, 0.12, 0.18, -0.22, 0.28, 0.04, -0.31, 0.26, 0.09] |
| } |
| }, |
| "b": { "dtype": "float32", "shape": [2, 16], "data": { "kind": "constant", "value": 0.0 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 2, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.012097898870706558, -0.008011005818843842, 0.03617250546813011, -0.000445157551439479, -0.0035048555582761765, 0.02484508976340294, 0.03189801052212715, -0.008506097830832005, -0.013826882466673851, 0.06477605551481247, -0.005399192683398724, -0.011899923905730247, -0.020730501040816307, 0.06834075599908829, -0.008837777189910412, -0.01188013143837452, 0.0, 0.0, 0.025346988812088966, -0.0067357090301811695, 0.0, 0.0, 0.02759101800620556, 0.0009183291113004088] |
| }, |
| "tolerance": 0.00001 |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [2, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [-0.013826882466673851, 0.06477605551481247, 0.025346988812088966, -0.0067357090301811695, -0.0035048555582761765, 0.02484508976340294, 0.03189801052212715, -0.008506097830832005] |
| }, |
| "tolerance": 0.00001 |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [2, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [-0.02651825174689293, 0.11837948858737946, 0.04556117579340935, -0.01321646198630333, -0.006707529071718454, 0.05037885159254074, 0.05586345121264458, -0.016659798100590706] |
| }, |
| "tolerance": 0.00001 |
| } |
| } |
| }, |
| { |
| "name": "zero_input_size_bias_recurrence_only", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 0], "data": { "kind": "values", "values": [] } }, |
| "w": { "dtype": "float32", "shape": [1, 8, 0], "data": { "kind": "values", "values": [] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/forward_default_input_r" } } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": [0.5, 0.4, 0.3, 0.2, -0.1, 0.2, -0.3, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "forward_batch_dispatch_fold_guard_65537", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 65537, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.0007, "cosStep": 0.0011, "scale": 0.3 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.04, "scale": 0.1 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.06, "scale": 0.1 } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 65537, 2], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 65537, 2], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 65537, 2], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "clip_saturates_gate_preactivation_hidden2", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 2, "clip": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [6.0, -8.0, 7.0, 5.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [1.5, -2.0, 2.5, 1.0, -1.5, 2.0, 1.2, -1.8, 0.9, 1.7, -2.2, 1.3, 2.1, -1.1, 1.6, -0.7] |
| } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [0.5, -0.3, 0.4, 0.2, -0.6, 0.7, 0.35, -0.15, 0.25, 0.45, -0.55, 0.65, 0.1, -0.2, 0.3, -0.4] |
| } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { |
| "kind": "values", |
| "values": [0.5, -0.5, 0.3, -0.3, 0.2, -0.2, 0.4, -0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.000001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 2], "tolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "parallel_vec2_recur_hidden6", |
| "provenance": { |
| "notes": "hidden=6 is even but not divisible by 4, so recurrent rows bind as vec2<f32>; X/W retain the alignment-safe vec4-tail path." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 6 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.021, "cosStep": 0.033, "scale": 0.4 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 24, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.029, "scale": 0.3 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 24, 6], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.023, "scale": 0.3 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 48], |
| "data": { "kind": "fillFloat32", "sinStep": 0.011, "cosStep": 0.019, "scale": 0.2 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 6], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 6], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 6], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "empty_seq_hidden4_input4_batch2_vec4_y_h_c_zero", |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 4 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [0, 2, 4], "data": { "kind": "values", "values": [] } }, |
| "w": { "dtype": "float32", "shape": [1, 16, 4], "data": { "kind": "constant", "value": 0.05 } }, |
| "r": { "dtype": "float32", "shape": [1, 16, 4], "data": { "kind": "constant", "value": 0.01 } }, |
| "b": { "dtype": "float32", "shape": [1, 32], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [0, 1, 2, 4], "data": { "kind": "values", "values": [] }, "tolerance": 0 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 4], "data": { "kind": "constant", "value": 0.0 }, "tolerance": 0 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 4], "data": { "kind": "constant", "value": 0.0 }, "tolerance": 0 } |
| } |
| }, |
| { |
| "name": "layout1_batch_major", |
| "provenance": { |
| "source": "ONNX LSTM-22 layout semantics and ONNX Runtime CPU layout-0 transpose equivalence", |
| "notes": "Exercises batch-major LSTM with batch=2 and sequence length 2. Inline expectations were generated by transposing X to layout 0, running ORT CPU, and transposing Y, Y_h, and Y_c back according to the ONNX layout contract." |
| }, |
| "attrs": { "layout": 1, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 2, 1], "data": { "kind": "values", "values": [1.0, 2.0, 10.0, 20.0] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.4, -0.3, 0.2, 0.15] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [-0.2, 0.5, 0.35, -0.25] } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 2, 1, 1], |
| "data": { |
| "kind": "values", |
| "values": [0.03783218935132027, 0.08724085241556168, 0.03371192514896393, 0.0023973260540515184] |
| }, |
| "tolerance": 0.000001 |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [2, 1, 1], |
| "data": { "kind": "values", "values": [0.08724085241556168, 0.0023973260540515184] }, |
| "tolerance": 0.000001 |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [2, 1, 1], |
| "data": { "kind": "values", "values": [0.2481994330883026, 1.8676997423171997] }, |
| "tolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "fast_seqlens_postmask_short_prefix_h4", |
| "provenance": { |
| "notes": "Correctness lock for subgroup recurrence, captured cell history, and the shared sequence mask: the sequence stops after two of four timesteps, so Y has a zero tail while Y_h/Y_c gather timestep one." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 4 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [4, 2, 4], "data": { "kind": "constant", "value": 0.0 } }, |
| "w": { "dtype": "float32", "shape": [1, 16, 4], "data": { "kind": "constant", "value": 0.0 } }, |
| "r": { "dtype": "float32", "shape": [1, 16, 4], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { "dtype": "float32", "shape": [1, 32], "data": { "kind": "constant", "value": 0.1 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [2, 0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [4, 1, 2, 4], |
| "data": { |
| "kind": "values", |
| "values": [0.05943684, 0.05943684, 0.05943684, 0.05943684, 0.0, 0.0, 0.0, 0.0, 0.0916163, 0.0916163, 0.0916163, 0.0916163, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
| }, |
| "tolerance": 0.00001 |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 2, 4], |
| "data": { "kind": "values", "values": [0.0916163, 0.0916163, 0.0916163, 0.0916163, 0.0, 0.0, 0.0, 0.0] }, |
| "tolerance": 0.00001 |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 2, 4], |
| "data": { "kind": "values", "values": [0.16819366, 0.16819366, 0.16819366, 0.16819366, 0.0, 0.0, 0.0, 0.0] }, |
| "tolerance": 0.00001 |
| } |
| } |
| }, |
| { |
| "name": "fast_seqlens_vec4_range_h260", |
| "provenance": { |
| "notes": "Non-exact aligned-row coverage: hidden=260 exercises the range-derived vec4 subgroup width above the 256-element geometry threshold while full sequence lengths retain the sequence-mask and cell-history route." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 260 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.021, "cosStep": 0.033, "scale": 0.1 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1040, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.029, "scale": 0.01 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1040, 260], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.023, "scale": 0.002 } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 2080], "data": { "kind": "constant", "value": 0.01 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [4, 4] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 } |
| } |
| }, |
| { |
| "name": "fast_seqlens_vec4_range_h260_masked_tail", |
| "provenance": { |
| "notes": "Masking sibling of fast_seqlens_vec4_range_h260, whose sequence_lens [4,4] equals seq_length and therefore never masks a step. Here lane 0 stops at 3 and lane 1 at 1, so the post-mask zero-fill of Y and the carried Y_h/Y_c both run at the range-derived vec4 subgroup width. Reference-generated: the TS reference models sequence_lens, so this needs no pinned ORT values." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 260 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.021, "cosStep": 0.033, "scale": 0.1 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 1040, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.029, "scale": 0.01 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 1040, 260], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.023, "scale": 0.002 } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 2080], "data": { "kind": "constant", "value": 0.01 } }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 260], "tolerance": 0.0005, "relTolerance": 0.0001 } |
| } |
| }, |
| { |
| "name": "optional_initial_h_without_sequence_lens", |
| "provenance": { |
| "notes": "Independent optional-input regression: non-zero initial_h is consumed while sequence_lens, initial_c, and P are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [0.6] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_initial_c_without_sequence_lens", |
| "provenance": { |
| "notes": "Independent optional-input regression: non-zero initial_c is consumed while sequence_lens, initial_h, and P are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_initial_h_and_c_without_sequence_lens", |
| "provenance": { |
| "notes": "Independent optional-input regression: both non-zero initial states are consumed while sequence_lens and P are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [0.6] } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_sequence_lens_and_initial_c_without_initial_h", |
| "provenance": { |
| "notes": "Independent optional-input regression: sequence_lens truncates the second step and non-zero initial_c is consumed while initial_h and P are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_without_state_or_sequence_lens", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P is consumed while sequence_lens and both initial states are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_sequence_lens_only", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P and a truncated sequence_lens are consumed while both initial states are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_initial_h_only", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P and initial_h are consumed while sequence_lens and initial_c are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [0.6] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_initial_c_only", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P and initial_c are consumed while sequence_lens and initial_h are absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_sequence_lens_and_initial_h", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P and initial_h plus a truncated sequence_lens are consumed while initial_c is absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [0.6] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_sequence_lens_and_initial_c", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P and initial_c plus a truncated sequence_lens are consumed while initial_h is absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "optional_peephole_with_initial_h_and_c_without_sequence_lens", |
| "provenance": { |
| "notes": "Peephole presence-matrix regression: non-zero P plus both non-zero initial states are consumed while sequence_lens is absent." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "hidden_size": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [0.3, -0.2] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [0.5, -0.4, 0.3, 0.2] } }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 4, 1], |
| "data": { "kind": "values", "values": [0.1, -0.2, 0.25, -0.15] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.05, -0.03, 0.02, 0.01, -0.02, 0.04, -0.01, 0.03] } |
| }, |
| "initial_h": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [0.6] } }, |
| "initial_c": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [-0.35] } }, |
| "p": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.2, -0.35, 0.45] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 1, 1], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "bidirectional_per_direction_activations", |
| "provenance": { |
| "notes": "Hand-authored. ONNX gives a bidirectional LSTM six activations: slots 0-2 drive the forward pass and slots 3-5 the reverse one, and activation_alpha/activation_beta are consumed in activation order across both directions. Upstream has no equivalent: every bidirectional case in onnxruntime/test/providers/cpu/rnn/deep_cpu_lstm_op_test.cc passes the same activation set for both directions, so this axis is unexercised there. Both directions share one weight set and the sequence is a single step, so the two outputs can differ only by their activations; a kernel that reuses the forward activations for the reverse direction returns the forward value twice." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "bidirectional", |
| "hidden_size": 1, |
| "activations": ["Sigmoid", "Tanh", "Tanh", "HardSigmoid", "Relu", "Affine"], |
| "activation_alpha": [0.25, 2], |
| "activation_beta": [0.6, 1] |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [1.0] } }, |
| "w": { |
| "dtype": "float32", |
| "shape": [2, 4, 1], |
| "data": { "kind": "values", "values": [1.0, 2.0, -1.0, 0.5, 1.0, 2.0, -1.0, 0.5] } |
| }, |
| "r": { "dtype": "float32", "shape": [2, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { "dtype": "float32", "shape": [2, 8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.28673727637827107, 1.85] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [2, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.28673727637827107, 1.85] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [2, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.33783471214704114, 0.425] } |
| } |
| } |
| }, |
| { |
| "name": "hidden_size_and_clip_omitted_infer_h1", |
| "provenance": { |
| "source": "ONNX LSTM-22 schema and ONNX Runtime CPU", |
| "notes": "With hidden_size and clip omitted, hidden size is inferred as 1 from W/R, and all four nonzero gate pre-activations remain unclipped." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [2.0] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [1.0, -0.5, 0.25, 0.75] } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.2, -0.3, 0.1, 0.4, 0.1, 0.2, -0.1, 0.3] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.17727155983448029] } |
| }, |
| "y_h": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.17727155983448029] } |
| }, |
| "y_c": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [0.8868306279182434] } |
| } |
| } |
| }, |
| { |
| "name": "hidden_size_omitted_explicit_clip_zero", |
| "provenance": { |
| "source": "ONNX LSTM-22 schema, equations, and ONNX Runtime CPU limit check", |
| "notes": "With hidden size inferred as 1, explicit clip=0 clamps every gate pre-activation to zero; zero initial states therefore produce exact-zero Y, Y_h, and Y_c." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 0, "clip": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1], "data": { "kind": "values", "values": [2.0] } }, |
| "w": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "values", "values": [1.0, -0.5, 0.25, 0.75] } }, |
| "r": { "dtype": "float32", "shape": [1, 4, 1], "data": { "kind": "constant", "value": 0.0 } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 8], |
| "data": { "kind": "values", "values": [0.2, -0.3, 0.1, 0.4, 0.1, 0.2, -0.1, 0.3] } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } }, |
| "y_h": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } }, |
| "y_c": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } } |
| } |
| }, |
| { |
| "name": "general_attr_input_forget_explicit_activations", |
| "provenance": { |
| "notes": "input_forget=1 with explicit activation names exercises coupled input/forget gates on the generic attribute path." |
| }, |
| "attrs": { |
| "layout": 0, |
| "direction": "forward", |
| "input_forget": 1, |
| "hidden_size": 2, |
| "activations": ["Sigmoid", "Tanh", "Tanh"] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.5 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.04, "scale": 0.3 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.06, "scale": 0.3 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.09, "scale": 0.2 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 1, 2, 2], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 2], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 2], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "forward_batch_dispatch_fold_guard_65537_input_forget", |
| "provenance": { |
| "notes": "input_forget=1 on the global forward path checks coupled gates with a 65,537-batch folded dispatch." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 65537, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.0007, "cosStep": 0.0011, "scale": 0.3 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.04, "scale": 0.1 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.06, "scale": 0.1 } |
| }, |
| "b": { "dtype": "float32", "shape": [1, 16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 65537, 2], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 65537, 2], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 65537, 2], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "fast_seqlens_short_prefix_h4_input_forget", |
| "provenance": { |
| "notes": "input_forget=1 on the subgroup GEMV recurrence with sequence lengths. That rung needs an even hidden size and at least four timesteps alongside a sequence_lens input, and no coupled-gate case had ever met all three." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 4 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 2, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17, "scale": 0.4 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 16, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.03, "cosStep": 0.04, "scale": 0.2 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 16, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.06, "scale": 0.2 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.09, "scale": 0.1 } |
| }, |
| "sequence_lens": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 2, 4], "tolerance": 0.00001 }, |
| "y_h": { "dtype": "float32", "shape": [1, 2, 4], "tolerance": 0.00001 }, |
| "y_c": { "dtype": "float32", "shape": [1, 2, 4], "tolerance": 0.00001 } |
| } |
| }, |
| { |
| "name": "forward_hidden2048_multiwg_input_forget", |
| "provenance": { |
| "notes": "input_forget=1 on the packed multi-workgroup recurrence, whose guard demands a hidden size of at least 2048 with input and hidden both multiples of four. That is the only geometry that reaches it, so the coupled forget gate needed a case this large." |
| }, |
| "attrs": { "layout": 0, "direction": "forward", "input_forget": 1, "hidden_size": 2048 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 4, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.2 } |
| }, |
| "w": { |
| "dtype": "float32", |
| "shape": [1, 8192, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.007, "cosStep": 0.019, "scale": 0.02 } |
| }, |
| "r": { |
| "dtype": "float32", |
| "shape": [1, 8192, 2048], |
| "data": { "kind": "fillFloat32", "sinStep": 0.005, "cosStep": 0.017, "scale": 0.01 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 16384], |
| "data": { "kind": "fillFloat32", "sinStep": 0.003, "cosStep": 0.011, "scale": 0.02 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [4, 1, 4, 2048], "tolerance": 0.003 }, |
| "y_h": { "dtype": "float32", "shape": [1, 4, 2048], "tolerance": 0.003 }, |
| "y_c": { "dtype": "float32", "shape": [1, 4, 2048], "tolerance": 0.003 } |
| } |
| } |
| ] |
| } |
|
|