| { |
| "op": "ai.onnx.ReduceMean", |
| "fixtureArrays": { |
| "rank3_axis2_last_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] |
| }, |
| "cases": [ |
| { |
| "name": "contiguous_suffix_axes23_parallel", |
| "attrs": { "axes": [2, 3], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 16, 16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "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": "all_axes_flat_fullreduce_32x32x32_keepdims_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The all_axes_flat route reduces 32768 elements through an f32 partial pass and a single-workgroup combine; the zero-mean sibling produces 4.5e-4 against a 0.01 absolute tolerance (min detectable uniform scale error 22), so the combine's divide by numel is unobservable. Offsetting x about 1.0 makes the full-reduce mean O(1)." |
| }, |
| "attrs": { "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [32, 32, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "name": "dispatch_cliff_axis1_rank2", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [16776961, 1], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [16776961], "tolerance": 0.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_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.000001 } } |
| }, |
| { |
| "name": "f32_subnormal_axis0_tilecols_mean_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.ReduceMean", |
| "notes": "Tiled axis-0 companion: the column mean of equal finite subnormal values remains subnormal." |
| }, |
| "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": 2e-45, "data": { "kind": "constant", "value": 1e-40 } } |
| } |
| }, |
| { |
| "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.ReduceMean", |
| "notes": "Mean inherits the same cancellation-order trap as ReduceSum: serial float32 summation yields 0, while the parallel row tree can preserve the small lane terms before division." |
| }, |
| "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_mean_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.ReduceMean", |
| "notes": "A row mean over equal finite subnormal values remains subnormal; reduction kernels must not flush the input or final quotient to zero." |
| }, |
| "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": [1e-40, -1e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_axis0_mean_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.ReduceMean", |
| "notes": "Axis-0 companion: the mean of equal finite subnormal column values remains subnormal." |
| }, |
| "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": [1e-40, -1e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_last_axis_vec4_mean_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.ReduceMean", |
| "notes": "Vec4 last-axis companion: the mean of equal finite subnormal values should remain subnormal." |
| }, |
| "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": 2e-45, |
| "data": { "kind": "values", "values": [1e-40, -1e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_last_axis_odd_mean_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.ReduceMean", |
| "notes": "Odd-width last-axis companion: the mean of equal finite subnormal values should remain subnormal in 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": [1e-40, -1e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_axis1_mean_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.ReduceMean", |
| "notes": "Rank-3 axis-1 companion: the mean of equal finite subnormal values remains subnormal through middle-axis indexing." |
| }, |
| "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": [1e-40, -1e-40, -1e-40, 1e-40] } |
| } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_all_axes_mean_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.ReduceMean_default_axes_do_not_keep_dims", |
| "notes": "Rank-3 default-axes companion: the mean of equal finite subnormal values should remain subnormal in scalar output form." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 2], "data": { "kind": "constant", "value": 1e-40 } } }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [], "tolerance": 2e-45, "data": { "kind": "values", "values": [1e-40] } } |
| } |
| }, |
| { |
| "name": "f32_subnormal_rank3_all_axes_keepdims_mean_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.ReduceMean_default_axes_keepdims", |
| "notes": "Rank-3 default-axes keepdims companion: the mean of equal finite subnormals should remain subnormal 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": 2e-45, |
| "data": { "kind": "values", "values": [1e-40] } |
| } |
| } |
| }, |
| { |
| "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": "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, -1.0, -2.0, -3.0, -4.0, 0.5, 1.5, 2.5, 3.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank3_axis2_last_keepdims", |
| "attrs": { "axes": [2], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis2_last_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 1], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank4_axis1_channel_no_keepdims", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [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.00001 } } |
| }, |
| { |
| "name": "rank1_axis0_scalar_output", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.5, 4.5, -1.0, 0.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank3_axis2_empty_axis_identity_zero", |
| "attrs": { "axes": [2], "keepdims": 1 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 1], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank4_axis1_empty_axis_identity_zero", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [2, 0, 2, 2], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_axis1_rank3_no_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_do_not_keepdims" |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_axis1_rank3_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_keepdims" |
| }, |
| "attrs": { "axes": [1], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_axis0_rank1_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_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.ReduceMean0DTensor" |
| }, |
| "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_axis0_singleton_keepdims_noop", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_keepdims_results_in_noop" |
| }, |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_axis0_singleton_no_keepdims_shape_change", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_keepdims_results_in_shape_change" |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_default_axes_rank3_no_keepdims_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_default_axes_do_not_keep_dims", |
| "notes": "Default axes reduce all input dimensions to a rank-0 scalar when keepdims=0." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_do_not_keepdims_example", |
| "attrs": { "keepdims": 0, "axes": [1] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 2] } }, |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_mean_do_not_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_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_mean_do_not_keepdims_random", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_keepdims_example", |
| "attrs": { "keepdims": 1, "axes": [1] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } }, |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_mean_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_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_mean_keepdims_random", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_negative_axes_keepdims_example", |
| "attrs": { "keepdims": 1, "axes": [-2] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2] } }, |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_mean_negative_axes_keepdims_example", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_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_mean_negative_axes_keepdims_random", |
| "notes": "The ONNX int64 axes input is materialized as this compile-time axes list." |
| } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_default_axes_keepdims_example", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_mean_default_axes_keepdims_example" |
| }, |
| "attrs": { "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1] } } |
| }, |
| { |
| "name": "ort_default_axes_keepdims_all_rank3", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_default_axes_keepdims" |
| }, |
| "attrs": { "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "onnx_backend_reduce_mean_default_axes_keepdims_random", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_reduce_mean_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": "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_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_large_values_no_overflow_gpu_gap", |
| "skipGpu": { |
| "category": "todo", |
| "reason": "The current integer reduction route uses an i32 accumulator, so the fixture's 6e9 intermediate sum overflows before division. A portable multiword accumulator can implement this behavior." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_int32_LargeValues_NoOverflow" |
| }, |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3], |
| "data": { "kind": "values", "values": [2000000000, 2000000000, 2000000000] } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2000000000] }, "tolerance": 0 } |
| } |
| }, |
| { |
| "name": "ort_noop_empty_axes_identity", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_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_multi_axis_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_int32" |
| }, |
| "attrs": { "axes": [0, 2], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "int32", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120] } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [55, 75] }, "tolerance": 0 } |
| } |
| }, |
| { |
| "name": "ort_float_multi_axis_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean" |
| }, |
| "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": "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_8192x32_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "axis0_splitk_8192x32 draws x from a zero-mean sinusoid, so the mean over 8192 rows cancels to 7e-5 while the absolute tolerance is 1e-4: the whole output fits inside the tolerance and any multiplicative error passes (min detectable uniform scale error 1.43). Offsetting x to oscillate about 1.0 makes each column mean O(1), so the axis0_splitk divisor is under test - a per-split partial that divides by the split height instead of the axis length, a missing final divide, or a combine that double-counts a partial all fail here." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8192, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "name": "axis0_splitk_8192x48_keepdims", |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8192, 48], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 48], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "axis0_splitk_8192x48_keepdims_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The keepdims sibling axis0_splitk_8192x48_keepdims averages zero-mean data to 1e-5 against a 1e-4 absolute tolerance (min detectable uniform scale error 10.0), so the keepdims axis0_splitk combine is only checked for shape, never for magnitude. Offsetting x about 1.0 makes the mean O(1) so the divisor on the keepdims path is checked too." |
| }, |
| "attrs": { "axes": [0], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8192, 48], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 48], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_rank4_axis2_no_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean", |
| "notes": "Rank-4 single-axis reduce over a middle (non-last, non-axis1) dimension." |
| }, |
| "attrs": { "axes": [2], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.13, "scale": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 2], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_rank4_multi_axis_23_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean", |
| "notes": "Rank-4 multi-axis reduce over the trailing spatial axes [2,3]." |
| }, |
| "attrs": { "axes": [2, 3], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.17, "scale": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_rank4_default_all_axes_scalar", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean_default_axes_do_not_keep_dims", |
| "notes": "Reduces every axis of a rank-4 float32 tensor to a rank-0 scalar." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.41, "cosStep": 0.19, "scale": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_last_axis_inf_nan_propagation", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean", |
| "notes": "inf/NaN propagation through the subgroup vec4 last-axis reducer (cols%4==0): row means of +inf -> inf, mixed +inf/-inf -> NaN, any NaN -> NaN. Not subnormal, so Metal FTZ does not apply." |
| }, |
| "attrs": { "axes": [-1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 4], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 2.0, 3.0, 4.0, "Infinity", 1.0, 2.0, 3.0, "Infinity", "-Infinity", 1.0, 1.0, "NaN", 1.0, 2.0, 3.0] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.000001, "allowNaN": true } } |
| }, |
| { |
| "name": "rank3_multi_axes_12_keepdims", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/reduction/reduction_ops_test.cc", |
| "test": "ReductionOpTest.ReduceMean", |
| "notes": "Multi-axis rank3 reduce over axes=[1,2] with keepdims=1, exercising the multi_axis_rank3 mask branch beyond the existing [0,2] case." |
| }, |
| "attrs": { "axes": [1, 2], "keepdims": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/rank3_axis2_last_keepdims_input_x" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "int32_mean_truncation_toward_zero", |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { "dtype": "int32", "shape": [2, 4], "data": { "kind": "values", "values": [-3, 5, -7, 9, -4, 2, -8, 2] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [-3, 3, -7, 5] }, "tolerance": 0 } |
| } |
| }, |
| { |
| "name": "reduce_size1_axis_returns_input_value", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 4], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "all_axes_flat_numel_boundary_8192", |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 8192], |
| "data": { "kind": "fillFloat32", "sinStep": 0.01, "cosStep": 0.02, "scale": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.001, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "all_axes_flat_numel_boundary_8192_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "At exactly FULL_REDUCE_MIN_ELEMENTS the split count is at its low boundary, which is where a combine that divides by the partial count instead of numel would first show; the zero-mean sibling averages to 2.2e-3 against a 1e-3 tolerance (min detectable uniform scale error 0.45) and cannot show it. Offsetting x about 1.0 makes the mean O(1) at the same boundary." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 8192], |
| "data": { "kind": "fillFloat32", "sinStep": 0.01, "cosStep": 0.02, "scale": 1.0, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "name": "axis0_narrow_f32_8192x3_splitk_guard_lock", |
| "provenance": { |
| "notes": "Compact lock below the historical 16-column split-K guard. Constant ones validate that mean finalization remains exactly one on the split-K route." |
| }, |
| "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": "rank3_axis1_tiled_middle_reduction", |
| "provenance": { |
| "notes": "Compact route fixture for the coalesced multi-lane middle-axis reduction used by the 8x1024x768 case." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 64, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.037, "cosStep": 0.061, "scale": 0.7 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 64], "tolerance": 0.00002 } } |
| }, |
| { |
| "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": "axis_split_rank3_axis1_2x8192x4_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "axis_split_rank3_axis1_2x8192x4 selects axis_split_tiled_narrow, whose reduce pass writes per-split partials and whose combine performs the divide; its zero-mean data averages to 9e-5 against a 1e-4 tolerance (min detectable uniform scale error 1.08), so neither the partial nor the combine divisor is observable. Offsetting x about 1.0 puts the mean at O(1)." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 4], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "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": "f16_axis_split_tiled_narrow_2x8192x4_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "Offsetting the input around 1.0 keeps the mean at O(1), so the tightened tolerance detects errors in the float16 partial representation and the axis-split combine divisor at roughly two float16 ulps." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0.002, "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": "axis_split_rank3_axis1_wide_2x8192x32_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The wide axis_split route (inner 32, not the tiled-narrow path) averages zero-mean data to 7e-5 against a 1e-4 tolerance (min detectable uniform scale error 1.43). Offsetting x about 1.0 makes the mean O(1) so the wide route's split count, partial stride, and final divide are all under test." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 32], "tolerance": 0.0001, "relTolerance": 0.00001 } } |
| }, |
| { |
| "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": "f16_axis_split_wide_2x8192x32_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "f16 wide axis_split: 0.05 absolute tolerance against a 7e-5 mean is a min detectable uniform scale error of 710, so nothing multiplicative is observable on this route. Offsetting x about 1.0 makes the mean O(1) with an f16-resolution tolerance." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 32], "tolerance": 0.002, "relTolerance": 0.002 } } |
| }, |
| { |
| "name": "f16_rank3_axis1_serial", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [3, 2, 2], |
| "data": { "kind": "values", "values": [5.0, 1.0, 20.0, 2.0, 30.0, 1.0, 40.0, 2.0, 55.0, 1.0, 60.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [3, 2], "tolerance": 0.02 } } |
| }, |
| { |
| "name": "f16_last_axis_serial_fallback", |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 65], |
| "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2], "tolerance": 0.02, "relTolerance": 0.0001 } } |
| }, |
| { |
| "name": "f16_last_axis_serial_fallback_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The 65-column f16 row uses a different workgroup geometry (pow2ceil(65)=128) from the 1023-column scalar case, and its zero-mean sibling averages to 0.054 against a 0.02 absolute tolerance (min detectable uniform scale error 0.37) - still above the 0.1 blindness threshold. Offsetting x about 1.0 makes the mean O(1) at this geometry." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 65], |
| "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2], "tolerance": 0.002, "relTolerance": 0.002 } } |
| }, |
| { |
| "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.02 } } |
| }, |
| { |
| "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_axis0_splitk_8192x8_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The most tolerance-blind fixture in this op: f16_axis0_splitk_8192x8 has a min detectable uniform scale error of 1483 (0.05 absolute tolerance, 3.4e-5 max output), so halving, doubling, or dividing by the split height instead of 8192 all pass. Same rank-2 axis-0 f16 shape with x offset to oscillate about 1.0, so the mean is O(1) and the divisor is checked." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [8192, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.002, "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_vec4_8x1024_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "Last-axis vec4 (tree_last_axis_vec4 on the baseline tier, subgroup_last_axis_vec4 with subgroups): the zero-mean sibling averages 1024 columns to 4.8e-3 against a 0.05 absolute tolerance (min detectable uniform scale error 10.5), so a divide by the vec4 count rather than the column count is invisible. Offsetting x about 1.0 makes each row mean O(1)." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [8, 1024], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.002, "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_last_axis_scalar_8x1023_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The scalar last-axis route at 1023 columns (workgroup floor 256, so each lane walks a strided span with a ragged tail); the zero-mean sibling leaves 4.7e-3 against a 0.05 absolute tolerance (min detectable uniform scale error 10.6). Offsetting x about 1.0 makes the mean O(1) so a divisor of 1024 instead of 1023, or a lane span miscount, fails." |
| }, |
| "attrs": { "axes": [1], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [8, 1023], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.002, "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_all_axes_flat_65543_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "65543 is prime to the workgroup span, so the all_axes_flat partial pass runs a ragged tail; the zero-mean sibling reduces it to 5.4e-5 against a 0.05 absolute tolerance (min detectable uniform scale error 924), so a tail element counted twice or a divide by the padded length passes. Offsetting x about 1.0 makes the mean O(1) and any miscount of the element total shows up directly." |
| }, |
| "attrs": { "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [65543], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [], "tolerance": 0.002, "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_vec4_4x8x128_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The contiguous-suffix vec4 route (tree on the baseline tier, subgroup on the subgroup tiers) reduces 1024 suffix elements per row; the zero-mean sibling leaves 3.3e-3 against a 0.05 absolute tolerance (min detectable uniform scale error 15.3), so the suffix element count used as the divisor is unchecked. Offsetting x about 1.0 makes the suffix mean O(1) on both tiers." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.002, "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_suffix_scalar_4x7x37_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "The scalar contiguous-suffix route with a non-vectorizable suffix of 259: the zero-mean sibling leaves 5.1e-3 against a 0.05 absolute tolerance (min detectable uniform scale error 9.8). Offsetting x about 1.0 makes the mean O(1), so a divisor taken from a padded or rounded suffix length rather than 7*37 fails." |
| }, |
| "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, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [4], "tolerance": 0.002, "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": "f16_axis0_tilecols_4096x64_offset_mean_scale_lock", |
| "provenance": { |
| "notes": "axis0_tilecols reduces 4096 rows per column tile in one workgroup; the zero-mean sibling averages to 1e-4 against a 0.05 absolute tolerance (min detectable uniform scale error 509), so a divide by the tile column count rather than the row count is invisible. Offsetting x about 1.0 makes the column means O(1)." |
| }, |
| "attrs": { "axes": [0], "keepdims": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [4096, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.07, "scale": 0.2, "offset": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [64], "tolerance": 0.002, "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 } } |
| } |
| ] |
| } |
|
|