{ "op": "com.microsoft.BiasGelu", "cases": [ { "name": "dispatch_cliff_vec4_f32", "requires": { "limits": { "maxBufferSize": 268435488, "maxStorageBufferBindingSize": 268435488 } }, "provenance": { "notes": "Its largest tensor is 268435488 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": { "A": { "dtype": "float32", "shape": [8388609, 8], "data": { "kind": "linspace", "start": -2.0, "end": 2.0 } }, "B": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [0.25, -0.25, 0.5, -0.5, 0.1, -0.1, 0.0, 1.0] } } }, "outputs": { "C": { "dtype": "float32", "shape": [8388609, 8], "tolerance": 0.0001 } } }, { "name": "ort_float32_rank2_bias_vector", "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "Small deterministic rank-2 instance of ORT's bias-vector GELU coverage." }, "inputs": { "A": { "dtype": "float32", "shape": [2, 4], "data": { "kind": "values", "values": [-1.5, -0.5, 0.5, 1.5, 2.0, -2.0, 0.25, -0.25] } }, "B": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.25, -0.25, 0.5, -0.5] } } }, "outputs": { "C": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.000001, "data": { "kind": "values", "values": [-0.13206221, -0.16997051, 0.8413447, 0.8413447, 2.222495, -0.02750505, 0.5800295, -0.16997051] } } } }, { "name": "ort_float16_rank2_bias_vector", "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.MLFloat16", "notes": "Compact deterministic f16 projection of ORT's bias-vector GELU coverage." }, "inputs": { "A": { "dtype": "float16", "shape": [2, 4], "data": { "kind": "values", "values": [-1.5, -0.5, 0.5, 1.5, 2.0, -2.0, 0.25, -0.25] } }, "B": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.25, -0.25, 0.5, -0.5] } } }, "outputs": { "C": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.001, "data": { "kind": "values", "values": [-0.1320623, -0.16997046, 0.8413447, 0.8413447, 2.222495, -0.02750498, 0.58002954, -0.16997046] } } } }, { "name": "ort_float32_rank3_bias_vector", "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "Small deterministic rank-3 instance of ORT's bias-vector GELU coverage." }, "inputs": { "A": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [-1.0, 0.0, 1.0, 2.0, -2.0, 0.5, -0.5, 0.25, -0.25, 3.0, -3.0, 0.0] } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.5, -0.5, 0.25] } } }, "outputs": { "C": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001, "data": { "kind": "values", "values": [-0.15426877, -0.15426877, 1.1179378, 2.4844761, -0.015524104, 0.58002949, 0.0, -0.10032342, 0.0, 3.4991858, -0.00081422925, 0.14967658] } } } }, { "name": "ort_float32_rank4_bias_vector", "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "Small deterministic rank-4 instance of ORT's bias-vector GELU coverage." }, "inputs": { "A": { "dtype": "float32", "shape": [1, 2, 2, 3], "data": { "kind": "values", "values": [-1.0, 0.0, 1.0, 2.0, -2.0, 0.5, -0.5, 0.25, -0.25, 3.0, -3.0, 0.0] } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.25, -0.25, 0.5] } } }, "outputs": { "C": { "dtype": "float32", "shape": [1, 2, 2, 3], "tolerance": 0.000001, "data": { "kind": "values", "values": [-0.16997051, -0.10032342, 1.3997892, 2.2224948, -0.027505063, 0.8413447, -0.10032342, 0.0, 0.14967658, 3.2481246, -0.0018753314, 0.34573123] } } } }, { "name": "ort_float32_empty_middle_dim", "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "Additional edge: empty tensors should preserve shape and produce no values." }, "inputs": { "A": { "dtype": "float32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } }, "B": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.25, -0.25, 0.5, -0.5] } } }, "outputs": { "C": { "dtype": "float32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } } } }, { "name": "empty_zero_hidden", "provenance": { "notes": "Zero-length last (bias-broadcast) axis: the bias vector itself is empty, so no kernel may size a binding from the hidden extent." }, "inputs": { "A": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } }, "B": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } }, "outputs": { "C": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } } } }, { "name": "f32_subnormal_linear_region_zero_bias_vec4_gpu_gap", "skipGpu": { "category": "permanent", "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero (f32 and f16); the kernel cannot preserve denormal inputs/outputs bit-exactly." }, "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "BiasGelu with zero bias reduces to exact erf-form GELU; finite subnormal inputs should produce the x/2 linear-region tail through the vec4 bias path." }, "inputs": { "A": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [1e-40, -1e-40, 1e-38, -1e-38] } }, "B": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } } }, "outputs": { "C": { "dtype": "float32", "shape": [1, 4], "tolerance": 2e-45, "data": { "kind": "values", "values": [4.99997305055738e-41, -4.99997305055738e-41, 4.999999675228202e-39, -4.999999675228202e-39] } } } }, { "name": "f32_subnormal_linear_region_zero_bias_scalar_gpu_gap", "skipGpu": { "category": "permanent", "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero (f32 and f16); the kernel cannot preserve denormal inputs/outputs bit-exactly." }, "provenance": { "source": "onnxruntime/test/contrib_ops/element_wise_ops_test.cc", "test": "BiasGeluTest.Float", "notes": "Scalar-path companion for BiasGelu subnormal linear-region behavior with zero bias." }, "inputs": { "A": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1e-40, -1e-40, 1e-38] } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.0, 0.0, 0.0] } } }, "outputs": { "C": { "dtype": "float32", "shape": [1, 3], "tolerance": 2e-45, "data": { "kind": "values", "values": [4.99997305055738e-41, -4.99997305055738e-41, 4.999999675228202e-39] } } } }, { "name": "scalar_dispatch_cliff_2d_fold", "inputs": { "A": { "dtype": "float32", "shape": [8388609, 3], "data": { "kind": "linspace", "start": -2.0, "end": 2.0 } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.1, -0.1, 0.3] } } }, "outputs": { "C": { "dtype": "float32", "shape": [8388609, 3], "tolerance": 0.0001 } } }, { "name": "scalar_rank1_odd_hidden_bias_broadcast", "inputs": { "A": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.5, -1.5, 0.7] } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.2, -0.2, 0.3] } } }, "outputs": { "C": { "dtype": "float32", "shape": [3], "tolerance": 0.000001, "data": { "kind": "values", "values": [1.62423876, -0.07576124, 0.84134474] } } } }, { "name": "scalar_numel_div4_but_last_dim_not", "inputs": { "A": { "dtype": "float32", "shape": [4, 3], "data": { "kind": "values", "values": [-1.0, 0.5, 2.0, 1.5, -0.5, -1.5, 0.0, 1.0, -2.0, 0.25, -0.25, 0.75] } }, "B": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.2, -0.3, 0.1] } } }, "outputs": { "C": { "dtype": "float32", "shape": [4, 3], "tolerance": 0.000001 } } } ] }