{ "op": "ai.onnx.ReduceProd", "fixtureArrays": { "rank3_axis1_middle_keepdims_input_x": [1, -2, 0.5, 4, -3, 2, -1, 0.25, 2, -0.5, 3, -2, -1, 1.5, 2, -4, 0.5, -2, -3, 1, -2, 4, 0.25, -0.5] }, "cases": [ { "name": "all_axes_flat_rank1_boundary_8192", "provenance": { "notes": "The parallel full-reduction threshold must supersede the rank1 serial and row-reduction fallbacks." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [8192], "data": { "kind": "constant", "value": 1.0 } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0 } } }, { "name": "all_axes_flat_fullreduce_32x32x32_keepdims", "attrs": { "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [32, 32, 32], "data": { "kind": "linspace", "start": 0.9995, "end": 1.0005 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.0005, "relTolerance": 0.001 } } }, { "name": "dispatch_cliff_axis1_rank2_count_over_16m", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [16776961, 1], "data": { "kind": "constant", "value": 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": "values", "values": [1.0, 2.0, 3.0, 4.0, 2.0, 3.0, 4.0, 5.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [4] } } }, { "name": "axis0_tiled_64x32", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [64, 32], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.00001, "relTolerance": 0.0001 } } }, { "name": "axis1", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 2.0, 3.0, 4.0, 5.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3] } } }, { "name": "f32_normal_inputs_subnormal_product_gpu_gap", "skipGpu": { "category": "permanent", "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: 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": "ReductionOpTest.ReduceProd", "notes": "Inputs are normal float32 values, but the row product is finite subnormal; reduction multiplication must not flush that product to zero." }, "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1e-20, 1e-20, 1.0, -1e-20, 1e-20, 1.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 2e-45, "data": { "kind": "values", "values": [1e-40, -1e-40] } } } }, { "name": "f32_normal_inputs_subnormal_product_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": "ReductionOpTest.ReduceProd", "notes": "Axis-0 companion: normal inputs produce finite subnormal products, which must not be flushed to zero." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, 1e-20, 1e-20, -2e-20] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 6e-45, "data": { "kind": "values", "values": [1e-40, -1e-40, -4e-40] } } } }, { "name": "f32_normal_inputs_subnormal_product_last_axis_vec4_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": "ReductionOpTest.ReduceProd", "notes": "Vec4 last-axis path: normal inputs produce finite subnormal products, which must survive reduction." }, "attrs": { "axes": [-1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 4], "data": { "kind": "values", "values": [1e-20, 1e-20, 1.0, 1.0, -1e-20, 1e-20, 1.0, 1.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 2e-45, "data": { "kind": "values", "values": [1e-40, -1e-40] } } } }, { "name": "f32_normal_inputs_subnormal_product_rank3_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": "ReductionOpTest.ReduceProd", "notes": "Rank-3 non-last-axis path: normal inputs produce finite subnormal products along axis 1." }, "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2, 2], "data": { "kind": "values", "values": [1e-20, -1e-20, 1e-20, 1e-20, 2e-20, -2e-20, 2e-20, 2e-20] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 6e-45, "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-40, -4e-40] } } } }, { "name": "axis0_empty_rows_identity_one", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } }, { "name": "axis1_empty_cols_identity_one", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0 } } }, { "name": "axis_minus_one", "attrs": { "axes": [-1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 2.0, -3.0, 4.0, -5.0, 0.5, 1.5, 2.0, 3.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } }, { "name": "rank3_axis1_middle_keepdims", "attrs": { "axes": [1], "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_keepdims_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 4], "tolerance": 0.000001 } } }, { "name": "ort_empty_rank3_middle_axis_keepdims", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.empty_set_ReduceProd_13" }, "attrs": { "axes": [1], "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 4], "tolerance": 0 } } }, { "name": "rank4_axis1_channel_no_keepdims", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 4, 2, 2], "data": { "kind": "values", "values": [1.0, -2.0, 0.5, -1.0, -3.0, 2.0, -1.0, 0.25, 2.0, -0.5, 3.0, -2.0, -1.0, 1.5, 2.0, -4.0, 0.5, -2.0, -3.0, 1.0, -2.0, 4.0, 0.25, -0.5, 1.5, -1.0, 2.0, -2.0, -0.25, 0.5, -4.0, 3.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0.000001 } } }, { "name": "rank1_axis0_keepdims", "attrs": { "axes": [-1], "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [2.0, -3.0, 0.5, -1.0, 4.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 0.000001 } } }, { "name": "ort_axis1_rank3_no_keepdims", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_do_not_keepdims" }, "attrs": { "axes": [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": "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.ReduceProd_keepdims" }, "attrs": { "axes": [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": "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.ReduceProd_do_not_keepdims_2" }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } }, { "name": "ort_rank0_scalar", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd0DTensor" }, "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0 } } }, { "name": "onnx_backend_reduce_prod_do_not_keepdims_example", "attrs": { "keepdims": 0, "axes": [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": "float32", "shape": [3, 2] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_prod_do_not_keepdims_example", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_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_prod_do_not_keepdims_random", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_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_prod_empty_set", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_keepdims_example", "attrs": { "keepdims": 1, "axes": [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": "float32", "shape": [3, 1, 2] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_prod_keepdims_example", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_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_prod_keepdims_random", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_negative_axes_keepdims_example", "attrs": { "keepdims": 1, "axes": [-2] }, "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, 2] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_prod_negative_axes_keepdims_example", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "onnx_backend_reduce_prod_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_prod_negative_axes_keepdims_random", "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." } }, { "name": "ort_default_axes_rank3_no_keepdims_scalar", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_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": [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": [], "tolerance": 0 } } }, { "name": "onnx_backend_reduce_prod_default_axes_keepdims_example", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_prod_default_axes_keepdims_example" }, "attrs": { "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": "float32", "shape": [1, 1, 1], "tolerance": 0 } } }, { "name": "ort_empty_default_axes_keepdims_all_rank2", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_EmptySet_DefaultAxes_KeepDims", "notes": "ORT uses an empty axes input to request reduction over all axes; this fixture represents that with omitted axis." }, "attrs": { "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1], "tolerance": 0, "data": { "kind": "values", "values": [1.0] } } } }, { "name": "onnx_backend_reduce_prod_default_axes_keepdims_random", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_prod_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, "offset": 1.0, "scale": 0.05 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.00001, "relTolerance": 0.0001 } } }, { "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, "offset": 1.0, "scale": 0.05 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.00001, "relTolerance": 0.0001 } } }, { "name": "ort_int32_multi_axis_keepdims", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_int32" }, "attrs": { "axes": [0, 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": "int32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [5400, 88704] }, "tolerance": 0 } } }, { "name": "ort_noop_empty_axes_identity", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_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": "ort_int32_positive_overflow_saturates_gpu_gap", "skipGpu": { "category": "todo", "reason": "The current integer reduction route uses an i32 accumulator, so it cannot reproduce the fixture's widened intermediate arithmetic and final int32 saturation. A portable multiword accumulator can implement this behavior." }, "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_int32_Overflow_Saturates" }, "attrs": { "axes": [0], "keepdims": 1 }, "inputs": { "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [100000, 100000, 100000] } } }, "outputs": { "y": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2147483647] }, "tolerance": 0 } } }, { "name": "ort_int32_negative_overflow_saturates_gpu_gap", "skipGpu": { "category": "todo", "reason": "The current integer reduction route uses an i32 accumulator, so it cannot reproduce the fixture's widened intermediate arithmetic and final int32 saturation. A portable multiword accumulator can implement this behavior." }, "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_int32_NegativeOverflow_Saturates" }, "attrs": { "axes": [0], "keepdims": 1 }, "inputs": { "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-100000, 100000, 100000] } } }, "outputs": { "y": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2147483648] }, "tolerance": 0 } } }, { "name": "ort_float_multi_axis_keepdims", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd" }, "attrs": { "axes": [0, 2], "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": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 } } }, { "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, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.00001 } } }, { "name": "rank3_lastaxis_cols1024_tree_i32", "attrs": { "axes": [2], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [2, 2, 1024], "data": { "kind": "cycle", "values": [1, -1, 1, -1, 1, -1, 1, 1] } } }, "outputs": { "y": { "dtype": "int32", "shape": [2, 2], "tolerance": 0.00001 } } }, { "name": "axis0_splitk_8192x32", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [8192, 32], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.001 } } }, { "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, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 48], "tolerance": 0.001 } } }, { "name": "int32_rank2_axis1_last", "provenance": { "notes": "Exercises int32 ReduceProd over the last axis of a rank-2 tensor with an in-range product." }, "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [3, 4], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } } }, "outputs": { "y": { "dtype": "int32", "shape": [3], "tolerance": 0 } } }, { "name": "int32_rank2_axis0", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_int32", "notes": "Exercises int32 ReduceProd over axis 0 of a rank-2 tensor; all expected products remain in int32 range." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [3, 4], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } } }, "outputs": { "y": { "dtype": "int32", "shape": [4], "tolerance": 0 } } }, { "name": "int32_rank1_axis0", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_int32", "notes": "Exercises int32 ReduceProd over the sole axis of a rank-1 tensor, producing the in-range scalar value 120." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [2, 3, 4, 5] } } }, "outputs": { "y": { "dtype": "int32", "shape": [], "tolerance": 0 } } }, { "name": "int32_rank3_axis1_middle", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd_do_not_keepdims", "notes": "Exercises int32 ReduceProd over the middle axis of a rank-3 tensor with keepdims=0; all expected products remain in int32 range." }, "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [2, 3, 2], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } } }, "outputs": { "y": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } } }, { "name": "f32_last_axis_inf_nan_propagation", "provenance": { "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", "test": "ReductionOpTest.ReduceProd", "notes": "Float edge-value coverage on the working vec4 last-axis path (cols=4, %4==0 -> subgroup_last_axis_vec4). Row0 contains 0*inf -> NaN; row1 overflows the product to +inf. Metal handles inf/NaN in arithmetic (only subnormals are FTZ-flushed), so this should PASS on GPU. Fills the no-inf/NaN-input coverage gap noted in coverage." }, "attrs": { "axes": [-1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 4], "data": { "kind": "values", "values": [0.0, 1e+30, 1.0, 1.0, 100000000000000000000.0, 100000000000000000000.0, 100000000000000000000.0, 100000000000000000000.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2], "allowNaN": true } } }, { "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": [1.05, 0.95, 1.1, 0.9, 1.0, 0.98, 1.02, 0.97, 1.03, 0.99, 1.01, 0.96, 1.04, 0.94, 1.06, 0.92, 1.08, 0.93, 1.07, 0.91, 1.09, 0.95, 1.05, 1.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 1, 2], "tolerance": 0.0001, "relTolerance": 0.0001 } } }, { "name": "tree_lastaxis_dispatch_fold_f32_70000x64", "attrs": { "axes": [-1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [70000, 64], "data": { "kind": "cycle", "values": [1.0, -1.0, 0.5, 2.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [70000], "tolerance": 0 } } }, { "name": "tree_lastaxis_i32_dispatch_fold_70000x64", "attrs": { "axes": [-1], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [70000, 64], "data": { "kind": "cycle", "values": [1, -1, 1, -1, 1, -1, 1, 1] } } }, "outputs": { "y": { "dtype": "int32", "shape": [70000], "tolerance": 0 } } }, { "name": "all_axes_flat_gridstride_tail_numel_8196", "attrs": { "keepdims": 1 }, "inputs": { "x": { "dtype": "float32", "shape": [4, 2049], "data": { "kind": "cycle", "values": [1.0, -1.0, 0.5, 2.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1], "tolerance": 0 } } }, { "name": "subgroup_vec4_manyrows_under_32768_short_cols_16384x64", "attrs": { "axes": [-1], "keepdims": 0 }, "requires": { "features": ["subgroups"] }, "inputs": { "x": { "dtype": "float32", "shape": [16384, 64], "data": { "kind": "cycle", "values": [1.0, -1.0, 0.5, 2.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [16384], "tolerance": 0 } } }, { "name": "int32_all_axes_flat_128x64", "attrs": { "keepdims": 1 }, "inputs": { "x": { "dtype": "int32", "shape": [128, 64], "data": { "kind": "cycle", "values": [1, -1] } } }, "outputs": { "y": { "dtype": "int32", "shape": [1, 1], "tolerance": 0 } } }, { "name": "axis0_narrow_f32_8192x3_splitk_guard_lock", "provenance": { "notes": "Compact lock below the historical 16-column split-K guard. Multiplicative identity input validates partial and combine identities exactly." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [8192, 3], "data": { "kind": "constant", "value": 1.0 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } }, { "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, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 1], "tolerance": 0.0001, "relTolerance": 0.0001 } } }, { "name": "axis_split_rank3_axis1_2x8192x4", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 8192, 4], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.001 } } }, { "name": "f16_axis_split_tiled_narrow_2x8192x4", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [2, 8192, 4], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "axis_split_rank3_axis1_wide_2x8192x32", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float32", "shape": [2, 8192, 32], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 32], "tolerance": 0.001 } } }, { "name": "f16_axis_split_wide_2x8192x32", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [2, 8192, 32], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 32], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_rank3_axis1_serial", "attrs": { "axes": [1], "keepdims": 1 }, "inputs": { "x": { "dtype": "float16", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis1_middle_keepdims_input_x" } } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 1, 4], "tolerance": 0.05 } } }, { "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, "offset": 1.0, "scale": 0.05 } } }, "outputs": { "y": { "dtype": "float16", "shape": [2], "tolerance": 0.05, "relTolerance": 0.0001 } } }, { "name": "f16_all_axes", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [8192], "data": { "kind": "constant", "value": 1.0 } } }, "outputs": { "y": { "dtype": "float16", "shape": [], "tolerance": 0.05 } } }, { "name": "f16_axis0_splitk_8192x8", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [8192, 8], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_last_axis_vec4_8x1024", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [8, 1024], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_last_axis_scalar_8x1023", "attrs": { "axes": [1], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [8, 1023], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_all_axes_flat_65543", "attrs": { "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [65543], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_suffix_vec4_4x8x128", "attrs": { "axes": [1, 2], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [4, 8, 128], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_suffix_scalar_4x7x37", "attrs": { "axes": [1, 2], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [4, 7, 37], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "f16_axis0_tilecols_4096x64", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "float16", "shape": [4096, 64], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "offset": 1.0, "scale": 0.001 } } }, "outputs": { "y": { "dtype": "float16", "shape": [64], "tolerance": 0.05, "relTolerance": 0.01 } } }, { "name": "int32_axis0_tiled_64x32", "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [64, 32], "data": { "kind": "cycle", "values": [1, -1, 3, 1, 2, -1, 1] } } }, "outputs": { "y": { "dtype": "int32", "shape": [32], "tolerance": 0 } } }, { "name": "axis0_splitk_i32_8192x5", "provenance": { "notes": "Integer ReduceProd on the axis-0 split-K route, which ReduceProd did not have until now. A three-value cycle over five columns is coprime with the row stride, so the count of negative factors differs per column and so do the signs of the results; keeping every factor at +/-1 makes the product exact." }, "attrs": { "axes": [0], "keepdims": 0 }, "inputs": { "x": { "dtype": "int32", "shape": [8192, 5], "data": { "kind": "cycle", "values": [1, 1, -1] } } }, "outputs": { "y": { "dtype": "int32", "shape": [5], "tolerance": 0 } } } ] }