Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
75441f6 verified
Raw
History Blame
56.9 kB
{
"op": "ai.onnx.ScatterElements",
"fixtureArrays": {
"f16_reduction_add_embedding_rows_mixed_duplicates_input_indices": [0, 0, 0, 0, 3, 3, 3, 3, 7, 7, 7, 7, 31, 31, 31, 31]
},
"cases": [
{
"name": "dispatch_cliff_axis0_identity",
"attrs": { "axis": 0, "reduction": "none" },
"inputs": {
"data": { "dtype": "float32", "shape": [16777216], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [16777216],
"data": { "kind": "linspace", "start": 0, "end": 16777215 }
},
"updates": {
"dtype": "float32",
"shape": [16777216],
"data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [16777216], "tolerance": 0 } }
},
{
"name": "axis1",
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [3, 1, 0, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 2],
"data": { "kind": "values", "values": [30.0, 31.0, 40.0, 41.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 4] } }
},
{
"name": "axis2_f16",
"attrs": { "axis": 2 },
"inputs": {
"data": { "dtype": "float16", "shape": [1, 2, 4] },
"indices": { "dtype": "int32", "shape": [1, 2, 2], "data": { "kind": "values", "values": [0, 3, 1, 2] } },
"updates": {
"dtype": "float16",
"shape": [1, 2, 2],
"data": { "kind": "values", "values": [10.0, 11.0, 12.0, 13.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [1, 2, 4] } },
"tolerance": 0.001
},
{
"name": "axis0_reduction_add_subnormal_duplicate_indices_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 flushes denormals to zero in the ALU, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReduction",
"notes": "Duplicate-index add reduction with finite subnormal updates; the accumulated output should remain a nonzero subnormal."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0] } },
"indices": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-40, 1e-40, 2e-40] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [1],
"tolerance": 2e-45,
"data": { "kind": "values", "values": [3.999978440445904e-40] }
}
}
},
{
"name": "axis0_reduction_mul_normal_inputs_subnormal_product_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 flushes denormals to zero in the ALU, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MulReduction",
"notes": "Duplicate-index mul reduction where tiny normal updates produce a finite subnormal product."
},
"attrs": { "axis": 0, "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1e-20, 1e-20] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [1],
"tolerance": 2e-45,
"data": { "kind": "values", "values": [9.99994610111476e-41] }
}
}
},
{
"name": "ort_bool_axis1",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.BoolInputWithAxis",
"notes": "ORT runs this helper for ScatterElements too; ONNX allows bool data and updates."
},
"attrs": { "axis": 1 },
"inputs": {
"data": { "dtype": "bool", "shape": [1, 5], "data": { "kind": "values", "values": [0, 0, 0, 1, 0] } },
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 3] } },
"updates": { "dtype": "bool", "shape": [1, 2], "data": { "kind": "values", "values": [1, 0] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [1, 5],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 1, 0, 0, 0] }
}
}
},
{
"name": "rank5_axis2",
"attrs": { "axis": 2 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 2, 3, 1, 2],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0] }
},
"indices": {
"dtype": "int32",
"shape": [1, 2, 2, 1, 2],
"data": { "kind": "values", "values": [2, 0, 1, 2, 0, 1, 2, 2] }
},
"updates": {
"dtype": "float32",
"shape": [1, 2, 2, 1, 2],
"data": { "kind": "values", "values": [30.0, 31.0, 32.0, 33.0, 40.0, 41.0, 42.0, 43.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 2, 3, 1, 2], "tolerance": 0.000001 } }
},
{
"name": "rank6_axis5",
"attrs": { "axis": -1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 2, 1, 2, 1, 4],
"data": {
"kind": "values",
"values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0, 100.0, 101.0, 102.0, 103.0, 110.0, 111.0, 112.0, 113.0]
}
},
"indices": {
"dtype": "int32",
"shape": [1, 2, 1, 2, 1, 2],
"data": { "kind": "values", "values": [3, 0, 2, 1, 1, 3, 0, 2] }
},
"updates": {
"dtype": "float32",
"shape": [1, 2, 1, 2, 1, 2],
"data": { "kind": "values", "values": [30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 2, 1, 4], "tolerance": 0.000001 } }
},
{
"name": "reduction_add_duplicate_indices",
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0, 100.0, 110.0, 120.0, 130.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 3, 0, 2, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [2.0, 3.0, 4.0, 5.0, 6.0, 7.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.000001 } }
},
{
"name": "reduction_add_subnormal_duplicate_indices_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 flushes denormals to zero in the ALU, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReductionAxis1",
"notes": "Duplicate-index add reduction with finite subnormal updates; two tiny valid updates must accumulate to a nonzero subnormal instead of disappearing."
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [1, 4], "data": { "kind": "values", "values": [1, 1, 3, 3] } },
"updates": {
"dtype": "float32",
"shape": [1, 4],
"data": { "kind": "values", "values": [1e-40, 1e-40, -1e-40, -1e-40] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 4], "tolerance": 1e-44 } }
},
{
"name": "rank6_reduction_add_duplicate_indices",
"attrs": { "axis": -1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 1, 2, 1, 1, 4],
"data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0, 100.0, 110.0, 120.0, 130.0] }
},
"indices": {
"dtype": "int32",
"shape": [1, 1, 2, 1, 1, 3],
"data": { "kind": "values", "values": [1, 1, 3, 0, 2, 2] }
},
"updates": {
"dtype": "float32",
"shape": [1, 1, 2, 1, 1, 3],
"data": { "kind": "values", "values": [2.0, 3.0, 4.0, 5.0, 6.0, 7.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 2, 1, 1, 4], "tolerance": 0.000001 } }
},
{
"name": "reduction_mul_normal_inputs_subnormal_product_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 flushes denormals to zero in the ALU, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MulReductionAxis1",
"notes": "Duplicate-index mul reduction over tiny normal updates produces a finite subnormal product; flushing the intermediate product loses the update."
},
"attrs": { "axis": 1, "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 1.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 1] } },
"updates": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1e-20, 1e-20] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 4], "tolerance": 1e-44 } }
},
{
"name": "ort_reduction_add_axis0",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReduction"
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 2, 0, 2, 1] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 1.1, 1.2, 2.0, 2.1, 2.2] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_add_axis1_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReductionAxis1"
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [9.0, 4.0, 1.0, 7.0, 3.0, 6.0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 4],
"data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1] }
},
"updates": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [2.0, 5.0, 3.0, 6.0, 7.0, 9.0, 8.0, 10.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_mul_axis0",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MulReduction"
},
"attrs": { "axis": 0, "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [-9.0, -4.0, -1.0, -7.0, -3.0, -6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [7.0, 3.0, 6.0, 7.0, 3.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_mul_axis1_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MulReductionAxis1"
},
"attrs": { "axis": 1, "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [9.0, 4.0, 1.0, 7.0, 3.0, 6.0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 4],
"data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1] }
},
"updates": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MaxReduction_Float"
},
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [-9.0, -4.0, -1.0, -7.0, -3.0, -6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 5.0, 3.0, 7.0, 3.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_f16",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MaxReduction_MLFloat16"
},
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [-9.0, -4.0, -1.0, -7.0, -3.0, -6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 5.0, 3.0, 7.0, 3.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.001 } }
},
{
"name": "ort_reduction_min_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MinReduction_Float"
},
"attrs": { "axis": 0, "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [-9.0, -4.0, -1.0, 8.0, -3.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 5.0, 3.0, 7.0, 3.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_min_f16",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MinReduction_MLFloat16"
},
"attrs": { "axis": 0, "reduction": "min" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [-9.0, -4.0, -1.0, 8.0, -3.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 5.0, 3.0, 7.0, 3.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.001 } }
},
{
"name": "ort_int32_negative_indices_axis1",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.int32_t",
"notes": "ScatterElements negative-index behavior adapted from ORT scatter index coverage."
},
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [-1, -3, 0, -2] } },
"updates": {
"dtype": "float32",
"shape": [2, 2],
"data": { "kind": "values", "values": [30.0, 31.0, 40.0, 41.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_negative_indices_last_axis_rank3_f16",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.MLFloat16",
"notes": "ScatterElements negative-index behavior adapted from ORT scatter index coverage."
},
"attrs": { "axis": -1 },
"inputs": {
"data": {
"dtype": "float16",
"shape": [1, 2, 4],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2, 2], "data": { "kind": "values", "values": [-1, 0, -2, -3] } },
"updates": {
"dtype": "float16",
"shape": [1, 2, 2],
"data": { "kind": "values", "values": [30.0, 31.0, 40.0, 41.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [1, 2, 4], "tolerance": 0.001 } }
},
{
"name": "onnx_backend_scatter_elements_with_axis",
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 3] } },
"updates": {
"dtype": "float32",
"shape": [1, 2],
"data": { "kind": "values", "values": [1.100000023841858, 2.0999999046325684] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 5] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_with_axis",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "onnx_backend_scatter_elements_with_duplicate_indices",
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 1] } },
"updates": {
"dtype": "float32",
"shape": [1, 2],
"data": { "kind": "values", "values": [1.100000023841858, 2.0999999046325684] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 5] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_with_duplicate_indices",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "onnx_backend_scatter_elements_with_negative_indices",
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, -3] } },
"updates": {
"dtype": "float32",
"shape": [1, 2],
"data": { "kind": "values", "values": [1.100000023841858, 2.0999999046325684] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 5] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_with_negative_indices",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "onnx_backend_scatter_elements_with_reduction_max",
"attrs": { "axis": 1, "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 1] } },
"updates": {
"dtype": "float32",
"shape": [1, 2],
"data": { "kind": "values", "values": [1.100000023841858, 2.0999999046325684] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 5] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_with_reduction_max",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "onnx_backend_scatter_elements_with_reduction_min",
"attrs": { "axis": 1, "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] }
},
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 1] } },
"updates": {
"dtype": "float32",
"shape": [1, 2],
"data": { "kind": "values", "values": [1.100000023841858, 2.0999999046325684] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 5] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_with_reduction_min",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "onnx_backend_scatter_elements_without_axis",
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 2, 0, 2, 1] } },
"updates": {
"dtype": "float32",
"shape": [2, 3],
"data": {
"kind": "values",
"values": [1.0, 1.100000023841858, 1.2000000476837158, 2.0, 2.0999999046325684, 2.200000047683716]
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatter_elements_without_axis",
"notes": "ONNX int64 tensors use framework int32 slots where representable."
}
},
{
"name": "ort_int32_payload_axis1_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.int32_t",
"notes": "Deterministic projection of ORT's int32 ScatterElements coverage using values above f32's exact integer range."
},
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "int32",
"shape": [2, 3],
"data": { "kind": "values", "values": [16777217, -16777217, 42, 100, 200, -300] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [-1, 0, -2, -1] } },
"updates": {
"dtype": "int32",
"shape": [2, 2],
"data": { "kind": "values", "values": [20000001, -20000001, 30000003, -30000003] }
}
},
"outputs": { "output": { "dtype": "int32", "shape": [2, 3] } }
},
{
"name": "ort_int16_axis1_replacement",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.int16_t",
"notes": "Deterministic axis-1 replacement adapted from ORT's randomized int16 ScatterElements coverage."
},
"attrs": { "axis": 1 },
"inputs": {
"data": { "dtype": "int16", "shape": [2, 2], "data": { "kind": "values", "values": [0, 1, 2, 3] } },
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 0, 0, 1] } },
"updates": { "dtype": "int16", "shape": [2, 2], "data": { "kind": "values", "values": [9, 8, 7, 6] } }
},
"outputs": { "output": { "dtype": "int16", "shape": [2, 2], "tolerance": 0 } }
},
{
"name": "ort_bool_axis1_replacement",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "Scatter.BoolInputWithAxis",
"notes": "ORT uses int64 indices; this framework stores representable indices as int32."
},
"attrs": { "axis": 1 },
"inputs": {
"data": { "dtype": "bool", "shape": [1, 5], "data": { "kind": "values", "values": [0, 0, 0, 1, 0] } },
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 3] } },
"updates": { "dtype": "bool", "shape": [1, 2], "data": { "kind": "values", "values": [1, 0] } }
},
"outputs": {
"output": { "dtype": "bool", "shape": [1, 5], "data": { "kind": "values", "values": [0, 1, 0, 0, 0] } }
}
},
{
"name": "empty_updates_axis1_noop",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_empty_indices",
"notes": "Analogous ScatterElements no-op case: empty indices and updates leave data unchanged."
},
"attrs": { "axis": 1 },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 0], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3] } }
},
{
"name": "empty_updates_reduction_add_noop",
"provenance": {
"notes": "The reduction route computes an axis stride and an updates-per-column count from the updates shape, and both floor at one so a zero extent cannot divide by zero. The existing empty-updates case leaves reduction unset, which selects the plain scatter instead, so neither floor had ever been reached."
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 }
},
"indices": { "dtype": "int32", "shape": [2, 0, 0], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [2, 0, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } }
},
{
"name": "int32_reduction_add_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReduction",
"notes": "Integer projection of ORT's add-reduction coverage using values above f32's exact integer range."
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": { "dtype": "int32", "shape": [1, 3], "data": { "kind": "values", "values": [0, 0, 0] } },
"indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [1, 1] } },
"updates": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [16777217, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [1, 3] } }
},
{
"name": "int32_reduction_min_duplicate_indices_negative",
"attrs": { "axis": 0, "reduction": "min" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, 4, 10] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, -7, 3] } } }
},
{
"name": "int32_reduction_max_duplicate_indices",
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, 4, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, -7, 3] } } }
},
{
"name": "int32_reduction_mul_duplicate_indices",
"attrs": { "axis": 0, "reduction": "mul" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [2, 3, -1] } },
"indices": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [3, 5, -4] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [30, 3, 4] } } }
},
{
"name": "reduction_add_f32_high_contention_2048",
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [2048], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [2048], "data": { "kind": "constant", "value": 0.25 } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [512.5, 0.0, 0.0, 0.0] },
"tolerance": 0.000001
}
}
},
{
"name": "reduction_min_f32_high_contention_2048",
"attrs": { "axis": 0, "reduction": "min" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1000.0, -3.0] } },
"indices": { "dtype": "int32", "shape": [2048], "data": { "kind": "constant", "value": 0 } },
"updates": {
"dtype": "float32",
"shape": [2048],
"data": { "kind": "cycle", "values": [9.0, 4.0, 7.0, 2.5, 8.0] }
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "values", "values": [2.5, -3.0] },
"tolerance": 0.000001
}
}
},
{
"name": "reduction_max_axis1_duplicate_indices_atomic",
"attrs": { "axis": 1, "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 0, 2, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 2],
"data": { "kind": "values", "values": [9.0, -1.0, 5.0, 8.0] }
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [9.0, 2.0, 3.0, 4.0, 5.0, 8.0] },
"tolerance": 0.000001
}
}
},
{
"name": "ort_reduction_add_axis1_negative_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReductionAxis1",
"notes": "Same duplicate-axis add reduction as ORT, with signed negative indices that normalize to axis position 1."
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [9.0, 4.0, 1.0, 7.0, 3.0, 6.0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 4],
"data": { "kind": "values", "values": [-2, -2, -2, -2, -2, -2, -2, -2] }
},
"updates": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [2.0, 5.0, 3.0, 6.0, 7.0, 9.0, 8.0, 10.0] }
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [9.0, 20.0, 1.0, 7.0, 37.0, 6.0] }
}
}
},
{
"name": "f16_reduction_add_axis0_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReduction",
"notes": "f16 add reduction exercises the f32-upcast read-modify-write branch in scatter-elements-reduction.wgsl.jinja (reduction_slice; f16 is excluded from the atomic path). Duplicate axis indices accumulate into the same output row more than once. Normal-magnitude values so no FTZ flush; ORT supports MLFloat16 reductions (see ort_reduction_min_f16/max_f16)."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [0.5, 1.5, 2.5, 0.25, 0.75, 1.25] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_mul_axis1_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MulReductionAxis1",
"notes": "f16 mul reduction exercises the f32-upcast multiply branch in reduction_slice (untested before: only f16 min/max were covered). Duplicate axis indices multiply into the same output cell repeatedly. Normal-magnitude products (no subnormal, no FTZ); ORT supports MLFloat16 reductions."
},
"attrs": { "axis": 1, "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [2, 4],
"data": { "kind": "values", "values": [1.0, 2.0, 1.0, 1.0, 1.0, 3.0, 1.0, 1.0] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] } },
"updates": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [2.0, 1.5, 0.5, 4.0, 0.25, 2.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_min_axis1_negative_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.MinReduction_MLFloat16",
"notes": "f16 min reduction with signed negative indices that normalize to the same axis-1 column, exercising the reduction-slice index-normalization path together with the f16 min branch. ORT supports MLFloat16 reductions."
},
"attrs": { "axis": 1, "reduction": "min" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [5.0, 5.0, 5.0, -1.0, -1.0, -1.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [-2, -2, -1, -1] } },
"updates": {
"dtype": "float16",
"shape": [2, 2],
"data": { "kind": "values", "values": [3.0, -4.0, 2.0, -6.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.01 } }
},
{
"name": "int32_reduction_add_axis0_contended_native_atomic",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc",
"test": "ScatterElements.AddReduction",
"notes": "int32 add reduction routes to reduction_atomic (native atomicAdd, non-spinning, unlike the f32 CAS-bitcast path) and was correctness-tested only on tiny shapes. Many duplicate indices into a single slot exercise concurrent native i32 atomicAdd across workgroups; exact integer accumulation (no float rounding)."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [10, 0, 0, 0] } },
"indices": { "dtype": "int32", "shape": [512], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "int32", "shape": [512], "data": { "kind": "constant", "value": 3 } }
},
"outputs": {
"output": {
"dtype": "int32",
"shape": [4],
"data": { "kind": "values", "values": [1546, 0, 0, 0] },
"tolerance": 0
}
}
},
{
"name": "f16_reduction_mul_rank1_axis0_all_same_slot",
"attrs": { "axis": 0, "reduction": "mul" },
"inputs": {
"data": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [2.0, 1.0, 1.0] } },
"indices": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [0, 0, 0, 0] } },
"updates": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [3.0, 0.5, 2.0, 1.5] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [3], "tolerance": 0.1 } }
},
{
"name": "f16_reduction_add_rank1_axis0_mixed_slots",
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0] } },
"indices": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [0, 2, 0, 3, 1, 2] } },
"updates": {
"dtype": "float16",
"shape": [6],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [4], "tolerance": 0.1 } }
},
{
"name": "f32_reduction_max_high_contention_all_same_slot_exact",
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [-100.0, 5.0] } },
"indices": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0] } },
"updates": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [-50.0, -20.0, -75.0, -10.0, -30.0, -5.0] }
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "values", "values": [-5.0, 5.0] },
"tolerance": 0.000001
}
}
},
{
"name": "int32_reduction_add_rank6_axis5_negative_indices",
"attrs": { "axis": -1, "reduction": "add" },
"inputs": {
"data": {
"dtype": "int32",
"shape": [1, 1, 1, 1, 2, 4],
"data": { "kind": "values", "values": [0, 10, 20, 30, 100, 110, 120, 130] }
},
"indices": {
"dtype": "int32",
"shape": [1, 1, 1, 1, 2, 3],
"data": { "kind": "values", "values": [-1, -3, -4, -2, -4, -2] }
},
"updates": {
"dtype": "int32",
"shape": [1, 1, 1, 1, 2, 3],
"data": { "kind": "values", "values": [5, 7, 3, 9, 2, 6] }
}
},
"outputs": { "output": { "dtype": "int32", "shape": [1, 1, 1, 1, 2, 4] } }
},
{
"name": "f16_reduction_add_embedding_rows_mixed_duplicates",
"provenance": {
"notes": "Compact correctness lock for f16 embedding-gradient accumulation: repeated row indices collide independently in each hidden-width column."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [32, 4], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [1024, 4],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/f16_reduction_add_embedding_rows_mixed_duplicates_input_indices" }
}
},
"updates": {
"dtype": "float16",
"shape": [1024, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17, "scale": 0.25 }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [32, 4], "tolerance": 0.25, "relTolerance": 0.02 } }
},
{
"name": "f16_reduction_add_embedding_rows_mixed_duplicates_offset_scale_lock",
"provenance": {
"notes": "Scale lock for axis-0 f16 reduction-add through atomic f32 scratch. Rows 0, 3, 7, and 31 each receive 256 updates offset around +0.005, preventing zero-mean cancellation without changing the shape, index pattern, or route. Tolerance covers per-add f16 rounding in the reference versus one final f16 rounding after f32 scratch accumulation."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [32, 4], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [1024, 4],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/f16_reduction_add_embedding_rows_mixed_duplicates_input_indices" }
}
},
"updates": {
"dtype": "float16",
"shape": [1024, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17, "scale": 0.25, "offset": 0.005 }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [32, 4], "tolerance": 0.015, "relTolerance": 0.005 } }
},
{
"name": "f32_reduction_add_axis0_histogram_mixed_bins_exact",
"provenance": {
"notes": "Compact route lock for the coalesced rank-2 axis-0 histogram. Every column has 1024 colliding updates, columns select different axis bins, and power-of-two increments make the expected f32 result exact regardless of atomic order."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4, 32], "data": { "kind": "constant", "value": 1.0 } },
"indices": { "dtype": "int32", "shape": [1024, 32], "data": { "kind": "cycle", "values": [0, 1, 2, 3] } },
"updates": { "dtype": "float32", "shape": [1024, 32], "data": { "kind": "constant", "value": 0.25 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 32], "tolerance": 0 } }
},
{
"name": "f32_reduction_add_axis0_histogram_signed_tail_exact",
"provenance": {
"notes": "Tail-column route lock: 35 columns require a partial second 32-column tile, while signed -1 indices normalize to the final axis bin. Exact power-of-two updates also validate that untouched data rows are copied by histogram initialization."
},
"attrs": { "axis": -2, "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [5, 35], "data": { "kind": "constant", "value": -2.0 } },
"indices": { "dtype": "int32", "shape": [1024, 35], "data": { "kind": "constant", "value": -1 } },
"updates": { "dtype": "float32", "shape": [1024, 35], "data": { "kind": "constant", "value": 0.125 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [5, 35], "tolerance": 0 } }
},
{
"name": "f16_reduction_add_axis1_outer257_atomic_f32_route",
"provenance": {
"notes": "Correctness lock for the generalized f16 scratch-atomic route: 257 independent rows cross the former <=256 non-axis-column guard, while 1024 duplicate indices per row validate collision-safe accumulation."
},
"attrs": { "axis": 1, "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [257, 1024], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [257, 1024], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float16", "shape": [257, 1024], "data": { "kind": "constant", "value": 0.25 } }
},
"outputs": { "output": { "dtype": "float16", "shape": [257, 1024], "tolerance": 0 } }
},
{
"name": "rank7_last_axis",
"attrs": { "axis": 6, "reduction": "none" },
"inputs": {
"data": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 4], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [2, 1, 2, 1, 2, 1, 3],
"data": { "kind": "cycle", "values": [3, 1, 0] }
},
"updates": {
"dtype": "float32",
"shape": [2, 1, 2, 1, 2, 1, 3],
"data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 4], "tolerance": 0 } }
},
{
"name": "rank8_last_axis",
"attrs": { "axis": 7, "reduction": "none" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 1, 2, 1, 2, 1, 2, 4],
"data": { "kind": "linspace", "start": 1.0, "end": 64.0 }
},
"indices": {
"dtype": "int32",
"shape": [2, 1, 2, 1, 2, 1, 2, 3],
"data": { "kind": "cycle", "values": [0, 2, 3] }
},
"updates": {
"dtype": "float32",
"shape": [2, 1, 2, 1, 2, 1, 2, 3],
"data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 2, 4], "tolerance": 0 } }
},
{
"name": "ort_uint32_axis0_replacement",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Covers standard UINT32 payload storage on the replacement route."
},
"attrs": { "axis": 0 },
"inputs": {
"data": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [2, 0] } },
"updates": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [9, 8] } }
},
"outputs": {
"output": { "dtype": "uint32", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [8, 2, 9] } }
}
},
{
"name": "ort_uint32_reduction_add_wrap32",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate updates prove native u32 atomic addition wraps modulo 2^32."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4294967290, 7] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [10, 10] } }
},
"outputs": {
"output": { "dtype": "uint32", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [14, 7] } }
}
},
{
"name": "ort_int8_reduction_add_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate signed updates must narrow after addition instead of leaking the physical i32 sum."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [120, -7] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [10, 10] } }
},
"outputs": {
"output": { "dtype": "int8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [-116, -7] } }
}
},
{
"name": "ort_uint8_reduction_mul_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate unsigned updates must narrow after multiplication instead of leaking the physical u32 product."
},
"attrs": { "axis": 0, "reduction": "mul" },
"inputs": {
"data": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [200, 7] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [20, 20] } }
},
"outputs": {
"output": { "dtype": "uint8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [128, 7] } }
}
},
{
"name": "ort_int16_reduction_add_wrap16",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate signed updates lock 16-bit two's-complement narrowing on the serial reduction route."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [32760, -7] } },
"indices": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [10, 10] } }
},
"outputs": {
"output": {
"dtype": "int16",
"shape": [2],
"tolerance": 0,
"data": { "kind": "values", "values": [-32756, -7] }
}
}
},
{
"name": "int8_reduction_add_high_contention_wrap",
"provenance": {
"notes": "3000 updates over 4 slots, every slot wrapping several times. The parallel narrow-int route reduces on the raw two's-complement bits and narrows once at the end; this pins that against the reference's narrow-every-step arithmetic at a contention level the two-update ORT fixtures cannot reach. Index and update cycles share a period so each slot's total is distinct, which also catches a mispaired index/update lane."
},
"attrs": { "axis": 0, "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [7, -100, 0, 3] } },
"indices": { "dtype": "int32", "shape": [3000], "data": { "kind": "cycle", "values": [0, 1, 2, 3] } },
"updates": { "dtype": "int8", "shape": [3000], "data": { "kind": "cycle", "values": [5, -3, 1, 2] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [4], "tolerance": 0 } }
},
{
"name": "int8_reduction_min_duplicate_indices",
"provenance": {
"notes": "Signed narrow min reduces through a native atomicMin on the i32-widened output. The update cycle length shares a factor with the index cycle so each slot sees a disjoint half of the values and the two slots reduce to different results, which a mispaired index/update lane would not reproduce; one slot is left untouched by any update."
},
"attrs": { "axis": 0, "reduction": "min" },
"inputs": {
"data": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [100, -5, 42] } },
"indices": { "dtype": "int32", "shape": [512], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "int8", "shape": [512], "data": { "kind": "cycle", "values": [9, -128, 7, 3] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [3], "tolerance": 0 } }
},
{
"name": "uint8_reduction_max_duplicate_indices",
"provenance": {
"notes": "Unsigned narrow max reduces through a native atomicMax on the u32-widened output. Each slot sees a disjoint half of the update cycle, so the two slots reduce to different results and one of them is decided by the data rather than by an update."
},
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [0, 200, 17] } },
"indices": { "dtype": "int32", "shape": [512], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "uint8", "shape": [512], "data": { "kind": "cycle", "values": [3, 255, 9, 1] } }
},
"outputs": { "output": { "dtype": "uint8", "shape": [3], "tolerance": 0 } }
},
{
"name": "int16_reduction_max_duplicate_indices",
"provenance": {
"notes": "16-bit signed max over the same i32-widened atomic path as int8, at values no 8-bit fixture can represent."
},
"attrs": { "axis": 0, "reduction": "max" },
"inputs": {
"data": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [-30000, 1, -7] } },
"indices": { "dtype": "int32", "shape": [512], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "int16", "shape": [512], "data": { "kind": "cycle", "values": [-20000, 32767, -1, 5] } }
},
"outputs": { "output": { "dtype": "int16", "shape": [3], "tolerance": 0 } }
}
]
}