File size: 20,019 Bytes
cadd417 | 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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | {
"op": "ai.onnx.Range",
"cases": [
{
"name": "dispatch_cliff_i32_16777216",
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [0] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16777216] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [16777216], "tolerance": 0 } }
},
{
"name": "f32_positive",
"provenance": {
"notes": "Range-27 defines stash_type only for float16/bfloat16 accumulation, so the non-default FLOAT16 code has no effect on this float32 route."
},
"attrs": { "stash_type": 10 },
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.5] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [6.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.5] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3] } }
},
{
"name": "i32_scalar_inputs_positive_delta",
"provenance": {
"notes": "Covers a positive integer step whose interval length is exactly divisible by the step."
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [4] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [10] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3] } }
},
{
"name": "f32_true_scalar_inputs",
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-1.5] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } }
},
{
"name": "f32_negative_delta",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_NegativeDelta_0"
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-8.1] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-2.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [6], "tolerance": 0.000001 } }
},
{
"name": "f32_negative_delta_empty",
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [9.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-2.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "f32_same_start_limit_empty",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_SameStartAndLimit"
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "f32_almost_same_high_delta_one_value",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.AlmostSameStartAndLimitHighDelta"
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.01] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1000000.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1], "tolerance": 0 } }
},
{
"name": "f32_subnormal_positive_delta_length_rounding_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: Metal FTZ: subnormal f32 start/limit/delta (1e-40) flush to zero on GPU, so the generated range collapses to zeros instead of the subnormal sequence (tolerance 2e-45)."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_Delta_NonDefault",
"notes": "Valid float32 denormal-step edge: ORT computes length from rounded f32 inputs, producing five values for [0, 4e-40) at delta 1e-40."
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [4e-40] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1e-40] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [5],
"tolerance": 2e-45,
"data": {
"kind": "values",
"values": [0.0, 9.99994610111476e-41, 1.999989220222952e-40, 2.999983830334428e-40, 3.999978440445904e-40]
}
}
}
},
{
"name": "f32_subnormal_negative_delta_length_rounding_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: Metal FTZ: subnormal f32 start/limit/delta (1e-40) flush to zero on GPU, so the generated range collapses to zeros instead of the subnormal sequence (tolerance 2e-45)."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_NegativeDelta_0",
"notes": "Negative denormal-step companion; the output shape and values follow ORT's rounded float32 Range semantics."
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-4e-40] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-1e-40] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [5],
"tolerance": 2e-45,
"data": {
"kind": "values",
"values": [0.0, -9.99994610111476e-41, -1.999989220222952e-40, -2.999983830334428e-40, -3.999978440445904e-40]
}
}
}
},
{
"name": "f32_subnormal_positive_delta_shifted_start_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: Metal FTZ: subnormal f32 start/limit/delta (1e-40) flush to zero on GPU, so the generated range collapses to zeros instead of the subnormal sequence (tolerance 2e-45)."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_Delta_NonDefault",
"notes": "Shifted-start companion to the denormal-step Range edge: every output value is a valid positive subnormal, including the first element."
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1e-40] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [5e-40] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1e-40] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [5], "tolerance": 2e-45 } }
},
{
"name": "f32_subnormal_negative_delta_shifted_start_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: Metal FTZ: subnormal f32 start/limit/delta (1e-40) flush to zero on GPU, so the generated range collapses to zeros instead of the subnormal sequence (tolerance 2e-45)."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_NegativeDelta_0",
"notes": "Negative shifted-start companion: the generated sequence should preserve finite negative subnormal values instead of flushing the range to zeros."
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-1e-40] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-5e-40] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-1e-40] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [5], "tolerance": 2e-45 } }
},
{
"name": "ort_f32_delta_default_style",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Float_DeltaDefault"
},
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [5.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [5], "tolerance": 0 } }
},
{
"name": "ort_i32_delta_default_style",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int32_DeltaDefault"
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [0] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [5] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [5], "tolerance": 0 } }
},
{
"name": "ort_i32_delta_nondefault_even",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int32_Delta_NonDefault"
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [0] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [10] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [5], "tolerance": 0 } }
},
{
"name": "ort_i32_delta_nondefault_odd_limit",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int64_Delta_NonDefault_0",
"notes": "Native int32 projection of ORT's int64 odd-limit nondefault-delta case."
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [0] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [9] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [5], "tolerance": 0 } }
},
{
"name": "ort_i32_delta_nondefault_one_value",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int64_Delta_NonDefault_1",
"notes": "Native int32 projection of ORT's int64 one-value nondefault-delta case."
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [1], "tolerance": 0 } }
},
{
"name": "ort_i32_negative_delta",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int32_NegativeDelta_0"
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-9] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [6], "tolerance": 0 } }
},
{
"name": "ort_i32_negative_delta_empty",
"provenance": {
"source": "onnxruntime/test/providers/cpu/generator/range_test.cc",
"test": "RangeTest.Int32_NegativeDelta_1"
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [9] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-2] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [0], "tolerance": 0 } }
},
{
"name": "i32_exact_above_float24_no_f32_cast",
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16777217] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16777221] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [4], "tolerance": 0 } }
},
{
"name": "onnx_backend_range_float_type_positive_delta",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_range_float_type_positive_delta" },
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [5.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2], "tolerance": 0 } }
},
{
"name": "onnx_backend_range_int32_type_negative_delta",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_range_int32_type_negative_delta" },
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [10] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [6] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-3] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [2], "tolerance": 0 } }
},
{
"name": "f32_2dfold_dispatch_16777216",
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [16777216.0] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [16777216], "tolerance": 0 } }
},
{
"name": "f32_fractional_delta_nonmult4_len1027",
"inputs": {
"start": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"limit": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [256.75] } },
"delta": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1027], "tolerance": 0 } }
},
{
"name": "i32_negative_start_positive_delta_len8",
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-3] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [5] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [8], "tolerance": 0 } }
},
{
"name": "i32_negative_start_negative_delta_descending",
"provenance": {
"notes": "Negative start with negative delta produces a descending negative sequence [-5,-8,-11,-14,-17]; exercises start + i32(i)*delta with a negative base and negative step, a sign combination not covered by existing negative-delta cases (which start positive)."
},
"inputs": {
"start": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-5] } },
"limit": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-20] } },
"delta": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-3] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [5], "tolerance": 0 } }
},
{
"name": "onnx27_f16_stash_float32_vec4",
"provenance": {
"source": "ONNX Operators.md Range-27",
"notes": "Pins the float16 type and explicit float32 stash semantics added by Range-27 on the vec4 output route."
},
"attrs": { "stash_type": 1 },
"inputs": {
"start": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [2048.0] } },
"limit": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [2052.0] } },
"delta": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [1.0] } }
},
"outputs": {
"output": {
"dtype": "float16",
"shape": [4],
"data": { "kind": "values", "values": [2048.0, 2048.0, 2050.0, 2052.0] },
"tolerance": 0
}
}
},
{
"name": "onnx27_f16_stash_float32_scalar_tail",
"provenance": {
"source": "ONNX Operators.md Range-27",
"notes": "Non-multiple-of-four companion which pins float32 accumulation followed by a float16 cast on the scalar-tail route."
},
"attrs": { "stash_type": 1 },
"inputs": {
"start": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [-1.5] } },
"limit": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [0.0] } },
"delta": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [0.5] } }
},
"outputs": {
"output": {
"dtype": "float16",
"shape": [3],
"data": { "kind": "values", "values": [-1.5, -1.0, -0.5] },
"tolerance": 0
}
}
}
]
}
|