| { |
| "op": "ai.onnx.ReduceSum", |
| "fixtureArrays": { |
| "rank3_axis1_middle_no_keepdims_input_x": [1, 2, 3, 4, -1, -2, -3, -4, 0.5, 1.5, 2.5, 3.5, 10, 20, 30, 40, -10, -20, -30, -40, 2, 4, 6, 8], |
| "rank3_axis0_no_keepdims_input_x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] |
| }, |
| "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": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.01, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "dispatch_cliff_rank3_axis1", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [4096, 1, 4097], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [4096, 4097], "tolerance": 0.0001 } } |
| }, |
| { |
| "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_splitk_8192x32", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8192, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "axis0_splitk_8192x48_keepdims", |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8192, 48], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 48], "tolerance": 0.0001 } } |
| }, |
| { |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_subnormal_axis0_tilecols_sum_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.ReduceSum", |
| "notes": "Tiled axis-0 companion: 64 finite subnormal values reduce to a larger finite subnormal in each column." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [64, 16], "data": { "kind": "constant", "value": 1e-40 } } }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [16], "tolerance": 5e-44, "data": { "kind": "constant", "value": 6.4e-39 } } |
| } |
| }, |
| { |
| "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": "f32_axis1_parallel_cancellation_order_gpu_gap", |
| "skipGpu": { |
| "category": "todo", |
| "reason": "The current parallel reduction changes the fixture's required sequential evaluation order, so f32 rounding is not bit-exact. An order-preserving reduction route can implement this behavior." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum", |
| "notes": "Serial float32 reduction of each [1e20, 1, -1e20, 0] block loses the 1 before cancellation; the parallel tree groups lanes differently and can leak the small terms." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1024], |
| "data": { "kind": "cycle", "values": [100000000000000000000.0, 1.0, -100000000000000000000.0, 0.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 0 } } |
| }, |
| { |
| "name": "f32_subnormal_axis1_sum_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.ReduceSum", |
| "notes": "Summing finite subnormal values can still produce finite subnormal outputs; flushing the reduction input or accumulator loses the signal." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [1e-40, 1e-40, 1e-40, -1e-40, -1e-40, -1e-40] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2], |
| "tolerance": 2e-45, |
| "data": { "kind": "values", "values": [3e-40, -3e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_axis0_sum_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.ReduceSum", |
| "notes": "Axis-0 companion: finite subnormal columns must reduce to finite subnormal sums rather than zero." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2], |
| "data": { "kind": "values", "values": [1e-40, -1e-40, 1e-40, -1e-40, 1e-40, -1e-40] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2], |
| "tolerance": 2e-45, |
| "data": { "kind": "values", "values": [3e-40, -3e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_many_subnormals_axis1_sum_to_normal_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.ReduceSum", |
| "notes": "Many finite subnormal addends can reduce to a normal finite value; flushing inputs before accumulation loses a model-relevant low-magnitude signal." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [1, 1024], "data": { "kind": "constant", "value": 1e-39 } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 1e-42 } } |
| }, |
| { |
| "name": "f32_subnormal_last_axis_vec4_sum_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.ReduceSum", |
| "notes": "Vec4 last-axis companion: finite subnormal rows should survive the subgroup/vectorized reducer." |
| }, |
| "attrs": { "axes": [-1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [1e-40, 1e-40, 1e-40, 1e-40, -1e-40, -1e-40, -1e-40, -1e-40] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2], |
| "tolerance": 3e-45, |
| "data": { "kind": "values", "values": [4e-40, -4e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_last_axis_odd_sum_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.ReduceSum", |
| "notes": "Odd-width last-axis companion: finite subnormal rows should survive the non-vec4 subgroup reducer." |
| }, |
| "attrs": { "axes": [-1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [1e-40, 1e-40, 1e-40, -1e-40, -1e-40, -1e-40] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2], |
| "tolerance": 2e-45, |
| "data": { "kind": "values", "values": [3e-40, -3e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_axis1_sum_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.ReduceSum", |
| "notes": "Rank-3 axis-1 companion: the middle-axis indexing path must preserve finite subnormal column sums." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 2], |
| "data": { |
| "kind": "values", |
| "values": [1e-40, -1e-40, 1e-40, -1e-40, 1e-40, -1e-40, -1e-40, 1e-40, -1e-40, 1e-40, -1e-40, 1e-40] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 2], |
| "tolerance": 2e-45, |
| "data": { "kind": "values", "values": [3e-40, -3e-40, -3e-40, 3e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_all_axes_sum_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: 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.ReduceSum_default_axes_do_not_keep_dims", |
| "notes": "Rank-3 default-axes companion: reducing all finite subnormal values to a scalar should preserve the finite subnormal total." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 2], "data": { "kind": "constant", "value": 1e-40 } } }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [], "tolerance": 1e-44, "data": { "kind": "values", "values": [1.2e-39] } } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_all_axes_keepdims_sum_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.ReduceSum_default_axes_keepdims", |
| "notes": "Rank-3 default-axes keepdims companion: reducing all finite subnormals should preserve the finite total in shape [1,1,1]." |
| }, |
| "attrs": { "keepdims": 1 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 2], "data": { "kind": "constant", "value": 1e-40 } } }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1], |
| "tolerance": 1e-44, |
| "data": { "kind": "values", "values": [1.2e-39] } |
| } |
| } |
| }, |
| { |
| "name": "axis1_empty_cols_identity_zero", |
| "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": "axis0_empty_rows_identity_zero", |
| "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_zero_rows_noop", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } } |
| }, |
| { |
| "name": "axis1_keepdims", |
| "attrs": { "axes": [1], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 4], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, -1.0, -2.0, -3.0, -4.0, 0.5, 1.5, 2.5, 3.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1], "tolerance": 0.000001 } } |
| }, |
| { |
| "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": "ort_empty_rank3_middle_axis_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.empty_set_ReduceSum_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": "rank3_two_axes_trailing_empty_axis_identity_zero", |
| "provenance": { |
| "notes": "Two reduced axes where the trailing one is empty. The serial walk divides the reduced linear index by the stride of the reduced axes after each one, and that stride is zero here; the divisor has a floor at one for exactly this shape. Every existing empty-reduce case reduces a single axis, so nothing had reached the floor." |
| }, |
| "attrs": { "axes": [1, 2], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank4_axis1_channel_no_keepdims", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [1.0, -2.0, 3.0, -4.0, 10.0, 20.0, -30.0, -40.0, 0.25, -0.5, 0.75, -1.0, -5.0, 6.0, -7.0, 8.0, 0.0, 0.0, 1.5, -1.5, 100.0, -200.0, 300.0, -400.0] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank1_axis0_scalar_output", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [1.0, -2.0, 3.5, 0.25, -4.75] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_axis1_small_no_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_do_not_keepdims" |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "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], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_axis0_rank1_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_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.ReduceSum0DTensor" |
| }, |
| "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_axis1_rank3_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_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_axis2_rank3_no_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_axes01" |
| }, |
| "attrs": { "axes": [2], "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_no_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_axes02" |
| }, |
| "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_mixed_infinities_axis1_nan_rows", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceInfSum" |
| }, |
| "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, "allowNaN": true } } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_do_not_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_do_not_keepdims_random", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_empty_set", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_empty_set_non_reduced_axis_zero", |
| "attrs": { "keepdims": 1, "axes": [2] }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 0, 1] } }, |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_sum_empty_set_non_reduced_axis_zero", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_keepdims_random", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_negative_axes_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_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_sum_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.ReduceSum_default_axes_do_not_keep_dims", |
| "notes": "Default-axes reduction of every element to a rank-0 scalar with 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, "data": { "kind": "values", "values": [78.0] } } |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_default_axes_keepdims_example", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_sum_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] } } |
| }, |
| { |
| "name": "ort_default_axes_keepdims_all_rank3", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_default_axes_keepdims" |
| }, |
| "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.000001 } } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_default_axes_keepdims_random", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_sum_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] } } |
| }, |
| { |
| "name": "ort_empty_default_axes_keepdims_all_rank3", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_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": [3, 0, 2], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0, "data": { "kind": "values", "values": [0.0] } } |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_sum_empty_axes_input_noop_example", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_sum_empty_axes_input_noop_example" |
| }, |
| "attrs": { "keepdims": 1, "noop_with_empty_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, 2] } } |
| }, |
| { |
| "name": "ort_missing_axes_noop_identity_keepdims0", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_missing_axes_input_noop_opset_13", |
| "notes": "Missing optional axes plus noop_with_empty_axes=1 is represented as an empty axes input by the ORT validator." |
| }, |
| "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": "onnx_backend_reduce_sum_empty_axes_input_noop_random", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_sum_empty_axes_input_noop" |
| }, |
| "attrs": { "keepdims": 1, "noop_with_empty_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, 2] } } |
| }, |
| { |
| "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.0002, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "subgroup_vec4_last_axis_2x1024", |
| "attrs": { "axes": [-1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1024], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29, "scale": 0.25 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.001, "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 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.0002, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "ort_int32_multi_axis_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceSum_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": [33, 45] }, "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.ReduceSum_int32_Overflow_Saturates" |
| }, |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3], |
| "data": { "kind": "values", "values": [1100000000, 1100000000, 1100000000] } |
| } |
| }, |
| "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.ReduceSum_int32_NegativeOverflow_Saturates" |
| }, |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3], |
| "data": { "kind": "values", "values": [-1100000000, -1100000000, -1100000000] } |
| } |
| }, |
| "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_test_cases_generator.py", |
| "test": "ReductionOpTest.ReduceSum", |
| "notes": "Generated canonical reduction-table case materialized in reduction_ops_test.cc." |
| }, |
| "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_nosubgroup", |
| "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": "dispatch_cliff_axis0_cols_1048577", |
| "requires": { "limits": { "maxBufferSize": 268435712, "maxStorageBufferBindingSize": 268435712 } }, |
| "provenance": { |
| "notes": "rows>=64 selects axis0_tilecols (prio 20); cols=1048577 > 65535*TILE_COLS(16) forces the folded column-tile dispatch (x=65535, y=2). Validates the (wg.x + wg.y*nwg.x)*TILE_COLS reconstruction in the shared reduce-axis0-tilecols.wgsl.jinja (used by all Reduce*/ArgMax/ArgMin axis0 paths). Before the 2D fold the plan-time dispatch-limit guard throws. Its largest tensor is 268435712 bytes, so the case needs an adapter whose maxBufferSize and maxStorageBufferBindingSize both reach it — declared, because the WebGPU guaranteed minimums (256 MiB / 128 MiB) do not, and a device at them must report the case inapplicable rather than fail allocating it." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [64, 1048577], |
| "data": { "kind": "cycle", "values": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1048577], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "rank3_axis0_no_keepdims", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis0_no_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank4_axis2_no_keepdims", |
| "attrs": { "axes": [2], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "rank4_axis0_no_keepdims", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "rank3_multi_axis02_no_keepdims", |
| "attrs": { "axes": [0, 2], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis0_no_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } |
| }, |
| { |
| "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.0001 } } |
| }, |
| { |
| "name": "int32_noop_with_empty_axes_identity_r3", |
| "attrs": { "keepdims": 1, "noop_with_empty_axes": 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, 2, 2], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } |
| } |
| } |
| }, |
| { |
| "name": "int32_lastaxis_serial_exact_signed_3x5", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3, 5], |
| "data": { "kind": "values", "values": [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15] } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [3, -8, 13] } } |
| } |
| }, |
| { |
| "name": "int32_lastaxis_tree_parallel_3x67", |
| "provenance": { |
| "notes": "67 cols >= ROW_PARALLEL_MIN_COLS selects the axis1_parallel tree path for i32; values above 2^24 fail if the accumulator smuggles through f32 (regression: f32 combine vs i32 value type mismatch)." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3, 67], |
| "data": { "kind": "cycle", "values": [16777216, 1, -3, 7, 16777219, -11] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "int32_axis0_empty_rows_identity_zero", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "int32", "shape": [0, 4], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0, 0, 0, 0] } } |
| } |
| }, |
| { |
| "name": "int32_fullreduce_r3_single_lane_exact_4x3x2", |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [4, 3, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis0_no_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [], "tolerance": 0, "data": { "kind": "values", "values": [276] } } |
| } |
| }, |
| { |
| "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": "int32_axis0_splitk_8192x2", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "int32", "shape": [8192, 2], "data": { "kind": "cycle", "values": [1, -1, 2, -2] } } }, |
| "outputs": { "y": { "dtype": "int32", "shape": [2], "tolerance": 0 } } |
| }, |
| { |
| "name": "int32_all_axes_flat_128x64", |
| "attrs": { "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "int32", "shape": [128, 64], "data": { "kind": "cycle", "values": [7000, -1, 2] } } }, |
| "outputs": { "y": { "dtype": "int32", "shape": [], "tolerance": 0 } }, |
| "provenance": { |
| "notes": "The cycle [1,-1,2,-2] summed to exactly zero across all 8192 elements, so this case could not distinguish an int32 result from an f32 one - on the very axis its name claims - and referenceReduceAllFloat was in fact returning a Float32Array here. A three-value cycle makes the total 19119729, which is ODD and above 2^24 where f32 has an ulp of 2, so the exact answer is unrepresentable in f32 and the dtype leak becomes visible. It also stays well inside int32, so nothing wraps." |
| } |
| }, |
| { |
| "name": "axis0_narrow_f32_8192x3_splitk_guard_lock", |
| "provenance": { |
| "notes": "Compact lock below the historical 16-column split-K guard. It selects the split-K axis0 path; constant ones make the partial reduction and reassociation exact." |
| }, |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "noop_empty_axes_identity_rank2", |
| "attrs": { "keepdims": 1, "noop_with_empty_axes": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 4], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 4] } } |
| }, |
| { |
| "name": "noop_empty_axes_identity_rank4", |
| "attrs": { "keepdims": 1, "noop_with_empty_axes": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 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, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 2, 2] } } |
| }, |
| { |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.0001 } } |
| }, |
| { |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.05, "relTolerance": 0.002 } } |
| }, |
| { |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 32], "tolerance": 0.0001 } } |
| }, |
| { |
| "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, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 32], "tolerance": 0.05, "relTolerance": 0.002 } } |
| }, |
| { |
| "name": "axis_split_rank3_axis1_keepdims_1x16384x8", |
| "attrs": { "axes": [1], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 16384, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8], "tolerance": 0.0001 } } |
| }, |
| { |
| "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.05 } } |
| }, |
| { |
| "name": "f16_last_axis_2x65_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.05, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "f16_rank3_multi_axis02", |
| "attrs": { "axes": [0, 2], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis0_no_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3], "tolerance": 0.05 } } |
| }, |
| { |
| "name": "f16_all_axes_keepdims", |
| "attrs": { "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "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": "float16", "shape": [1, 1, 1], "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, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "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.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [64], "tolerance": 0.05, "relTolerance": 0.002 } } |
| }, |
| { |
| "name": "int32_axis0_tiled_64x32", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [64, 32], |
| "data": { "kind": "cycle", "values": [16777217, 3, -5, 16777219, 7, -11, 2] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "int32", "shape": [32], "tolerance": 0 } } |
| } |
| ] |
| } |
|
|