Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
b178a1d verified
Raw
History Blame
43.5 kB
{
"op": "ai.onnx.ReduceMax",
"fixtureArrays": {
"int32_axis0_tiled_64x32_input_x": [16777216, 16777245, 16777274, 16777236, 16777265, 16777227, 16777256, 16777218, 16777247, 16777276, 16777238, 16777267, 16777229, 16777258, 16777220, 16777249, 16777278, 16777240, 16777269, 16777231, 16777260, 16777222, 16777251, 16777280, 16777242, 16777271, 16777233, 16777262, 16777224, 16777253, 16777282, 16777244, 16777273, 16777235, 16777264, 16777226, 16777255, 16777217, 16777246, 16777275, 16777237, 16777266, 16777228, 16777257, 16777219, 16777248, 16777277, 16777239, 16777268, 16777230, 16777259, 16777221, 16777250, 16777279, 16777241, 16777270, 16777232, 16777261, 16777223, 16777252, 16777281, 16777243, 16777272, 16777234, 16777263, 16777225, 16777254],
"rank3_axis1_middle_no_keepdims_input_x": [-1, 7, -3, 4, 5, -6, 2, -8, 0, 3, 9, -2, -4, -1, -7, 6, 8, 2, -5, 1, -9, 4, 3, 0]
},
"cases": [
{
"name": "all_axes_flat_negative_infinity_identity_8192",
"provenance": {
"notes": "The parallel full-reduction threshold must supersede the rank1 serial and row-reduction fallbacks, while preserving the true -Infinity identity."
},
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [8192], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "all_axes_flat_fullreduce_32x32x32_keepdims",
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [32, 32, 32],
"data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0 } }
},
{
"name": "f32_positive_subnormal_axis1_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": "ReduceMax",
"notes": "A positive subnormal is the row maximum over zero; flushing it changes the selected value."
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 0 } }
},
{
"name": "dispatch_cliff_axis1_cols1_over_16M",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": { "dtype": "float32", "shape": [16776961, 1], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } }
},
"outputs": { "y": { "dtype": "float32", "shape": [16776961], "tolerance": 0 } }
},
{
"name": "axis0",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } }
},
{
"name": "axis0_tilecols_negative_infinity_identity_64x16",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [64, 16], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [16],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "int32_axis0_tiled_64x32",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [64, 32],
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/int32_axis0_tiled_64x32_input_x" } }
}
},
"outputs": { "y": { "dtype": "int32", "shape": [32], "tolerance": 0 } }
},
{
"name": "axis1",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "ort_axis1_nan_seed_comparison_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "The parallel min/max reduction routes do not yet preserve the reference's first-element NaN incumbent semantics; explicit NaN tracking is implementable in WGSL."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax",
"notes": "NaN extension: ORT seeds ReduceMax from the first reduced element, so a leading NaN remains the result while later NaNs are ignored after a finite incumbent."
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 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] }
}
},
"outputs": {
"y": {
"dtype": "float32",
"shape": [3],
"data": { "kind": "values", "values": ["NaN", 2.0, 2.0] },
"tolerance": 0,
"allowNaN": true
}
}
},
{
"name": "axis0_empty_rows_negative_infinity_identity_f32",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [3], "data": { "kind": "negativeInfinity" }, "tolerance": 0 } }
},
{
"name": "axis1_empty_cols_negative_infinity_identity_f32",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [2], "data": { "kind": "negativeInfinity" }, "tolerance": 0 } }
},
{
"name": "axis1_keepdims",
"attrs": { "axes": [1], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, 9.0, 3.0, 4.0, -1.0, -2.0, -3.0, -4.0, 0.5, 1.5, 7.5, 3.5] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1], "tolerance": 0.000001 } }
},
{
"name": "axis1_all_negative_infinity_returns_negative_infinity",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4],
"data": {
"kind": "values",
"values": ["-Infinity", "-Infinity", "-Infinity", "-Infinity", "-Infinity", -7.0, "-Infinity", -9.0, -3.0, "-Infinity", -5.0, "-Infinity"]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_mixed_infinities_axis1",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceInfMax"
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [6, 2],
"data": {
"kind": "values",
"values": [1.0, "-Infinity", "-Infinity", 4.0, "Infinity", "-Infinity", "-Infinity", "Infinity", 1.0, "Infinity", "Infinity", 4.0]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0 } }
},
{
"name": "rank3_axis1_middle_no_keepdims",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.000001 } }
},
{
"name": "rank4_axis1_channel_no_keepdims",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0.000001 } }
},
{
"name": "rank1_axis0_keepdims",
"attrs": { "axes": [0], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [-9.0, -3.0, -7.0, -3.0, -12.0, -5.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_axis1_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_int32",
"notes": "Single-axis subset adapted from ORT's multi-axis integer reduction fixture because this framework models one reduction axis per case."
},
"attrs": { "axes": [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": "int32", "shape": [3, 1, 2], "tolerance": 0 } }
},
{
"name": "int32_axis1_exact_above_float24",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 3],
"data": { "kind": "values", "values": [16777216, 16777217, 5, 123456788, 123456789, 0] }
}
},
"outputs": { "y": { "dtype": "int32", "shape": [2], "tolerance": 0 } }
},
{
"name": "ort_axis1_rank3_no_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_do_not_keepdims"
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_axis1_rank3_keepdims",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_keepdims"
},
"attrs": { "axes": [1], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_axis0_rank1_scalar",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_do_not_keepdims_2"
},
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [5.0, 1.0, 20.0] } } },
"outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
},
{
"name": "ort_float_axes12_rank3_keepdims1",
"attrs": { "axes": [1, 2], "keepdims": 1 },
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax",
"notes": "Direct multi-axis reduction from ORT."
},
"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": "float32",
"shape": [3, 1, 1],
"data": { "kind": "values", "values": [4.0, 8.0, 12.0] },
"tolerance": 0
}
}
},
{
"name": "ort_rank0_scalar",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax0DTensor"
},
"inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } },
"outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0 } }
},
{
"name": "onnx_backend_reduce_max_do_not_keepdims_example",
"attrs": { "keepdims": 0, "axes": [1] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_do_not_keepdims_example",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_do_not_keepdims_random",
"attrs": { "keepdims": 0, "axes": [1] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": {
"kind": "values",
"values": [0.9762700796127319, 4.3037872314453125, 2.055267572402954, 0.8976636528968811, -1.5269039869308472, 2.917882204055786, -1.248255729675293, 7.835460186004639, 9.273255348205566, -2.331169605255127, 5.834500789642334, 0.577898383140564]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_do_not_keepdims_random",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_empty_set",
"attrs": { "keepdims": 1, "axes": [1] },
"inputs": { "x": { "dtype": "float32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [2, 1, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_empty_set",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_keepdims_example",
"attrs": { "keepdims": 1, "axes": [1] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_keepdims_example",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_keepdims_random",
"attrs": { "keepdims": 1, "axes": [1] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": {
"kind": "values",
"values": [0.9762700796127319, 4.3037872314453125, 2.055267572402954, 0.8976636528968811, -1.5269039869308472, 2.917882204055786, -1.248255729675293, 7.835460186004639, 9.273255348205566, -2.331169605255127, 5.834500789642334, 0.577898383140564]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_keepdims_random",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_negative_axes_keepdims_example",
"attrs": { "keepdims": 1, "axes": [-2] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_negative_axes_keepdims_example",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "onnx_backend_reduce_max_negative_axes_keepdims_random",
"attrs": { "keepdims": 1, "axes": [-2] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": {
"kind": "values",
"values": [0.9762700796127319, 4.3037872314453125, 2.055267572402954, 0.8976636528968811, -1.5269039869308472, 2.917882204055786, -1.248255729675293, 7.835460186004639, 9.273255348205566, -2.331169605255127, 5.834500789642334, 0.577898383140564]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_negative_axes_keepdims_random",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
}
},
{
"name": "ort_int32_empty_axis0_keepdims_lowest_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_int32_EmptySet",
"notes": "The ONNX int64 axes input is materialized as this compile-time axes list."
},
"attrs": { "axes": [0], "keepdims": 1 },
"inputs": { "x": { "dtype": "int32", "shape": [0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "int32", "shape": [1, 3], "tolerance": 0 } }
},
{
"name": "ort_empty_set_default_axes_keepdims_f32",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_EmptySet_DefaultAxes_KeepDims",
"notes": "An omitted axes input reduces all dimensions when noop_with_empty_axes is 0."
},
"attrs": { "keepdims": 1 },
"inputs": { "x": { "dtype": "float32", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [1, 1, 1],
"data": { "kind": "values", "values": ["-Infinity"] },
"tolerance": 0
}
}
},
{
"name": "onnx_backend_reduce_max_default_axes_keepdim_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_default_axes_keepdim_example"
},
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0 } }
},
{
"name": "ort_default_axes_rank3_no_keepdims_scalar",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_default_axes_do_not_keep_dims",
"notes": "Default axes reduce all input dimensions to a rank-0 scalar when keepdims=0."
},
"attrs": { "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] }
}
},
"outputs": {
"y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [60.0] }, "tolerance": 0 }
}
},
{
"name": "onnx_backend_reduce_max_default_axes_keepdims_random",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_max_default_axes_keepdims_random"
},
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 2, 2],
"data": {
"kind": "values",
"values": [0.9762700796127319, 4.3037872314453125, 2.055267572402954, 0.8976636528968811, -1.5269039869308472, 2.917882204055786, -1.248255729675293, 7.835460186004639, 9.273255348205566, -2.331169605255127, 5.834500789642334, 0.577898383140564]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0 } }
},
{
"name": "subgroup_vec4_last_axis_2x256",
"attrs": { "axes": [-1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 256],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0 } }
},
{
"name": "subgroup_scalar_last_axis_2x65",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 65],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0 } }
},
{
"name": "subgroup_vec4_int32_above_float24",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 4],
"data": {
"kind": "values",
"values": [16777217, 16777219, 16777218, 16777220, -16777217, -16777219, -16777218, -16777220]
}
}
},
"outputs": {
"y": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [16777220, -16777217] } }
}
},
{
"name": "ort_bool_axis0_keepdims0",
"attrs": { "axes": [0], "keepdims": 0 },
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "test_bool_ReduceMax_8"
},
"inputs": {
"x": {
"dtype": "bool",
"shape": [2, 3, 2],
"data": { "kind": "values", "values": [0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1] }
}
},
"outputs": {
"y": { "dtype": "bool", "shape": [3, 2], "data": { "kind": "values", "values": [0, 1, 1, 1, 0, 1] } }
}
},
{
"name": "ort_bool_axis2_keepdims1",
"attrs": { "axes": [2], "keepdims": 1 },
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "test_bool_ReduceMax_14"
},
"inputs": {
"x": {
"dtype": "bool",
"shape": [2, 3, 2],
"data": { "kind": "values", "values": [0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1] }
}
},
"outputs": {
"y": { "dtype": "bool", "shape": [2, 3, 1], "data": { "kind": "values", "values": [0, 1, 1, 1, 1, 1] } }
}
},
{
"name": "ort_bool_all_axes_keepdims0_scalar",
"attrs": { "keepdims": 0 },
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "test_bool_ReduceMax_16",
"notes": "The fixture now uses the standard Boolean route introduced by ONNX ReduceMax-20."
},
"inputs": {
"x": {
"dtype": "bool",
"shape": [2, 3, 2],
"data": { "kind": "values", "values": [0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1] }
}
},
"outputs": { "y": { "dtype": "bool", "shape": [], "data": { "kind": "values", "values": [1] }, "tolerance": 0 } }
},
{
"name": "ort_bool_all_axes_keepdims1",
"attrs": { "keepdims": 1 },
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "test_bool_ReduceMax_18",
"notes": "The fixture now uses the standard Boolean route introduced by ONNX ReduceMax-20."
},
"inputs": {
"x": {
"dtype": "bool",
"shape": [2, 3, 2],
"data": { "kind": "values", "values": [0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1] }
}
},
"outputs": {
"y": { "dtype": "bool", "shape": [1, 1, 1], "data": { "kind": "values", "values": [1] }, "tolerance": 0 }
}
},
{
"name": "ort_noop_empty_axes_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc",
"test": "ReductionOpTest.ReduceMax_noop_axes_input_initializer_opset_18",
"notes": "The omitted axes input exercises empty-axes behavior."
},
"attrs": { "keepdims": 0, "noop_with_empty_axes": 1 },
"inputs": {
"x": { "dtype": "float32", "shape": [1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 2, 2], "tolerance": 0 } }
},
{
"name": "rank3_lastaxis_cols1024_tree_f32",
"attrs": { "axes": [2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 2, 1024],
"data": {
"kind": "cycle",
"values": [1.0, -2.0, 0.5, 3.25, -1.5, 2.0, -0.75, 4.0, -3.5, 1.25, 0.0, -2.25, 5.0, -4.0, 2.75, -1.0]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.00001 } }
},
{
"name": "lastaxis_vocab_width_2x50257_scalar",
"provenance": {
"notes": "Compact correctness sibling for the vocab-width ReduceMax benchmark; preserves a large odd last axis that selects the scalar last-axis reducer and tree fallback on no-subgroup tiers."
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 50257],
"data": { "kind": "cycle", "values": [-7.0, 0.5, 42.0, -13.0, 3.25, 9.5, -1.0] }
}
},
"outputs": {
"y": { "dtype": "float32", "shape": [2], "data": { "kind": "constant", "value": 42.0 }, "tolerance": 0 }
}
},
{
"name": "rank3_lastaxis_cols1024_tree_i32",
"attrs": { "axes": [2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 2, 1024],
"data": { "kind": "cycle", "values": [3, -7, 11, -2, 5, -13, 8, -1, 19, -4, 6, -9, 2, -15, 10, -6] }
}
},
"outputs": { "y": { "dtype": "int32", "shape": [2, 2], "tolerance": 0.00001 } }
},
{
"name": "axis0_splitk_negative_infinity_identity_8192x2",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [8192, 2], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "axis0_splitk_8192x48_keepdims",
"attrs": { "axes": [0], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [8192, 48],
"data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 48], "tolerance": 0.0001 } }
},
{
"name": "rank4_axis0_f32_no_keepdims",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 2, 2], "tolerance": 0 } }
},
{
"name": "rank4_axis2_f32_no_keepdims",
"attrs": { "axes": [2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 3, 2], "tolerance": 0 } }
},
{
"name": "rank4_default_all_axes_keepdims_f32",
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } }
},
{
"name": "int32_subgroup_scalar_last_axis_2x67",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [2, 67],
"data": {
"kind": "cycle",
"values": [3, -7, 11, -2, 5, -13, 8, -1, 19, -4, 6, -9, 2, -15, 10, -6, 14, -11, 1, -5, 17, -8, 4, -12, 13, -3, 7, -10, 9, -14]
}
}
},
"outputs": { "y": { "dtype": "int32", "shape": [2], "tolerance": 0 } }
},
{
"name": "rank4_multi_axis_12_keepdims",
"attrs": { "axes": [1, 2], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2],
"data": {
"kind": "values",
"values": [0.5, -1.0, 2.0, -0.25, 1.5, 0.75, -2.0, 1.0, 0.125, -0.5, 3.0, -1.5, 0.25, 2.5, -0.75, 1.25, -3.0, 0.5, 2.0, -1.0, 0.75, -0.25, 1.5, -2.5]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0 } }
},
{
"name": "uint32_axis0_tiled_64x32",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "uint32",
"shape": [64, 32],
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/int32_axis0_tiled_64x32_input_x" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [32], "tolerance": 0 } }
},
{
"name": "rank3_all_axes_keepdims1_small_mod4_miss_f32",
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 5, 7],
"data": {
"kind": "cycle",
"values": [2.5, -1.0, 0.0, 3.5, -4.0, 1.5, -2.5, 0.5, 4.0, -0.5, 1.0, -3.0, 5.5, -1.5, 2.0, -2.0, 3.0, -5.0, 0.25, -0.25]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1] } }
},
{
"name": "rank3_axis2_rankn_generic_small_cols_f32",
"attrs": { "axes": [2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [4, 3, 5],
"data": {
"kind": "values",
"values": [1.0, -2.0, 3.0, -4.0, 5.0, -1.0, 2.0, -3.0, 4.0, -5.0, 0.5, -0.5, 1.5, -1.5, 2.5, -2.5, 3.5, -3.5, 4.5, -4.5, 0.25, -0.25, 0.75, -0.75, 1.25, -1.25, 1.75, -1.75, 2.25, -2.25, 0.1, -0.1, 0.3, -0.3, 0.6, -0.6, 0.9, -0.9, 1.2, -1.2, 2.0, -2.0, 3.0, -3.0, 4.0, -4.0, 5.0, -5.0, 6.0, -6.0, 7.0, -7.0, 8.0, -8.0, 9.0, -9.0, 10.0, -10.0, 11.0, -11.0]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4, 3] } }
},
{
"name": "axis1_rows32768_cols30_subgroup_gate_cliff_f32",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [32768, 30],
"data": { "kind": "fillFloat32", "sinStep": 0.031, "cosStep": 0.017, "scale": 1.5 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [32768] } }
},
{
"name": "axis0_cols15_i32_serial_uncoalesced",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "int32",
"shape": [256, 15],
"data": {
"kind": "cycle",
"values": [-2147483648, 2147483647, 0, -1, 1, -1000000, 1000000, -16777217, 16777217, 42, -42, 100, -100, 7, -7]
}
}
},
"outputs": { "y": { "dtype": "int32", "shape": [15] } }
},
{
"name": "all_axes_flat_fullreduce_101x103_nonmul4_keepdims",
"provenance": {
"notes": "numel=10403 (%4=3, >=8192) full-reduce: previously fell to the single-lane reduce-serial-axis kernel; now stays on all_axes_flat (f32 binding, manual vec4 groups + 3-element scalar tail). Cross-checks the flat path against the serial all_axes_keepdims reference — a dropped tail would change the result."
},
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [101, 103],
"data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [1, 1], "tolerance": 0.01, "relTolerance": 0.0001 } }
},
{
"name": "contiguous_suffix_axes12_parallel",
"provenance": {
"notes": "Contiguous axes {1,2} exercise the shared cooperative suffix reduction instead of one serial lane per output."
},
"attrs": { "axes": [1, 2], "keepdims": 1 },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 16, 16],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.07, "scale": 0.2 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 1, 1], "tolerance": 0.00001 } }
},
{
"name": "axis_split_rank3_axis1_2x8192x4",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [2, 8192, 4], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "f16_axis_split_tiled_narrow_2x8192x4",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float16", "shape": [2, 8192, 4], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float16",
"shape": [2, 4],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "axis_split_rank3_axis1_wide_2x8192x32",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [2, 8192, 32], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [2, 32],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "f16_axis_split_wide_2x8192x32",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float16", "shape": [2, 8192, 32], "data": { "kind": "negativeInfinity" } } },
"outputs": {
"y": {
"dtype": "float16",
"shape": [2, 32],
"data": { "kind": "negativeInfinity" },
"tolerance": 0,
"relTolerance": 0
}
}
},
{
"name": "f16_rank3_axis1_serial",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [2, 3, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_no_keepdims_input_x" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.01 } }
},
{
"name": "f16_last_axis_serial_fallback",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [2, 65],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2], "tolerance": 0.01 } }
},
{
"name": "f16_all_axes",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "dtype": "float16", "shape": [8192], "data": { "kind": "negativeInfinity" } } },
"outputs": { "y": { "dtype": "float16", "shape": [], "tolerance": 0.01, "relTolerance": 0 } }
},
{
"name": "f16_axis0_splitk_8192x8",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [8192, 8],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_last_axis_vec4_8x1024",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [8, 1024],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_last_axis_scalar_8x1023",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [8, 1023],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_all_axes_flat_65543",
"attrs": { "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [65543],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_suffix_vec4_4x8x128",
"attrs": { "axes": [1, 2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [4, 8, 128],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_suffix_scalar_4x7x37",
"attrs": { "axes": [1, 2], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [4, 7, 37],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "f16_axis0_tilecols_4096x64",
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": {
"dtype": "float16",
"shape": [4096, 64],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.11, "scale": 4.0 }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [64], "tolerance": 0.05, "relTolerance": 0.002 } }
},
{
"name": "ort_int8_axis1_extrema",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Covers the signed narrow-integer reduction route."
},
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": { "dtype": "int8", "shape": [2, 3], "data": { "kind": "values", "values": [-128, -5, 127, 12, -3, 11] } }
},
"outputs": {
"y": { "dtype": "int8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [127, 12] } }
}
},
{
"name": "ort_uint8_axis0_extrema",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Covers the unsigned narrow-integer reduction route."
},
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": { "dtype": "uint8", "shape": [2, 3], "data": { "kind": "values", "values": [1, 200, 255, 250, 3, 4] } }
},
"outputs": {
"y": { "dtype": "uint8", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [250, 200, 255] } }
}
},
{
"name": "ort_int8_empty_axis1_lowest_identity",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "An empty INT8 maximum is the logical dtype minimum (-128), not the physical i32 storage minimum."
},
"attrs": { "axes": [1], "keepdims": 1 },
"inputs": { "x": { "dtype": "int8", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": {
"y": {
"dtype": "int8",
"shape": [2, 1, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [-128, -128, -128, -128, -128, -128] }
}
}
},
{
"name": "ort_uint8_empty_axis1_zero_identity",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "An empty UINT8 maximum is the logical dtype minimum (zero)."
},
"attrs": { "axes": [1], "keepdims": 1 },
"inputs": { "x": { "dtype": "uint8", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": {
"y": {
"dtype": "uint8",
"shape": [2, 1, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0] }
}
}
},
{
"name": "onnx_v20_bool_empty_axis1_false_identity",
"provenance": {
"source": "https://onnx.ai/onnx/operators/onnx__ReduceMax.html",
"notes": "An empty Boolean maximum is false, the logical dtype minimum."
},
"attrs": { "axes": [1], "keepdims": 1 },
"inputs": { "x": { "dtype": "bool", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } },
"outputs": {
"y": {
"dtype": "bool",
"shape": [2, 1, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0] }
}
}
}
]
}