ai.onnx.ArgMax / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 6fdf6301e2bb
a622bea verified
Raw History Blame
58.4 kB
{
"fixtureArrays": {
"onnx_backend_argmax_input_x": [0.9762700796127319, 4.3037872314453125, 2.055267572402954, 0.8976636528968811, -1.5269039869308472, 2.917882204055786, -1.248255729675293, 7.835460186004639, 9.273255348205566, -2.331169605255127, 5.834500789642334, 0.577898383140564, 1.3608912229537964, 8.511932373046875, -8.579278945922852, -8.257413864135742, -9.59563159942627, 6.6523966789245605, 5.563135147094727, 7.400242805480957, 9.572366714477539, 5.983171463012695, -0.7704127430915833, 5.610583305358887],
"axis0_splitk_8192x32_ties_first_index_input_x": [1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1],
"subgroup_vec4_ties_first_index_input_x": [1, 5, 5, 2, 5, 0, 1, 0, 7, 7, 7, 7, 7, 7, 7, 7],
"rank4_axis0_f32_no_keepdims_input_x": [5, 1, 9, 2, 0, 7, 3, 4, 1, 6, 9, 8, 2, 7, 3, 1],
"axis0_splitk_i32_8192x16_precision_max_input_x": [16777216, 16777216, 16777216, 16777216, 16777216, 16777216, 16777216, 16777216, 16777217, 16777217, 16777217, 16777217, 16777217, 16777217, 16777217, 16777217, 16777217]
},
"cases": [
{
"name": "int16_last_axis_vec4_boundaries",
"attrs": { "axis": -1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int16",
"shape": [2, 4],
"data": { "kind": "values", "values": [-32768, -1, 32767, 0, 32767, -32768, 32767, 1] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [2, 0] } }
}
},
{
"name": "onnx_default_axis0_omitted",
"provenance": {
"source": "https://onnx.ai/onnx/operators/onnx__ArgMax.html",
"test": "ArgMax axis default",
"notes": "Omitting axis must reduce the leading dimension (ONNX default 0), not axis 1. The rank-2 output shape and per-column indices distinguish the two semantics. Representable ONNX int64 indices are stored in uint32 slots."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 9.0, 3.0, 4.0, 2.0, 8.0] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [1, 3], "tolerance": 0, "data": { "kind": "values", "values": [1, 0, 1] } }
}
},
{
"name": "f32_positive_subnormal_beats_zero_gpu_gap",
"skipGpu": {
"category": "permanent",
"reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero in f32; bit-exact subnormal preservation is unattainable on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ArgMax",
"notes": "A positive subnormal is strictly greater than zero; index selection must not treat it as a tie with zero."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [1], "tolerance": 0 } }
},
{
"name": "f32_positive_subnormal_beats_zero_select_last_gpu_gap",
"skipGpu": {
"category": "permanent",
"reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero in f32; bit-exact subnormal preservation is unattainable on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ArgMax2D_select_last",
"notes": "select_last_index must only apply to true ties; a positive subnormal at index 0 is greater than following zeros."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1e-40, 0.0, 0.0] } }
},
"outputs": {
"y": { "dtype": "uint32", "shape": [1], "tolerance": 0, "data": { "kind": "values", "values": [0] } }
}
},
{
"name": "f32_positive_subnormal_beats_zero_axis0_gpu_gap",
"skipGpu": {
"category": "permanent",
"reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero in f32; bit-exact subnormal preservation is unattainable on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ArgMax",
"notes": "Along axis 0, a positive subnormal is strictly greater than zero and must not be tie-broken as though it were flushed to zero."
},
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [1], "tolerance": 0 } }
},
{
"name": "dispatch_cliff_axis1_dim1_over_16M",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [16776961, 1], "data": { "kind": "constant", "value": 1.0 } } },
"outputs": { "y": { "dtype": "uint32", "shape": [16776961], "tolerance": 0 } }
},
{
"name": "axis0",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, 9.0, 3.0, 4.0, -1.0, 2.0, 7.0, 8.0, 0.0, 5.0, -3.0, 6.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [4] } }
},
{
"name": "axis0_splitk_8192x32_ties_first_index",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 32],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_8192x32_ties_first_index_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "axis0_splitk_8192x32_ties_select_last_index",
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 32],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_8192x32_ties_first_index_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "axis0_splitk_8192x48_keepdims",
"attrs": { "axis": 0, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 48],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29, "scale": 0.2 }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 48], "tolerance": 0 } }
},
{
"name": "axis0_tiled_64x32_ties_first_index",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [64, 32],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_8192x32_ties_first_index_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "axis0_tiled_64x32_ties_select_last_index",
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [64, 32],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_8192x32_ties_first_index_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "axis1_tie_first_index",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 5],
"data": { "kind": "values", "values": [1.0, 3.0, 3.0, 2.0, 3.0, -1.0, -1.0, -2.0, -1.0, -3.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2] } }
},
{
"name": "ort_axis1_nan_first_incumbent_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "The parallel reduction routes do not preserve first-element NaN incumbent semantics. Explicit NaN and index tracking is implementable in WGSL."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax",
"notes": "NaN extension: ArgMax seeds the reduction from the first reduced element, so a leading NaN remains the selected incumbent while later NaNs are ignored after a finite incumbent."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [4, 4],
"data": {
"kind": "values",
"values": ["NaN", 1.0, 2.0, 0.0, 1.0, "NaN", 2.0, 0.0, 1.0, 2.0, "NaN", 0.0, "NaN", "NaN", "NaN", "NaN"]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [4], "tolerance": 0 } }
},
{
"name": "ort_axis1_nan_select_last_index_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "The parallel reduction routes do not preserve first-element NaN incumbent semantics. Explicit NaN and index tracking is implementable in WGSL."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int32_last_index_dups",
"notes": "NaN extension: select_last_index only changes equal finite ties. A leading NaN remains the incumbent because finite values are not greater than NaN."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [4, 4],
"data": {
"kind": "values",
"values": ["NaN", 1.0, 2.0, 0.0, 1.0, "NaN", 3.0, 3.0, -1.0, -2.0, "NaN", -3.0, "NaN", "NaN", "NaN", "NaN"]
}
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [0, 3, 0, 0] }, "tolerance": 0 }
}
},
{
"name": "axis1_f16",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, 9.0, 3.0, 4.0, -1.0, 2.0, 7.0, 8.0, 0.0, 5.0, -3.0, 6.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3] } }
},
{
"name": "axis1_select_last_index_ties",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 5],
"data": { "kind": "values", "values": [1.0, 3.0, 3.0, 2.0, 3.0, -1.0, -1.0, -2.0, -1.0, -3.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2] } }
},
{
"name": "axis1_select_last_all_negative_infinity",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 4],
"data": {
"kind": "values",
"values": ["-Infinity", "-Infinity", "-Infinity", "-Infinity", -5.0, -5.0, "-Infinity", "-Infinity"]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "tolerance": 0 } }
},
{
"name": "axis_minus_one",
"attrs": { "axis": -1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [1.0, 2.0, 9.0, 4.0, 5.0, 8.0, 7.0, 6.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2] } }
},
{
"name": "axis1_keepdims",
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [1.0, 7.0, 7.0, 3.0, -2.0, -2.0, -5.0, -2.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1] } }
},
{
"name": "rank3_axis2_keepdims",
"attrs": { "axis": 2, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 2, 4],
"data": {
"kind": "values",
"values": [1.0, 5.0, 5.0, 2.0, -1.0, -2.0, -3.0, -4.0, 0.0, 3.0, 2.0, 1.0, 9.0, 8.0, 9.0, 7.0]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 1], "tolerance": 0 } }
},
{
"name": "rank4_axis1_channel_select_last_ties",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [1, 3, 2, 2],
"data": { "kind": "values", "values": [1.0, 5.0, 3.0, 5.0, 3.0, 4.0, -1.0, 7.0, 3.0, 7.0, 0.0, 7.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2, 2], "tolerance": 0 } }
},
{
"name": "rank4_axis2_spatial_select_last_ties",
"attrs": { "axis": 2, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [1, 2, 3, 2],
"data": { "kind": "values", "values": [1.0, 4.0, 3.0, 4.0, 3.0, 2.0, -1.0, 5.0, 0.0, 5.0, 0.0, 3.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2, 2], "tolerance": 0 } }
},
{
"name": "rank4_last_axis_nhwc_keepdims_select_last",
"attrs": { "axis": -1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [1, 2, 2, 3],
"data": { "kind": "values", "values": [1.0, 3.0, 3.0, 5.0, 4.0, 7.0, 3.0, 3.0, 0.0, 5.0, 7.0, 7.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2, 2, 1], "tolerance": 0 } }
},
{
"name": "rank1_axis0_scalar_output_select_last",
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [-1.0, 7.0, 3.0, 7.0, 2.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [], "tolerance": 0 } }
},
{
"name": "ort_int8_axis1_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int8"
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "int8",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_uint8_axis1_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_uint8"
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "uint8",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_int32_axis1_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int32",
"notes": "An int32 input exercises ArgMax while representable output indices are stored in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_int32_axis1_keepdims_select_last_nodups",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int32_last_index_nodups",
"notes": "ORT select_last_index path where no ties are present; should match the regular max positions."
},
"attrs": { "axis": 1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [2, 2, 3, 4, 5, 6, 7, 8, 10, 10, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_float_first_index_infinity_deterministic",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_float_first_index_random",
"notes": "Deterministic compact projection of ORT's random infinity-sentinel first-index test."
},
"attrs": { "axis": 0, "keepdims": 1, "select_last_index": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [16],
"data": {
"kind": "values",
"values": [0.0, 1.0, "Infinity", 5.0, "Infinity", -3.0, 2.0, "Infinity", 4.0, -1.0, 3.0, "Infinity", 0.0, 2.0, 1.0, 0.0]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1], "tolerance": 0 } }
},
{
"name": "ort_int32_axis1_keepdims_select_last_dups",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int32_last_index_dups"
},
"attrs": { "axis": 1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [2, 4, 3, 4, 8, 6, 7, 8, 9, 13, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_axis1_no_keepdims_rank3_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_do_not_keepdims"
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"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] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 2], "tolerance": 0 } }
},
{
"name": "ort_axis0_no_keepdims_rank1_scalar_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_do_not_keepdims_2"
},
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } },
"outputs": { "y": { "dtype": "uint32", "shape": [], "tolerance": 0 } }
},
{
"name": "ort_negative_axis_int32_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_int32_neg_axis"
},
"attrs": { "axis": -2, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_axis1_keepdims_rank3_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax"
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"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] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "ort_axis1_keepdims_rank2_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax2D"
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2],
"data": { "kind": "values", "values": [1.0, 2.0, 6.0, 5.0, 9.0, 10.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1], "tolerance": 0 } }
},
{
"name": "ort_axis1_keepdims_rank2_select_last_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax2D_select_last"
},
"attrs": { "axis": 1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2],
"data": { "kind": "values", "values": [1.0, 2.0, 6.0, 5.0, 9.0, 10.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1], "tolerance": 0 } }
},
{
"name": "ort_axis1_dim1_rank2_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax2D_dim1"
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 6.0, 9.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [3, 1], "tolerance": 0 } }
},
{
"name": "int32_axis1_exact_above_float24",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 4],
"data": { "kind": "values", "values": [16777216, 16777217, 5, -1, 123456789, 123456788, 0, -7] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_default_axis_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_default_axis_example",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "keepdims": 1, "axis": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_default_axis_example_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_default_axis_example_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "keepdims": 1, "select_last_index": 1, "axis": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_default_axis_random",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_default_axis_random",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "keepdims": 1, "axis": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 3, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_default_axis_random_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_default_axis_random_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "keepdims": 1, "select_last_index": 1, "axis": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 3, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_keepdims_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_keepdims_example",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_keepdims_example_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_keepdims_example_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_keepdims_random",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_keepdims_random",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_keepdims_random_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_keepdims_random_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_negative_axis_keepdims_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_negative_axis_keepdims_example",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": -1, "keepdims": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_negative_axis_keepdims_example_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_negative_axis_keepdims_example_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": -1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_negative_axis_keepdims_random",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_negative_axis_keepdims_random",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": -1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 3, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_negative_axis_keepdims_random_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_negative_axis_keepdims_random_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": -1, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 3, 1], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_no_keepdims_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_no_keepdims_example",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_no_keepdims_example_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_no_keepdims_example_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 10.0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_no_keepdims_random",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_no_keepdims_random",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_argmax_no_keepdims_random_select_last_index",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_argmax_no_keepdims_random_select_last_index",
"notes": "ONNX arg-reduction outputs use int64 indices; this WebGPU package stores representable indices in uint32 slots."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_argmax_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 4], "tolerance": 0 } }
},
{
"name": "subgroup_vec4_ties_first_index",
"attrs": { "axis": -1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 8],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/subgroup_vec4_ties_first_index_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 0] } } }
},
{
"name": "subgroup_vec4_ties_select_last_index",
"attrs": { "axis": -1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 8],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/subgroup_vec4_ties_first_index_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 7] } } }
},
{
"name": "subgroup_scalar_f16_2x5",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [2, 5],
"data": { "kind": "values", "values": [1.5, 2.5, 2.5, 0.5, 1.0, -1.0, -2.0, -0.5, -0.5, -3.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 2] } } }
},
{
"name": "subgroup_vec4_uint8_full_range",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": { "dtype": "uint8", "shape": [2, 4], "data": { "kind": "values", "values": [255, 0, 254, 1, 1, 2, 2, 0] } }
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [0, 1] } } }
},
{
"name": "subgroup_vec4_long_row_2x256",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 256],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2] } }
},
{
"name": "subgroup_min_vec4_rows128x256_ties_first",
"provenance": { "notes": "Aligned 256-element rows with equal maxima verify first-index tie ordering." },
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [128, 256], "data": { "kind": "constant", "value": 7.0 } } },
"outputs": {
"y": { "dtype": "uint32", "shape": [128], "data": { "kind": "constant", "value": 0 }, "tolerance": 0 }
}
},
{
"name": "subgroup_min_scalar_rows128x257_ties_last",
"provenance": { "notes": "Unaligned 257-element rows with equal maxima verify last-index tie ordering." },
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": { "x": { "dtype": "float32", "shape": [128, 257], "data": { "kind": "constant", "value": 7.0 } } },
"outputs": {
"y": { "dtype": "uint32", "shape": [128], "data": { "kind": "constant", "value": 256 }, "tolerance": 0 }
}
},
{
"name": "subgroup_scalar_long_row_2x65",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 65],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2] } }
},
{
"name": "empty_zero_dim",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [0, 4], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "uint32", "shape": [0], "tolerance": 0 } }
},
{
"name": "empty_zero_dim_f16",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": { "x": { "dtype": "float16", "shape": [0, 4], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "uint32", "shape": [0], "tolerance": 0 } }
},
{
"name": "empty_zero_dim_int32",
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": { "x": { "dtype": "int32", "shape": [0, 4], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "uint32", "shape": [0], "tolerance": 0 } }
},
{
"name": "rank4_axis0_f32_no_keepdims",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 2, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank4_axis0_f32_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "rank4_axis0_int32_keepdims",
"attrs": { "axis": 0, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 2, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank4_axis0_f32_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 2, 2, 2], "tolerance": 0 } }
},
{
"name": "rank4_neg_axis0_select_last",
"attrs": { "axis": -4, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 2, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank4_axis0_f32_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "axis1_serial_fallback_rows32768_cols5_select_last",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [32768, 5],
"data": { "kind": "cycle", "values": [1.0, 3.0, 3.0, 2.0, 3.0, 1.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32768], "tolerance": 0 } }
},
{
"name": "axis1_serial_fallback_rows32768_cols5_first_index",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [32768, 5],
"data": { "kind": "cycle", "values": [1.0, 3.0, 3.0, 2.0, 3.0, 1.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32768], "tolerance": 0 } }
},
{
"name": "axis0_fallback_rows4_int32_select_last_ties",
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [4, 4],
"data": { "kind": "values", "values": [5, 1, 3, 2, 5, 7, 3, 2, 4, 7, 9, 2, 4, 1, 9, 8] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [1, 2, 3, 3] } }
}
},
{
"name": "axis1_int8_serial_fallback_select_last",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int8",
"shape": [2, 8],
"data": {
"kind": "values",
"values": [-5, -5, 127, 127, 3, 3, -128, -128, 127, 127, 0, -128, 100, 100, 100, 50]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2], "tolerance": 0 } }
},
{
"name": "axis1_uint8_serial_fallback_boundary_values",
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "uint8",
"shape": [3, 8],
"data": {
"kind": "values",
"values": [255, 0, 255, 128, 1, 254, 255, 200, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 255, 255, 100, 100, 255, 255]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [3], "tolerance": 0 } }
},
{
"name": "axis0_splitk_i32_8192x16_precision_max",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [8192, 16],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_i32_8192x16_precision_max_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [16], "tolerance": 0 } }
},
{
"name": "axis0_splitk_u32_8192x16_precision_max",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "uint32",
"shape": [8192, 16],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_i32_8192x16_precision_max_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [16], "tolerance": 0 } }
},
{
"name": "axis0_tilecols_i32_64x16_precision_max",
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [64, 16],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_i32_8192x16_precision_max_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [16], "tolerance": 0 } }
},
{
"name": "axis0_tilecols_i32_64x16_precision_select_last_max",
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [64, 16],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/axis0_splitk_i32_8192x16_precision_max_input_x" }
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [16], "tolerance": 0 } }
},
{
"name": "axis0_narrow_splitk_16384x8_f32",
"provenance": {
"notes": "A tall, narrow axis-0 reduction with 16,384 rows and eight columns exercises split-and-tiled partial reductions and their combine pass across all columns."
},
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [16384, 8],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [8], "tolerance": 0 } }
},
{
"name": "axis0_narrow_splitk_8192x4_int32",
"provenance": {
"notes": "A tall, four-column axis-0 int32 reduction exercises the native-integer split-K comparison and combine path. Each column has a distinct exact expected index."
},
"attrs": { "axis": 0, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [8192, 4],
"data": { "kind": "cycle", "values": [-5000, 1200, -300, 4800, 700] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [4], "tolerance": 0 } }
},
{
"name": "rank3_axis1_splitk_temporal_select_last",
"provenance": {
"notes": "A long temporal middle axis with four output classes exercises strided split-K mapping across batch, time, and class. Equal maxima must merge to the last temporal index."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": { "x": { "dtype": "float32", "shape": [1, 8192, 4], "data": { "kind": "constant", "value": 7.0 } } },
"outputs": {
"y": { "dtype": "uint32", "shape": [1, 4], "data": { "kind": "constant", "value": 8191 }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_vec4_logits_ties_first",
"provenance": {
"notes": "A 32,768-element row has equal maxima across distant segments; the result must be the first global index."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [1, 32768], "data": { "kind": "cycle", "values": [7.0, 3.0, 7.0, 1.0] } }
},
"outputs": {
"y": { "dtype": "uint32", "shape": [1], "data": { "kind": "constant", "value": 0 }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_scalar_logits_ties_last",
"provenance": {
"notes": "An unaligned 32,769-element row exercises scalar split-row reduction and verifies select_last_index across split boundaries."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": { "x": { "dtype": "float32", "shape": [1, 32769], "data": { "kind": "constant", "value": 5.0 } } },
"outputs": {
"y": { "dtype": "uint32", "shape": [1], "data": { "kind": "constant", "value": 32768 }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_vec4_i32_negative_rows",
"provenance": {
"notes": "A [2, 32768] int32 tensor's last axis cycles seven negative values (-9, -5, -3, -1, -2, -4, -6), so a zero-initialized accumulator would misreport the maximum. Since 32768 is not a multiple of 7, row 1 begins one step into the cycle, putting its first-occurrence maximum at column 2 versus row 0's column 3."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 32768],
"data": { "kind": "cycle", "values": [-9, -5, -3, -1, -2, -4, -6] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 2] }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_scalar_u32_above_int32_max",
"provenance": {
"notes": "A [2, 32769] uint32 tensor's last axis cycles seven values; six of seven exceed 2^31 (up to 4,294,967,290, near UINT32_MAX), so a signed comparison would misorder them. Since 32769 is not a multiple of 7, row 1 begins two steps into the cycle, moving its maximum's column from 3 (row 0) to 1 (row 1)."
},
"attrs": { "axis": 1, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "uint32",
"shape": [2, 32769],
"data": {
"kind": "cycle",
"values": [2147483000, 4200000000, 3000000000, 4294967290, 2500000000, 3500000000, 4000000000]
}
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_vec4_f16_rows",
"provenance": {
"notes": "A rank-3 float16 tensor with 32,768-element rows exercises vec4 split-row reduction. Each component is widened before comparison, all seven cycle values are exactly representable, and ties select the first index."
},
"attrs": { "axis": 2, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [1, 2, 32768],
"data": { "kind": "cycle", "values": [1.5, -2.0, 0.5, 3.5, -1.0, 2.25, -3.75] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [1, 2], "data": { "kind": "values", "values": [3, 2] }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_scalar_f16_rows",
"provenance": {
"notes": "A rank-3 float16 tensor with 32,769-element rows exercises scalar split-row reduction. Loaded values are widened before comparison, all cycle values are exactly representable, and ties select the first index."
},
"attrs": { "axis": 2, "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [1, 2, 32769],
"data": { "kind": "cycle", "values": [1.5, -2.0, 0.5, 3.5, -1.0, 2.25, -3.75] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [1, 2], "data": { "kind": "values", "values": [3, 1] }, "tolerance": 0 }
}
},
{
"name": "last_axis_split_vec4_ties_select_last_index",
"provenance": {
"notes": "select_last_index on the vec4 split-row route checks the last-index tie rule in both the segment reduction and combine. The maximum 7.0 recurs at cycle offsets 0, 2 and 5, so every segment reports a tie; the two phase-shifted rows must return 32767 and 32766."
},
"attrs": { "axis": 1, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 32768],
"data": { "kind": "cycle", "values": [7.0, 3.0, 7.0, 1.0, 5.0, 7.0, 2.0] }
}
},
"outputs": {
"y": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [32767, 32766] }, "tolerance": 0 }
}
},
{
"name": "rank5_middle_axis_generic_geometry",
"provenance": {
"notes": "A rank-5 middle-axis reduction exercises the rank-independent outer-axis-inner geometry."
},
"attrs": { "axis": 2, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 2, 3, 2, 2],
"data": { "kind": "cycle", "values": [-3.0, 5.0, 1.0, 5.0, 2.0, -1.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 2, 2], "tolerance": 0 } }
},
{
"name": "axis0_splitk_select_last_index_ties_8192x16",
"provenance": {
"notes": "On the split-tiled route, a 17-value cycle coprime with the 16 columns gives each column an approximately 482-way maximum tie. With select_last_index=1, each column must retain its final matching axis index across lane-local folds."
},
"attrs": { "axis": 0, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [8192, 16],
"data": { "kind": "cycle", "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [16], "tolerance": 0 } }
},
{
"name": "subgroup_min_scalar_keepdims_128x197_vit_tokens",
"provenance": {
"notes": "A 197-element last axis across 128 rows checks an unaligned reduction and default keepdims."
},
"attrs": { "axis": -1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [128, 197],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [128, 1], "tolerance": 0 } }
},
{
"name": "ort_wide_last_axis_2x202048_keepdims_negative_axis",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ArgMax_float_wide_last_axis_keepdims",
"notes": "Vocabulary-scale last axis with keepdims and a negative axis; upstream added it so the CUDA multi-block scratch path is covered end to end. 2 x 202048 float32 = 1.6 MB."
},
"attrs": { "axis": -1, "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 202048],
"data": {
"kind": "cycle",
"values": [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0, 15.5, 16.0, 16.5, 17.0, 17.5, 18.0, 18.5, 19.0, 19.5, 20.0, 20.5, 21.0, 21.5, 22.0, 22.5, 23.0, 23.5, 24.0, 24.5, 25.0, 25.5, 26.0, 26.5, 27.0, 27.5, 28.0, 28.5, 29.0, 29.5, 30.0, 30.5, 31.0, 31.5, 32.0, 32.5, 33.0, 33.5, 34.0, 34.5, 35.0, 35.5, 36.0, 36.5, 37.0, 37.5, 38.0, 38.5, 39.0, 39.5, 40.0, 40.5, 41.0, 41.5, 42.0, 42.5, 43.0, 43.5, 44.0, 44.5, 45.0, 45.5, 46.0, 46.5, 47.0, 47.5, 48.0]
}
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 1], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_8192x32_ties_first",
"provenance": {
"notes": "A [8192, 32] float32 tensor's axis=-2 cycles a 13-value pattern whose maximum, 8.0, repeats twice per period; every column sees that tie across its 8192 rows, and select_last_index=0 resolves each to the earliest matching row."
},
"tunables": { "WORKGROUP_SIZE": 16 },
"attrs": { "axis": -2, "keepdims": 0, "select_last_index": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 32],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_8192x32_ties_last",
"provenance": {
"notes": "A [8192, 32] float32 tensor's axis=-2 cycles a 13-value pattern whose maximum, 8.0, repeats twice per period; every column sees that tie across its 8192 rows, and select_last_index=1 resolves each to the latest matching row."
},
"tunables": { "WORKGROUP_SIZE": 16 },
"attrs": { "axis": -2, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 32],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_8193x28_ties_first",
"provenance": {
"notes": "A [8193, 28] float32 tensor's axis=-2 (one row more than the 8192-row case) cycles the same 13-value pattern, whose maximum 8.0 repeats twice per period; keepdims=1 keeps that axis as size 1 in a [1, 28] output, and select_last_index=0 resolves each column's tie to its earliest row."
},
"tunables": { "WORKGROUP_SIZE": 8 },
"attrs": { "axis": -2, "keepdims": 1, "select_last_index": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8193, 28],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 28], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_8193x28_ties_last",
"provenance": {
"notes": "A [8193, 28] float32 tensor's axis=-2 (one row more than the 8192-row case) cycles the same 13-value pattern, whose maximum 8.0 repeats twice per period; keepdims=1 keeps that axis as size 1 in a [1, 28] output, and select_last_index=1 resolves each column's tie to its latest row."
},
"tunables": { "WORKGROUP_SIZE": 8 },
"attrs": { "axis": -2, "keepdims": 1, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8193, 28],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [1, 28], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_2x8193x12_ties_first",
"provenance": {
"notes": "A [2, 8193, 12] float32 tensor's axis=-2 (the 8193-length middle axis) cycles the same 13-value pattern for each of the 2 batches' 12 columns; the maximum 8.0 repeats twice per period, and select_last_index=0 resolves each tie to its earliest row, giving a [2, 12] output."
},
"tunables": { "WORKGROUP_SIZE": 8 },
"attrs": { "axis": -2, "keepdims": 0, "select_last_index": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 8193, 12],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 12], "tolerance": 0 } }
},
{
"name": "packed_axis_columns_2x8193x12_ties_last",
"provenance": {
"notes": "A [2, 8193, 12] float32 tensor's axis=-2 (the 8193-length middle axis) cycles the same 13-value pattern for each of the 2 batches' 12 columns; the maximum 8.0 repeats twice per period, and select_last_index=1 resolves each tie to its latest row, giving a [2, 12] output."
},
"tunables": { "WORKGROUP_SIZE": 8 },
"attrs": { "axis": -2, "keepdims": 0, "select_last_index": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 8193, 12],
"data": { "kind": "cycle", "values": [-3.0, 7.0, 7.0, -9.0, 2.0, 8.0, -9.0, 8.0, -1.0, 0.0, 2.0, 7.0, -9.0] }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 12], "tolerance": 0 } }
}
]
}