{ "op": "com.microsoft.BiasSplitGelu", "cases": [ { "name": "dispatch_cliff_vec4_over_16M", "requires": { "limits": { "maxBufferSize": 536862752, "maxStorageBufferBindingSize": 536862752 } }, "provenance": { "notes": "Its largest tensor is 536862752 bytes, so the case needs an adapter whose maxBufferSize and maxStorageBufferBindingSize both reach it — declared, because the WebGPU guaranteed minimums (256 MiB / 128 MiB) do not, and a device at them must report the case inapplicable rather than fail allocating it." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 16776961, 8], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } }, "bias": { "dtype": "float32", "shape": [8], "data": { "kind": "linspace", "start": -0.5, "end": 0.5 } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 16776961, 4], "tolerance": 0.0001 } } }, { "name": "ort_split_last_dim_then_gelu_gate", "provenance": { "source": "onnxruntime/test/contrib_ops/bias_split_gelu_op_test.cc", "test": "BiasSplitGeluTest.BiasSplitGeluTest_HiddenSize_2560", "notes": "Small deterministic projection of ORT's fused bias+split+Gelu gate pattern." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 2, 4], "data": { "kind": "values", "values": [1.0, 2.0, 0.0, 1.0, -1.0, 0.5, 2.0, -2.0] } }, "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, -0.5, 1.0, -1.0] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 2, 2], "tolerance": 0.000001, "relTolerance": 0.000001, "data": { "kind": "values", "values": [1.262017119103, 0.0, -1.497975152953, 0.0] } } } }, { "name": "ort_projection_sequence_len1", "provenance": { "source": "onnxruntime/test/contrib_ops/bias_split_gelu_op_test.cc", "test": "BiasSplitGeluTest.BiasSplitGeluTest_HiddenSize_5120", "notes": "Compact deterministic projection of ORT's batch=2, sequence_length=1 shape coverage." }, "inputs": { "X": { "dtype": "float32", "shape": [2, 1, 6], "data": { "kind": "values", "values": [1.0, -1.0, 0.5, 2.0, -2.0, 0.0, -0.25, 0.75, -1.5, 1.5, 0.25, -0.5] } }, "bias": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [0.25, -0.5, 0.75, -1.0, 0.5, -0.25] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [2, 1, 3], "tolerance": 0.000001, "relTolerance": 0.000001, "data": { "kind": "values", "values": [1.05168092, 0.1503162697, -0.1254042904, 0.0, 0.1450073842, 0.1274778475] } } } }, { "name": "ort_projection_batch1_sequence2", "provenance": { "source": "onnxruntime/test/contrib_ops/bias_split_gelu_op_test.cc", "test": "BiasSplitGeluTest.BiasSplitGeluTest_HiddenSize_10240", "notes": "Compact deterministic projection of ORT's batch=1, sequence_length=2 shape coverage." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 2, 6], "data": { "kind": "values", "values": [1.0, 2.0, -1.0, 0.0, 0.5, -0.5, -2.0, 1.5, 0.25, 2.5, -1.0, 0.0] } }, "bias": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [0.25, -0.5, 0.75, -1.0, 0.5, -0.25] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 2, 3], "tolerance": 0.000001, "relTolerance": 0.000001, "data": { "kind": "values", "values": [-0.1983190798, 1.262017104, 0.04249261584, -2.449631019, -0.1542687686, -0.1003234323] } } } }, { "name": "ort_projection_batch2_sequence3_vec4", "provenance": { "source": "onnxruntime/test/contrib_ops/bias_split_gelu_op_test.cc", "test": "BiasSplitGeluTest.BiasSplitGeluTest_HiddenSize_6144", "notes": "Compact deterministic projection of ORT's batch=2, sequence_length=3 shape coverage with output hidden divisible by 4." }, "inputs": { "X": { "dtype": "float32", "shape": [2, 3, 8], "data": { "kind": "values", "values": [1.0, -1.0, 0.5, -0.5, 2.0, -2.0, 0.25, -0.25, -1.5, 1.5, 0.0, -0.75, 0.75, -0.5, 1.25, -1.25, 3.0, -3.0, 0.5, -0.5, -2.0, 2.0, 1.0, -1.0, 0.0, 1.0, -1.0, 0.5, -0.5, 2.5, -2.5, 1.5, 0.125, -0.125, 4.0, -4.0, 0.75, -0.75, 1.5, -1.5, 2.25, -2.25, 0.333, -0.333, 5.0, -5.0, 1.25, -1.25] } }, "bias": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [0.25, -0.5, 0.75, -1.0, 0.5, -0.25, 1.5, -1.5] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001, "relTolerance": 0.000001, "data": { "kind": "values", "values": [3.1055946350097656, 0.04125746339559555, 2.0998706817626953, 0.10515517741441727, -1.3974220752716064, -0.16997046768665314, 2.05635404586792, 0.014340377412736416, -0.3256852626800537, -5.879637718200684, 3.1055946350097656, 0.023286299780011177, 0.0, 1.1112475395202637, 0.03966381773352623, 0.0, 0.41922664642333984, 0.09915953874588013, 14.23076343536377, 0.020249508321285248, 13.75, 0.0000011001571920132847, 2.9693753719329834, 0.010923270136117935] } } } }, { "name": "split_gelu_d4_vec4_path", "provenance": { "source": "onnxruntime/test/contrib_ops/bias_split_gelu_op_test.cc", "notes": "D=4 (input hidden 8) so the output hidden axis is a multiple of 4 and the vec4 manifest variant is exercised. Expected values from the same erf-form GEGLU gate computed at f64 then f32-rounded." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 1, 8], "data": { "kind": "values", "values": [0.5, -1.0, 2.0, -0.5, 1.5, 0.0, -2.0, 1.0] } }, "bias": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [0.25, 0.5, -0.5, 1.0, -1.0, 0.5, 2.0, -0.25] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 1, 4], "tolerance": 0.000001, "relTolerance": 0.000001, "data": { "kind": "values", "values": [0.2592984235214977, -0.17286561568099845, 0.0, 0.2900147683230033] } } } }, { "name": "empty_zero_dim", "provenance": { "notes": "Zero-length batch axis of X (empty input). ONNX treats empty tensors as first-class; output is the same broadcast shape with the 0 batch ⇒ EMPTY output. bias kept at its normal rank-1 non-zero shape." }, "inputs": { "X": { "dtype": "float32", "shape": [0, 2, 4], "data": { "kind": "values", "values": [] } }, "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, -0.5, 1.0, -1.0] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [0, 2, 2], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "empty_zero_dim_f16", "provenance": { "notes": "f16 variant of the empty zero-batch-axis case." }, "inputs": { "X": { "dtype": "float16", "shape": [0, 2, 4], "data": { "kind": "values", "values": [] } }, "bias": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.5, -0.5, 1.0, -1.0] } } }, "outputs": { "Y": { "dtype": "float16", "shape": [0, 2, 2], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "empty_zero_hidden", "provenance": { "notes": "Zero-length hidden axis: bias stays 2x the (zero) half-width, so both the bias vector and the split halves are empty and no kernel may size a binding from the hidden extent." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 2, 0], "data": { "kind": "values", "values": [] } }, "bias": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "f16_vec4_shader_validation", "provenance": { "notes": "Non-empty f16 D=4 case forces the vec4 variant; the empty f16 case cannot catch shader construction errors because it returns before compiling meaningful lane loads." }, "inputs": { "X": { "dtype": "float16", "shape": [1, 1, 8], "data": { "kind": "values", "values": [0.5, -1.0, 2.0, -0.5, 1.5, 0.0, -2.0, 1.0] } }, "bias": { "dtype": "float16", "shape": [8], "data": { "kind": "values", "values": [0.25, 0.5, -0.5, 1.0, -1.0, 0.5, 2.0, -0.25] } } }, "outputs": { "Y": { "dtype": "float16", "shape": [1, 1, 4], "tolerance": 0.01 } } }, { "name": "scalar_path_dispatch_fold_over_16M", "provenance": { "notes": "D=6 (twice=12, 6%4!=0) forces the scalar variant; numel(Y)=16776966 > 65535*256 forces the scalar-branch 2D dispatch fold (gid.y high bits), an untested path (dispatch_cliff_vec4_over_16M covers only the vec4 branch). Validates the i=gid.x+gid.y*nwg.x*WG reconstruction and i>=count tail guard on the last rows." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 2796161, 12], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } }, "bias": { "dtype": "float32", "shape": [12], "data": { "kind": "linspace", "start": -0.5, "end": 0.5 } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 2796161, 6], "tolerance": 0.0001 } } }, { "name": "scalar_path_odd_hidden_d6", "provenance": { "notes": "twice=12, D=6 (6%4!=0) routes to the scalar variant; small case verifying scalar split-index math (value half [0:6], gate half [6:12]) at a hidden size not covered by existing D=3 scalar cases. Reference supplies truth." }, "inputs": { "X": { "dtype": "float32", "shape": [1, 2, 12], "data": { "kind": "values", "values": [1.0, -1.0, 0.5, -0.5, 2.0, -2.0, 0.25, -0.25, 1.5, -1.5, 0.75, -0.75, -2.0, 2.0, 1.0, -1.0, 0.5, -0.5, 3.0, -3.0, 0.125, -0.125, 0.0, 1.0] } }, "bias": { "dtype": "float32", "shape": [12], "data": { "kind": "values", "values": [0.25, -0.5, 0.75, -1.0, 0.5, -0.25, 1.5, -1.5, 0.1, -0.1, 0.6, -0.6] } } }, "outputs": { "Y": { "dtype": "float32", "shape": [1, 2, 6], "tolerance": 0.000001, "relTolerance": 0.000001 } } } ] }