Xenova's picture
Xenova HF Staff
sync 91d990483a17
e0b7578 verified
Raw
History Blame
61.1 kB
{
"fixtureArrays": {
"scatter_nd_data_4x4x4": [1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8],
"backend_row_slice_updates_input_updates": [5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4],
"ort_reduction_add_slice_duplicates_input_updates": [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144],
"f16_reduction_add_sparse_router_gradient_input_indices": [0, 17, 34, 51, 4, 21, 38, 55, 8, 25, 42, 59, 12, 29, 46, 63, 16, 33, 50, 3, 20, 37, 54, 7, 24, 41, 58, 11, 28, 45, 62, 15, 32, 49, 2, 19, 36, 53, 6, 23, 40, 57, 10, 27, 44, 61, 14, 31, 48, 1, 18, 35, 52, 5, 22, 39, 56, 9, 26, 43, 60, 13, 30, 47]
},
"cases": [
{
"name": "dispatch_cliff_batch0_row_update",
"inputs": {
"data": { "dtype": "float32", "shape": [1, 16777219], "data": { "kind": "constant", "value": 1.0 } },
"indices": { "dtype": "int32", "shape": [1, 1], "data": { "kind": "values", "values": [0] } },
"updates": { "dtype": "float32", "shape": [1, 16777219], "data": { "kind": "constant", "value": 7.0 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 16777219], "tolerance": 0 } }
},
{
"name": "scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 20.0, 21.0, 22.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 2, 2, 1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [99.0, 77.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3] } }
},
{
"name": "row_updates_f16",
"inputs": {
"data": { "dtype": "float16", "shape": [3, 4] },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [2, 0] } },
"updates": {
"dtype": "float16",
"shape": [2, 4],
"data": { "kind": "values", "values": [9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4] } },
"tolerance": 0.001
},
{
"name": "rank5_indices_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0] }
},
"indices": { "dtype": "int32", "shape": [1, 1, 1, 1, 2], "data": { "kind": "values", "values": [1, 2] } },
"updates": { "dtype": "float32", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [99.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "rank6_indices_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 20.0, 21.0, 22.0] }
},
"indices": {
"dtype": "int32",
"shape": [1, 1, 1, 1, 2, 2],
"data": { "kind": "values", "values": [0, 2, 2, 0] }
},
"updates": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 2],
"data": { "kind": "values", "values": [99.0, 77.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "rank6_full_depth_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 2, 1, 2, 1, 3],
"data": {
"kind": "values",
"values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 100.0, 101.0, 102.0, 110.0, 111.0, 112.0]
}
},
"indices": {
"dtype": "int32",
"shape": [2, 6],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [900.0, 901.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 2, 1, 3], "tolerance": 0.000001 } }
},
{
"name": "reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 1, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, 3.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "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_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate-index add reduction with finite subnormal scalar updates; valid tiny updates must accumulate to nonzero subnormal outputs."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [1, 1, 3, 3] } },
"updates": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1e-40, 1e-40, -1e-40, -1e-40] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 1e-44 } }
},
{
"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_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul",
"notes": "Duplicate-index mul reduction where tiny normal updates produce a finite subnormal product."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 1.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [1, 1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1e-20, 1e-20] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 1e-44 } }
},
{
"name": "rank6_indices_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } },
"indices": { "dtype": "int32", "shape": [1, 1, 1, 1, 3, 1], "data": { "kind": "values", "values": [1, 1, 2] } },
"updates": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 3],
"data": { "kind": "values", "values": [2.0, 3.0, 4.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "rank6_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 1, 4],
"data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0] }
},
"indices": {
"dtype": "int32",
"shape": [3, 6],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3] }
},
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, 3.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 4], "tolerance": 0.000001 } }
},
{
"name": "backend_row_slice_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4], "tolerance": 0.000001 } }
},
{
"name": "backend_row_slice_reduction_add_duplicate",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4], "tolerance": 0.000001 } }
},
{
"name": "ort_slice_float_rank2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_slice_float_int64_t"
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.0, 0.1, 0.1, 0.1] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [1, 0] } },
"updates": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.2, 0.3, 0.0, 0.1] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_3tensor_int16_slice_update",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64"
},
"inputs": {
"data": {
"dtype": "int16",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 2, 3, 0, 1, 2, 3] }
},
"indices": { "dtype": "int32", "shape": [1, 1], "data": { "kind": "values", "values": [1] } },
"updates": { "dtype": "int16", "shape": [1, 2, 2], "data": { "kind": "values", "values": [4, 5, 6, 7] } }
},
"outputs": { "output": { "dtype": "int16", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "ort_batched_index_float_adapted",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_index_int64",
"notes": "A float32 payload exercises the batched-index pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 3.0, 2.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0, 0, 0, 1] } },
"updates": { "dtype": "float32", "shape": [2, 1], "data": { "kind": "values", "values": [0.0, 1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_batched_index_bool",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_index_bool_int64"
},
"inputs": {
"data": { "dtype": "bool", "shape": [2, 2], "data": { "kind": "values", "values": [0, 1, 0, 1] } },
"indices": { "dtype": "int32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0, 0, 0, 1] } },
"updates": { "dtype": "bool", "shape": [2, 1], "data": { "kind": "values", "values": [1, 0] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [2, 2],
"data": { "kind": "values", "values": [1, 0, 0, 1] },
"tolerance": 0
}
}
},
{
"name": "ort_sliced_index_float_adapted",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_sliced_index_int64",
"notes": "A float32 payload exercises the sliced-index update pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [1, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 1, 2],
"data": { "kind": "values", "values": [2.0, 3.0, 0.0, 1.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_uint32_batched_index_depth2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_3tensor_int64",
"notes": "A compact uint32 ScatterND case uses batched depth-2 indices."
},
"inputs": {
"data": {
"dtype": "uint32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 0, 0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 1, 0, 0, 0, 1, 1] }
},
"updates": {
"dtype": "uint32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [2, 3, 4, 5, 0, 1, 6, 7] }
}
},
"outputs": { "output": { "dtype": "uint32", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "ort_int8_negative_indices_scalar_updates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "Compact signed-byte scalar-update fixture with negative indices and edge payload values."
},
"inputs": {
"data": {
"dtype": "int8",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 0, 2, 3, 4, 0, 6, 7] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [0, 0, 1, -1, 0, -1] } },
"updates": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-128, 127] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "empty_indices_zero_width_update_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_empty_indices",
"notes": "Valid empty-index ScatterND identity where both the data suffix and update suffix have zero width."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } },
"indices": { "dtype": "int32", "shape": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "empty_indices_zero_width_reduction_add_identity",
"provenance": {
"notes": "An empty index tensor with a zero-width data suffix leaves the input unchanged under add reduction. The slice path must return without dividing by the zero inner width."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } },
"indices": { "dtype": "int32", "shape": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "ort_empty_indices_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_empty_indices"
},
"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": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0 } }
},
{
"name": "ort_reduction_add_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add"
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_mul_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul"
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_min_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_min"
},
"attrs": { "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_max"
},
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_negative_indices_matrix",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_matrice_int64_int64_neg_indices",
"notes": "A float32 payload and int32 indices exercise the negative-index pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 1.0, 2.0, 2.0] } },
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 0, -1, -1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.0, 3.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_negative_indices_slice_update_rank3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "A float32 payload and int32 indices exercise a negative-index slice update."
},
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, -1, -1, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 2],
"data": { "kind": "values", "values": [20.0, 21.0, 30.0, 31.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_mul_rank6_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul_long_shape",
"notes": "A rank-6 tensor with duplicate indices exercises multiply reduction over long slices."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3, 1, 1, 1],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3, 1, 1, 1],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3, 1, 1, 1], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_min_updates_win_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_min",
"notes": "Uses ORT's reduction=min semantics with values chosen so both data and duplicate updates affect the answer."
},
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [5.0, -1.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, -4.0, 10.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_updates_win_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_max",
"notes": "Uses ORT's reduction=max semantics with values chosen so both data and duplicate updates affect the answer."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-5.0, 1.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-2.0, 4.0, 2.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_scatternd",
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_add",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_add",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_max",
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_max",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_min",
"attrs": { "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_min",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_multiply",
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_multiply",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "ort_int32_slice_updates_negative_indices_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "Native int32 projection of ORT's integer slice-update case with negative indices and values above f32's exact integer range."
},
"inputs": {
"data": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [16777217, 1, 2, 3, 4, 5, -16777217, 7] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 1, -1, 0] } },
"updates": {
"dtype": "int32",
"shape": [2, 2],
"data": { "kind": "values", "values": [20000001, -20000001, 30000003, -30000003] }
}
},
"outputs": { "output": { "dtype": "int32", "shape": [2, 2, 2] } }
},
{
"name": "int32_reduction_add_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Integer projection of ORT's add-reduction coverage using values above f32's exact integer range."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [16777217, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [2] } }
},
{
"name": "int32_reduction_min_duplicate_indices_negative",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3, 1], "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": { "reduction": "max" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3, 1], "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": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [2, 3, -1] } },
"indices": { "dtype": "int32", "shape": [3, 1], "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": "uint32_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 2] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 0] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [10, 2] } } }
},
{
"name": "uint32_reduction_min_duplicate_indices",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [8, 1] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [5, 3, 9] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } }
},
{
"name": "uint32_reduction_max_duplicate_indices",
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 7] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [5, 9, 2] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [9, 7] } } }
},
{
"name": "uint32_reduction_mul_duplicate_indices",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 5] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 0] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [72, 5] } } }
},
{
"name": "reduction_add_f32_high_contention_4096",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [4096, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [4096], "data": { "kind": "constant", "value": 0.25 } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1024.5, 0.0, 0.0, 0.0] },
"tolerance": 0.000001
}
}
},
{
"name": "reduction_min_f32_high_contention_2048",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1000.0, -3.0] } },
"indices": { "dtype": "int32", "shape": [2048, 1], "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": "ort_reduction_add_slice_negative_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate signed negative indices normalize to rows 0, 1, and 0 before slice-add reduction."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [-2, -1, -2] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2, 2, 3],
"tolerance": 0.01,
"data": {
"kind": "values",
"values": [8194.1, 16388.1, 32776.1, 65552.1, 131104.1, 262208.1, 128.1, 256.1, 512.1, 1024.1, 2048.1, 4096.1]
}
}
}
},
{
"name": "reduction_mul_f32_high_contention_1024",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [7.0, 2.0] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [1024], "data": { "kind": "constant", "value": 1.0 } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "values", "values": [7.0, 2.0] },
"tolerance": 0.000001
}
}
},
{
"name": "f16_reduction_add_row_slice_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [4, 4],
"data": {
"kind": "values",
"values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": {
"dtype": "float16",
"shape": [3, 4],
"data": {
"kind": "values",
"values": [0.5, 1.5, 2.5, 3.5, 10.0, 20.0, 30.0, 40.0, 100.0, 200.0, 300.0, 400.0]
}
}
},
"outputs": { "output": { "dtype": "float16", "shape": [4, 4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_mul_scalar_updates_duplicate_indices",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [2.0, 1.0, 3.0, 1.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.5, 2.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_max_row_slice_duplicate_indices",
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, -1.0, 0.5, 2.0, -3.0, -3.0, -3.0, -3.0, 0.0, 0.0, 0.0, 0.0] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [0.0, -2.0, 1.5, 1.0, -0.5, 4.0, -1.0, 3.0, -1.0, -2.0, -1.0, -2.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4], "tolerance": 0.001 } }
},
{
"name": "int8_reduction_add_scalar_updates_duplicate_indices_in_range",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate int8 updates accumulate at indices 0 and 2, with every intermediate and final value remaining inside the int8 range."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [10, 0, -20, 0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [5, 7, -30] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [4], "tolerance": 0 } }
},
{
"name": "batch0_non_vec4_aligned_inner_row",
"inputs": {
"data": { "dtype": "float32", "shape": [6, 7], "data": { "kind": "linspace", "start": 0.0, "end": 41.0 } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 4, 5] } },
"updates": {
"dtype": "float32",
"shape": [3, 7],
"data": {
"kind": "values",
"values": [100.0, 101.0, 102.0, 103.0, 104.0, 105.0, 106.0, 200.0, 201.0, 202.0, 203.0, 204.0, 205.0, 206.0, 300.0, 301.0, 302.0, 303.0, 304.0, 305.0, 306.0]
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [6, 7] } }
},
{
"name": "reduction_slice_f16_multi_outer_batch_duplicate_depth2",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 0, 2, 1, 0, 1, 3] }
},
"updates": {
"dtype": "float16",
"shape": [2, 2],
"data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4], "tolerance": 0.1 } }
},
{
"name": "row_fast_vec4_last_row_edge_large_axis_dim",
"inputs": {
"data": { "dtype": "float32", "shape": [65537, 8], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 65536, 32768] } },
"updates": {
"dtype": "float32",
"shape": [3, 8],
"data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [65537, 8] } }
},
{
"name": "reduction_add_single_hot_slot_many_updates",
"provenance": {
"notes": "Many duplicate scalar updates target one output slot and must produce their exact accumulated sum."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0] }
},
"indices": {
"dtype": "int32",
"shape": [16, 1],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }
},
"updates": {
"dtype": "float32",
"shape": [16],
"data": {
"kind": "values",
"values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0, 9.0, -10.0, 11.0, -12.0, 13.0, -14.0, 15.0, -16.0]
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [8], "tolerance": 0.000001 } }
},
{
"name": "scalar_output_add_many_updates_parallel_reduce",
"provenance": {
"notes": "Correctness lock for scalar accumulation with int32 indices, where every valid index targets the sole output element."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [3.5] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "constant", "value": 0 } },
"updates": {
"dtype": "float32",
"shape": [1024],
"data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, -0.125, 0.0625, 0.75, -0.25, 0.5] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "scalar_output_add_many_updates_parallel_reduce_i32_negative",
"provenance": {
"notes": "ONNX normalizes -1 and 0 to the sole output element. Alternating both spellings makes an omitted negative or nonnegative update change the exact sum."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [3.5] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "cycle", "values": [0, -1] } },
"updates": {
"dtype": "float32",
"shape": [1024],
"data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, -0.125, 0.0625, 0.75, -0.25, 0.5] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "reduction_add_padding_hotspot_many_updates",
"provenance": {
"notes": "Many updates target one hot key in a much larger output table, as in sparse routing or padding-token accumulation."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [128], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [2048, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [2048], "data": { "kind": "constant", "value": 1.0 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [128], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "f16_reduction_add_sparse_router_gradient",
"provenance": {
"notes": "Each of 64 slots receives 64 float16 updates offset around +0.02 through f32 atomic scratch. The nonzero mean makes lost or rescaled contributions observable; the tolerance allows one final f16 rounding after f32 accumulation."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [64], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [4096, 1],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/f16_reduction_add_sparse_router_gradient_input_indices" }
}
},
"updates": {
"dtype": "float16",
"shape": [4096],
"data": { "kind": "fillFloat32", "sinStep": 0.031, "cosStep": 0.047, "scale": 0.01, "offset": 0.02 }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [64], "tolerance": 0.012, "relTolerance": 0.004 } }
},
{
"name": "f16_reduction_add_row_slice_packed_atomic_route",
"provenance": {
"notes": "Duplicate rows and adjacent float16 columns contend on both halves of each packed output word during CAS slice accumulation; each column carries its own update value, so a write that lands in the neighbouring half is visible."
},
"requires": { "features": ["shader-f16"] },
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [16, 4], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [4096, 1],
"data": { "kind": "cycle", "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] }
},
"updates": {
"dtype": "float16",
"shape": [4096, 4],
"data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [16, 4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_add_rank3_batched_indices_packed_atomic",
"provenance": {
"notes": "Rank-3 batched indices through the direct packed-f16 CAS route, where indexDepth is less than rank(data). indices[2,8,1] pairs ascending rows in batch 0 with descending rows in batch 1, so dropping the interior index stride changes the update multiplicities. Data and updates are quarter-integers whose periods are coprime with both row and batch strides; every partial sum stays exactly representable in f16 regardless of atomic retirement order, allowing zero tolerance."
},
"requires": { "features": ["shader-f16"] },
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [8, 256],
"data": { "kind": "cycle", "values": [-1.0, 0.5, -0.25, 2.0, 0.0, -1.5, 1.25] }
},
"indices": {
"dtype": "int32",
"shape": [2, 8, 1],
"data": { "kind": "values", "values": [0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] }
},
"updates": {
"dtype": "float16",
"shape": [2, 8, 256],
"data": { "kind": "cycle", "values": [0.25, 1.5, 0.75, 2.0, 1.25] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [8, 256], "tolerance": 0 } }
},
{
"name": "f16_reduction_max_full_depth_atomic_f32_route",
"provenance": {
"notes": "Four thousand duplicate float16 scalar updates contend on one full-index-depth destination; maximum reduction remains exact regardless of atomic order."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "float16", "shape": [16384], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [4096, 1], "data": { "kind": "constant", "value": 7 } },
"updates": { "dtype": "float16", "shape": [4096], "data": { "kind": "cycle", "values": [-3.0, 2.0, 1.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [16384], "tolerance": 0 } }
},
{
"name": "rank7_scalar_updates",
"inputs": {
"data": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 2, 3], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [2, 7],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [9.0, 7.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 2, 3], "tolerance": 0 } }
},
{
"name": "rank8_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 1, 1, 2, 3],
"data": { "kind": "linspace", "start": 1.0, "end": 6.0 }
},
"indices": {
"dtype": "int32",
"shape": [2, 8],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [9.0, 7.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 1, 2, 3], "tolerance": 0 } }
},
{
"name": "ort_int8_reduction_mul_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "An int8 reduction must narrow each product to the logical eight-bit range instead of retaining the physical int32 product."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [100, -7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [20, 20] } }
},
"outputs": {
"output": { "dtype": "int8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [64, -7] } }
}
},
{
"name": "ort_uint8_reduction_add_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Covers standard UINT8 payload support and modulo-256 add reduction."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [250, 7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [10, 10] } }
},
"outputs": {
"output": { "dtype": "uint8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [14, 7] } }
}
},
{
"name": "ort_int16_reduction_mul_wrap16",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate signed updates lock 16-bit two's-complement narrowing after multiplication."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [20000, -7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [2, 2] } }
},
"outputs": {
"output": {
"dtype": "int16",
"shape": [2],
"tolerance": 0,
"data": { "kind": "values", "values": [14464, -7] }
}
}
},
{
"name": "int8_reduction_add_high_contention_wrap",
"provenance": {
"notes": "Three thousand int8 updates wrap repeatedly across four slots. Reduction uses raw two's-complement bits and narrows once at the end; synchronized index and update cycles give each slot a distinct total and expose mispaired lanes."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [7, -100, 0, 3] } },
"indices": { "dtype": "int32", "shape": [3000, 1], "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": { "reduction": "min" },
"inputs": {
"data": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [100, -5, 42] } },
"indices": { "dtype": "int32", "shape": [512, 1], "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": { "reduction": "max" },
"inputs": {
"data": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [0, 200, 17] } },
"indices": { "dtype": "int32", "shape": [512, 1], "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": "Signed int16 maximum reduction uses i32-widened atomic storage at values outside the int8 range."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [-30000, 1, -7] } },
"indices": { "dtype": "int32", "shape": [512, 1], "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 } }
},
{
"name": "rank1_index_tuple_updates_one_slice",
"provenance": {
"source": "ONNX ScatterND-18 specification",
"notes": "The minimal spelling of a single slice update: `indices` is rank 1, so the whole tensor is the one index tuple and `updates` carries just the slice. Row 2 is replaced and the other rows must be copied through unchanged."
},
"attrs": {},
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0] }
},
"indices": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1.0, -2.0, -3.0] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [4, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, -1.0, -2.0, -3.0, 10.0, 11.0, 12.0] },
"tolerance": 0
}
}
}
]
}