| { |
| "op": "ai.onnx.Max", |
| "cases": [ |
| { |
| "name": "int16_max_arity_boundaries", |
| "inputs": { |
| "a": { |
| "dtype": "int16", |
| "shape": [5], |
| "data": { "kind": "values", "values": [32767, -32768, -32768, -32768, -32768] } |
| }, |
| "b": { |
| "dtype": "int16", |
| "shape": [5], |
| "data": { "kind": "values", "values": [-32768, 32766, -32768, -32768, -32768] } |
| }, |
| "c": { |
| "dtype": "int16", |
| "shape": [5], |
| "data": { "kind": "values", "values": [-32768, -32768, 1, -32768, -32768] } |
| }, |
| "d": { |
| "dtype": "int16", |
| "shape": [5], |
| "data": { "kind": "values", "values": [-32768, -32768, -32768, 0, -32768] } |
| }, |
| "e": { |
| "dtype": "int16", |
| "shape": [5], |
| "data": { "kind": "values", "values": [-32768, -32768, -32768, -32768, -1] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "int16", |
| "shape": [5], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [32767, 32766, 1, 0, -1] } |
| } |
| } |
| }, |
| { |
| "name": "max_arity_float16_positions", |
| "provenance": { |
| "notes": "Synthetic five-input float16 Max contract fixture; each bounded input position uniquely wins one output lane." |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [9.0, 0.0, 0.0, 0.0, 0.0] } }, |
| "b": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [0.0, 8.0, 0.0, 0.0, 0.0] } }, |
| "c": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [0.0, 0.0, 7.0, 0.0, 0.0] } }, |
| "d": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 6.0, 0.0] } }, |
| "e": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0, 5.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [5], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [9.0, 8.0, 7.0, 6.0, 5.0] } |
| } |
| } |
| }, |
| { |
| "name": "max_arity_int32_positions", |
| "provenance": { |
| "notes": "Synthetic five-input int32 Max contract fixture; each bounded input position uniquely wins one output lane." |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [9, 0, 0, 0, 0] } }, |
| "b": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [0, 8, 0, 0, 0] } }, |
| "c": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 7, 0, 0] } }, |
| "d": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 6, 0] } }, |
| "e": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 5] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [5], "tolerance": 0, "data": { "kind": "values", "values": [9, 8, 7, 6, 5] } } |
| } |
| }, |
| { |
| "name": "max_arity_int8_positions", |
| "provenance": { |
| "notes": "Synthetic five-input int8 Max contract fixture; each bounded input position uniquely wins one output lane." |
| }, |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [9, 0, 0, 0, 0] } }, |
| "b": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [0, 8, 0, 0, 0] } }, |
| "c": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 7, 0, 0] } }, |
| "d": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 6, 0] } }, |
| "e": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 5] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "int8", "shape": [5], "tolerance": 0, "data": { "kind": "values", "values": [9, 8, 7, 6, 5] } } |
| } |
| }, |
| { |
| "name": "max_arity_uint32_positions", |
| "provenance": { |
| "notes": "Synthetic five-input uint32 Max contract fixture; each bounded input position uniquely wins one output lane." |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [9, 0, 0, 0, 0] } }, |
| "b": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 8, 0, 0, 0] } }, |
| "c": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 7, 0, 0] } }, |
| "d": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 6, 0] } }, |
| "e": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 5] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "uint32", |
| "shape": [5], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [9, 8, 7, 6, 5] } |
| } |
| } |
| }, |
| { |
| "name": "max_arity_uint8_positions", |
| "provenance": { |
| "notes": "Synthetic five-input uint8 Max contract fixture; each bounded input position uniquely wins one output lane." |
| }, |
| "inputs": { |
| "a": { "dtype": "uint8", "shape": [5], "data": { "kind": "values", "values": [9, 0, 0, 0, 0] } }, |
| "b": { "dtype": "uint8", "shape": [5], "data": { "kind": "values", "values": [0, 8, 0, 0, 0] } }, |
| "c": { "dtype": "uint8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 7, 0, 0] } }, |
| "d": { "dtype": "uint8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 6, 0] } }, |
| "e": { "dtype": "uint8", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 5] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "uint8", "shape": [5], "tolerance": 0, "data": { "kind": "values", "values": [9, 8, 7, 6, 5] } } |
| } |
| }, |
| { |
| "name": "f32_positive_subnormal_max_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: Metal flushes float32 subnormals to zero, so the positive subnormal becomes 0 and max(.,0) returns 0 instead of the subnormal." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_6", |
| "notes": "Positive subnormal inputs are greater than zero and should be selected by Max." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40, 1e-39] } }, |
| "b": { "dtype": "float32", "shape": [4], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "f32_positive_subnormal_max_zero_scalar_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 float32 subnormals to zero, so the positive subnormal becomes 0 and max(.,0) returns 0 instead of the subnormal." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_6", |
| "notes": "Scalar broadcast companion: positive subnormal inputs remain greater than zero." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "same_shape", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [1.0, 5.0, -2.0, 4.0, 0.0, 6.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [3.0, 2.0, -4.0, 8.0, 1.0, 1.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3] } } |
| }, |
| { |
| "name": "row_broadcast_f16", |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [2, 4] }, |
| "b": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.1, 0.2, 0.3, 0.4] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 4] } }, |
| "tolerance": 0.001 |
| }, |
| { |
| "name": "true_scalar_rhs_broadcast", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [-3.0, -1.0, 0.0, 1.0, 2.0, 3.0] } |
| }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.5] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "nan_propagates", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": ["NaN", 1.0, "NaN", 2.0] } }, |
| "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [3.0, "NaN", "NaN", 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.000001, "allowNaN": true } } |
| }, |
| { |
| "name": "rank0_scalar_scalar_output", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-7.0] } }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "int32_exact_above_float24", |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [4], |
| "data": { "kind": "values", "values": [16777216, 16777217, -16777217, -16777216] } |
| }, |
| "b": { |
| "dtype": "int32", |
| "shape": [4], |
| "data": { "kind": "values", "values": [16777217, 16777216, -16777216, -16777217] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "same_shape_vec4_three_input", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [1.0, 5.0, -2.0, 4.0, 0.0, 6.0, 10.0, -10.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [3.0, 2.0, -4.0, 8.0, 1.0, 1.0, 9.0, -9.0] } |
| }, |
| "c": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [0.0, 7.0, -3.0, 2.0, -1.0, 8.0, 11.0, -11.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [8], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [3.0, 7.0, -2.0, 8.0, 1.0, 8.0, 11.0, -9.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_float_three_input_same_shape", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_6" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1.0, 0.0, 1.0, -1.0, 1.1, -100.0, -5.4, 0.01, -10000.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1.0, 0.0, 2.0, -2.0, 2.2, 64.0, -1.0, 0.02, 0.1] } |
| }, |
| "c": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1.0, 0.0, 3.0, -3.0, 3.3, 64.0, 5.4, 0.03, 10000.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [1.0, 0.0, 3.0, -1.0, 3.3, 64.0, 5.4, 0.03, 10000.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_validated_four_inputs_same_shape_variadic", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_6", |
| "notes": "Extends ORT's same-shape Max coverage to a valid four-input ONNX variadic node." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 1.0 } }, |
| "b": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 3.0 } }, |
| "c": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 5.0 } }, |
| "d": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 7.0 } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0, "data": { "kind": "constant", "value": 7.0 } } |
| } |
| }, |
| { |
| "name": "four_input_same_shape_vec4_reference_generated", |
| "provenance": { |
| "notes": "Reference-generated four-operand coverage. Every other four-input Max case pins its outputs, so prepareCase never consulted the reference and it went unnoticed that the reference reduced only A..C. The four operands are interleaved sinusoids of equal amplitude, so D supplies the maximum on a substantial share of lanes and dropping it changes the answer far above tolerance." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23, "scale": 0.25 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.07, "scale": 0.25 } |
| }, |
| "c": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.13, "scale": 0.25 } |
| }, |
| "d": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.37, "scale": 0.25 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 2, 8], "tolerance": 0.000001, "relTolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_four_inputs_nan_propagates_variadic", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_6", |
| "notes": "Extends ORT's variadic Max coverage with a fourth input that carries NaNs; any NaN input should propagate at that element." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, "NaN", -5.0, 4.0] } }, |
| "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [2.0, 3.0, "NaN", 1.0] } }, |
| "c": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 5.0, -2.0, 8.0] } }, |
| "d": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [3.0, 4.0, 6.0, "NaN"] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [4], |
| "tolerance": 0, |
| "allowNaN": true, |
| "data": { "kind": "values", "values": [3.0, "NaN", "NaN", "NaN"] } |
| } |
| } |
| }, |
| { |
| "name": "ort_float_three_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Float" |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0] } |
| }, |
| "c": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [-1.0, -2.0, 300.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 300.0, 300.0, 300.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_float_four_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Float", |
| "notes": "Extends ORT's multidirectional broadcast case to a valid four-input ONNX variadic Max node." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, |
| "b": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } }, |
| "c": { "dtype": "float32", "shape": [3, 1, 1], "data": { "kind": "values", "values": [100.0, 200.0, 300.0] } }, |
| "d": { |
| "dtype": "float32", |
| "shape": [1, 1, 3], |
| "data": { "kind": "values", "values": [1000.0, 2000.0, 3000.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3, 3], |
| "tolerance": 0, |
| "data": { |
| "kind": "values", |
| "values": [1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0, 1000.0, 2000.0, 3000.0] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_float_nan_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Float_Nan" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": ["NaN", "NaN", "NaN", -0.5, 0.0, -2.0, 0.5, 0.0, 2.0] } |
| }, |
| "b": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [0.0, -1.0, 1.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "tolerance": 0.000001, |
| "allowNaN": true, |
| "data": { "kind": "values", "values": ["NaN", "NaN", "NaN", -0.5, 0.0, -1.0, 1.0, 1.0, 2.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_float_2input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_8_2inputbroadcast" |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_float_nan_with_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Float_Nan_with_scalar" |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": ["NaN", -0.5, 0.5] } }, |
| "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1], "tolerance": 0.000001, "allowNaN": true } } |
| }, |
| { |
| "name": "ort_float_scalar_nan_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Float_with_scalar_Nan" |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.25, -0.25, -0.5, 0.5] } }, |
| "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": ["NaN"] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001, "allowNaN": true } } |
| }, |
| { |
| "name": "ort_f16_matrix_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_13_Float16_MatrixVector" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float16", |
| "shape": [4, 3], |
| "data": { "kind": "values", "values": [1.0, 1.0, 1.0, -0.5, 0.0, -2.0, 0.0, 0.5, 0.75, 0.5, 0.0, 2.0] } |
| }, |
| "b": { "dtype": "float16", "shape": [4, 1], "data": { "kind": "values", "values": [0.0, -1.0, 0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [4, 3], "tolerance": 0.002 } } |
| }, |
| { |
| "name": "ort_f16_vector_matrix", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_13_Float16_VectorMatrix" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [0.0, -1.0, 1.0] } }, |
| "b": { |
| "dtype": "float16", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1.0, 1.0, 1.0, -0.5, 0.0, -2.0, 0.5, 0.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.002 } } |
| }, |
| { |
| "name": "ort_f16_nan_pair", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_13_Float16_Nan" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [4, 1], "data": { "kind": "values", "values": [-1.0, "NaN", 1.0, 0.5] } }, |
| "b": { "dtype": "float16", "shape": [4, 1], "data": { "kind": "values", "values": [0.5, 1.0, 0.25, "NaN"] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [4, 1], "tolerance": 0.002, "allowNaN": true } } |
| }, |
| { |
| "name": "ort_f16_nan_with_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_13_Float16_Nan_with_scalar" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [-1.0, "NaN", 1.0] } }, |
| "b": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": [0.25] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3, 1], "tolerance": 0.002, "allowNaN": true } } |
| }, |
| { |
| "name": "ort_f16_scalar_nan_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_13_Float16_with_scalar_Nan" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [-0.5, 1.0, 1.5] } }, |
| "b": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": ["NaN"] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3, 1], "tolerance": 0.002, "allowNaN": true } } |
| }, |
| { |
| "name": "ort_f16_three_input", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_MLFloat16" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-1.0, -1.0, -1.0] } }, |
| "b": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-2.0, -1.0, -2.0] } }, |
| "c": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-3.0, -2.0, -3.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 3], |
| "tolerance": 0.002, |
| "data": { "kind": "values", "values": [-1.0, -1.0, -1.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_f16_scalar0_three_input", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_MLFloat16_Scalar0" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [-1.0] } }, |
| "b": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-11.0, -12.0, -22.0] } }, |
| "c": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-10.0, -11.0, -13.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 3], |
| "tolerance": 0.002, |
| "data": { "kind": "values", "values": [-1.0, -1.0, -1.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_f16_scalar1_three_input", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_MLFloat16_Scalar1" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-1.0, -2.0, -3.0] } }, |
| "b": { "dtype": "float16", "shape": [], "data": { "kind": "values", "values": [2.0] } }, |
| "c": { "dtype": "float16", "shape": [1, 3], "data": { "kind": "values", "values": [-2.0, -3.0, -4.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 3], |
| "tolerance": 0.002, |
| "data": { "kind": "values", "values": [2.0, 2.0, 2.0] } |
| } |
| } |
| }, |
| { |
| "name": "ort_int8_pair_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Int8", |
| "notes": "Two-input projection of ORT's broadcast case for logical int8 storage." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "int8", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "b": { "dtype": "int8", "shape": [3, 1], "data": { "kind": "values", "values": [-1, -2, 127] } } |
| }, |
| "outputs": { "y": { "dtype": "int8", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_uint8_pair_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_UInt8", |
| "notes": "Two-input projection of ORT's broadcast case for logical uint8 storage." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "uint8", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "b": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [100, 20, 30] } } |
| }, |
| "outputs": { "y": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int8_three_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Int8" |
| }, |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [1, 3], "data": { "kind": "values", "values": [1, 2, 3] } }, |
| "b": { |
| "dtype": "int8", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "c": { "dtype": "int8", "shape": [3, 1], "data": { "kind": "values", "values": [-1, -2, 127] } } |
| }, |
| "outputs": { "y": { "dtype": "int8", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_uint8_three_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_UInt8" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint8", "shape": [1, 3], "data": { "kind": "values", "values": [1, 20, 30] } }, |
| "b": { |
| "dtype": "uint8", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "c": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [100, 20, 30] } } |
| }, |
| "outputs": { "y": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_three_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_Int32" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [1, 3], "data": { "kind": "values", "values": [1, 2, 3] } }, |
| "b": { |
| "dtype": "int32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "c": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [-1, -2, 300] } } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_uint32_three_input_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Max_12_UInt32" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [1, 3], "data": { "kind": "values", "values": [1, 2, 3] } }, |
| "b": { |
| "dtype": "uint32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90] } |
| }, |
| "c": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 2, 300] } } |
| }, |
| "outputs": { "y": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_float16", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_float16" }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [3.0, 2.0, 1.0] } }, |
| "b": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.0, 4.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_int32", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_int32" }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [3, 2, 1] } }, |
| "b": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 4, 4] } } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_int8", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_int8" }, |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [3, 2, 1] } }, |
| "b": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [1, 4, 4] } } |
| }, |
| "outputs": { "y": { "dtype": "int8", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_two_inputs", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_two_inputs" }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [3.0, 2.0, 1.0] } }, |
| "b": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 4.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_uint32", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_uint32" }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 2, 1] } }, |
| "b": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 4, 4] } } |
| }, |
| "outputs": { "y": { "dtype": "uint32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_uint8", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_uint8" }, |
| "inputs": { |
| "a": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [3, 2, 1] } }, |
| "b": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [1, 4, 4] } } |
| }, |
| "outputs": { "y": { "dtype": "uint8", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_one_input_identity", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_one_input" }, |
| "inputs": { "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [3.0, 2.0, 1.0] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_max_example_three_inputs", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_max_example" }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [3.0, 2.0, 1.0] } }, |
| "b": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 4.0, 4.0] } }, |
| "c": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, 5.0, 3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_dim_zero_equal_rank", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.DimWithZeroHandling", |
| "notes": "Projected from ORT's binary elementwise zero-dimension Add coverage to generic ONNX multidirectional broadcasting." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, |
| "b": { "dtype": "float32", "shape": [3, 0], "data": { "kind": "values", "values": [] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 0], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_dim_zero_scalar_broadcast", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.DimWithZeroHandling", |
| "notes": "Projected from ORT's binary elementwise zero-dimension Add coverage to generic ONNX multidirectional broadcasting." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }, |
| "b": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } } |
| }, |
| { |
| "name": "single_input_identity_ignores_d", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -5.0, 3.0, 0.0] } }, |
| "d": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [2.0, -3.0, 0.5, 7.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "same_shape_vec4_ignores_d_when_c_absent", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5] } |
| }, |
| "d": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [10.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 100.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "f32_infinity_pair", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "Infinity", "-Infinity", 1.0, 2.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": ["-Infinity", 0.0, 1.0, "Infinity", "Infinity", "-Infinity"] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [6], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": ["Infinity", 0.0, "Infinity", "Infinity", "Infinity", 2.0] } |
| } |
| } |
| }, |
| { |
| "name": "int8_extreme_values_broadcast", |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-128, 127, -128, 0] } }, |
| "b": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [127, -128, 0, -1] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "int8", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [127, 127, 0, 0] } } |
| } |
| }, |
| { |
| "name": "five_input_same_shape_variadic", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 9.0, -3.0, 4.0] } }, |
| "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [2.0, 8.0, -4.0, 3.0] } }, |
| "c": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [3.0, 7.0, -5.0, 2.0] } }, |
| "d": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [4.0, 6.0, -6.0, 1.0] } }, |
| "e": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [5.0, 5.0, -7.0, 0.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [5.0, 9.0, -3.0, 4.0] } |
| } |
| } |
| }, |
| { |
| "name": "rank8_broadcast_two_input", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2, 1, 2, 2, 3], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 1, 2, 1, 2, 3], |
| "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.19 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 2, 2, 2, 2, 3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "int32_three_input_same_shape_vec4", |
| "provenance": { |
| "notes": "int32 at arity 3 exercises the flat vec4 same-shape path and its extra-operand fold. Each operand supplies the maximum on at least two lanes, so dropping or double-counting any operand changes the answer. Valid ONNX Max-13: the op is variadic over any numeric T." |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [5, -3, 12, 0, 7, -20, 33, 4] } }, |
| "b": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [9, -7, 2, 15, -1, -25, 11, 40] } }, |
| "c": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [1, -1, 6, 8, 21, -30, 5, 12] } } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "uint32_four_input_same_shape_vec4", |
| "provenance": { |
| "notes": "uint32 at arity 4 on the flat vec4 same-shape path: the u32 branch of the same integer lane of minmax-vec4, with TWO extra-operand folds so the second fold reads the value the first produced. Lanes 0-3 each put one operand above 2^31 against small peers, so an accidental signed compare would pick the wrong operand on every one of them; lanes 4-7 spread the win evenly over a, b, c and d. Valid ONNX Max-13: variadic over numeric T with all four operands the same shape." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "uint32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [4000000000, 10, 15, 40, 1500, 40, 50, 60] } |
| }, |
| "b": { |
| "dtype": "uint32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [100, 3500000000, 25, 45, 200, 1600, 55, 65] } |
| }, |
| "c": { |
| "dtype": "uint32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [200, 20, 2147483648, 50, 210, 70, 1700, 75] } |
| }, |
| "d": { |
| "dtype": "uint32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [300, 30, 35, 4294967295, 220, 80, 85, 1800] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "uint32", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "f16_three_input_same_shape_vec4", |
| "provenance": { |
| "notes": "float16 at arity 3 exercises the flat vec4 same-shape path, including widening to f32, the extra-operand maximum fold, NaN re-injection, and narrowing. Every value is exactly representable in float16 and each operand wins at least two lanes." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float16", |
| "shape": [8], |
| "data": { "kind": "values", "values": [3.5, -2.5, 0.25, 6.0, -3.0, 3.5, -0.75, 0.5] } |
| }, |
| "b": { |
| "dtype": "float16", |
| "shape": [8], |
| "data": { "kind": "values", "values": [2.5, -0.5, -0.5, 2.0, -1.0, 2.5, -8.0, 7.75] } |
| }, |
| "c": { |
| "dtype": "float16", |
| "shape": [8], |
| "data": { "kind": "values", "values": [0.5, -1.5, 4.5, 3.0, -2.0, 5.5, -4.0, 1.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.002 } } |
| }, |
| { |
| "name": "f16_four_input_same_shape_vec4", |
| "provenance": { |
| "notes": "float16 at arity 4 on the flat vec4 same-shape path (same_shape_vec4_four_input, numel 8). Two extra-operand folds in the f16 lane of minmax-vec4, so the second fold consumes the first fold's result and the loop.first-guarded comment renders on the first pass only. Valid ONNX Max-13 for T = float16 with four same-shape operands. Every value is exactly representable in float16 and each of a, b, c, d supplies the maximum on exactly two lanes, so no operand can be dropped." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [3.5, -2.5, 0.25, 6.0, -1.0, 3.5, -4.0, 0.5] } |
| }, |
| "b": { |
| "dtype": "float16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [2.5, -0.5, -0.5, 2.0, -3.0, 6.5, -8.0, 5.5] } |
| }, |
| "c": { |
| "dtype": "float16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [0.5, -1.5, 4.5, 3.0, -2.0, 5.5, -0.75, 1.5] } |
| }, |
| "d": { |
| "dtype": "float16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [-0.5, -3.5, 1.25, 9.0, -6.0, 2.5, -1.0, 7.75] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.002 } } |
| } |
| ] |
| } |
|
|