File size: 11,316 Bytes
7dcaa8d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | {
"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 } }
}
]
}
|