| { |
| "op": "ai.onnx.GroupNormalization", |
| "fixtureArrays": { |
| "batch2_groups2_f32_input_x": [1, 2, 3, 4, 5, 6, 7, 8, -1, -2, -3, -4, 8, 7, 6, 5], |
| "ort_rank3_equivalent_instance_norm_groups_equal_channels_input_x": [3.1513367, 9.283596, 1.4546119, 5.4617004, 8.519701, 1.2382338, 1.7930176, 5.1099434, 7.9195533, 7.638727, 8.065445, 3.8082376, 2.3667817, 2.8248506, 3.7754705, 5.861325, 5.058735, 3.2787242, 3.6843839, 9.755121, 2.7902672, 7.3974323, 8.283609, 8.488337], |
| "ort_rank3_group_size_n_input_x": [-1.1258, -1.1524, -0.2506, -0.4339, 0.8487, 0.692, -0.316, -2.1152, 0.3223, -1.2633, 0.35, 0.3081, 0.1198, 1.2377, 1.1168, -0.2473, -1.3527, -1.6959, 0.5667, 0.7935, 0.5988, -1.5551, -0.3414, 1.853, 0.7502, -0.5855, -0.1734, 0.1835, 1.3894, 1.5863, 0.9463, -0.8437, -0.6136, 0.0316, -0.4927, 0.2484, 0.4397, 0.1124, 0.6408, 0.4412, -0.1023, 0.7924, -0.2897, 0.0525, 0.5229, 2.3022, -1.4689, -1.5867], |
| "ort_rank3_group_size_n_output_y": [-0.759, -0.7848, 0.0914, -0.0867, 1.1595, 1.0073, 0.0278, -1.7203, 0.648, -0.8926, 0.6749, 0.6343, 0.0232, 0.9274, 0.8296, -0.2738, -1.1679, -1.4456, 0.3846, 0.5681, 0.4107, -1.3317, -0.3499, 1.4252, 0.5772, -0.8298, -0.3957, -0.0198, 1.2505, 1.458, 0.7838, -1.1017, -0.8594, -0.1798, -0.732, 0.0486, 0.2541, -0.0377, 0.4334, 0.2554, -0.2291, 0.5686, -0.3962, -0.0911, 0.3282, 1.9145, -1.4475, -1.5525], |
| "onnx_backend_group_normalization_example_input_x": [1.764052391052246, 0.40015721321105957, 0.978738009929657, 2.2408931255340576, 1.8675580024719238, -0.9772778749465942, 0.9500884413719177, -0.15135720372200012, -0.10321885347366333, 0.4105985164642334, 0.14404356479644775, 1.4542734622955322, 0.7610377073287964, 0.12167501449584961, 0.44386324286460876, 0.3336743414402008, 1.4940791130065918, -0.2051582634449005, 0.3130677044391632, -0.8540957570075989, -2.5529897212982178, 0.653618574142456, 0.8644362092018127, -0.7421650290489197, 2.269754648208618, -1.4543657302856445, 0.04575851559638977, -0.18718385696411133, 1.5327792167663574, 1.4693588018417358, 0.154947429895401, 0.37816253304481506, -0.8877857327461243, -1.980796456336975, -0.34791216254234314, 0.15634897351264954, 1.2302906513214111, 1.202379822731018, -0.38732680678367615, -0.302302747964859, -1.0485529899597168, -1.420017957687378, -1.7062702178955078, 1.950775384902954, -0.5096521973609924, -0.4380742907524109, -1.2527953386306763, 0.7774903774261475] |
| }, |
| "cases": [ |
| { |
| "name": "subgroup_vec4_2x8x16x16_g2", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 8, 16, 16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.21 } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.11, "scale": 0.5 } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.25 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 8, 16, 16], "tolerance": 0.000002 } } |
| }, |
| { |
| "name": "subgroup_scalar_1x4x7x7_g2", |
| "attrs": { "num_groups": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 7, 7], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.23 } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.07, "scale": 0.4 } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.13, "scale": 0.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 7, 7], "tolerance": 0.000002 } } |
| }, |
| { |
| "name": "f32_tiny_variance_epsilon_zero_gpu_gap", |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero in f32; each group's subnormal variance collapses to zero so normalization is non-finite." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_InstanceNorm_G_C", |
| "notes": "Valid epsilon=0 edge: each group has tiny normal centered values with positive subnormal variance, so normalization should be finite." |
| }, |
| "attrs": { "num_groups": 2, "epsilon": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2], |
| "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, -2e-20] } |
| }, |
| "scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 1.0] } }, |
| "bias": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.0, 0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 2], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "f32_subnormal_scale_instance_groups_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; the subnormal per-channel scale collapses to zero, losing the tiny affine output." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_InstanceNorm_G_C", |
| "notes": "Subnormal per-channel scale is valid and should preserve tiny affine outputs after otherwise ordinary normalization." |
| }, |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2], |
| "data": { "kind": "values", "values": [-1.0, 1.0, -2.0, 2.0] } |
| }, |
| "scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1e-40, -2e-40] } }, |
| "bias": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.0, 0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 2], "tolerance": 1e-44 } } |
| }, |
| { |
| "name": "f32_subnormal_scale_grouped_spatial_vec4_gpu_gap", |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: WebGPU/Metal flushes subnormals to zero in f32; the subnormal per-channel scale collapses to zero (grouped spatial vec4 path)." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.GroupSize_N", |
| "notes": "Larger grouped companion: subnormal scales should survive across channels and spatial positions." |
| }, |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": [-3.0, -1.0, 1.0, 3.0, -2.0, 0.0, 2.0, 4.0, 4.0, 2.0, 0.0, -2.0, 3.0, 1.0, -1.0, -3.0] |
| } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { "kind": "values", "values": [1e-40, -2e-40, 3e-40, -4e-40] } |
| }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 2, 2], "tolerance": 1e-44 } } |
| }, |
| { |
| "name": "nchw_groups2_f32", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 1, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.5, 0.5, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.25, -0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 1, 2] } }, |
| "tolerance": 0.00001 |
| }, |
| { |
| "name": "instance_equivalent_f16", |
| "attrs": { "num_groups": 4, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 4, 1, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } |
| }, |
| "scale": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.0, 1.0, 1.0] } }, |
| "bias": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 4, 1, 2] } }, |
| "tolerance": 0.002 |
| }, |
| { |
| "name": "layernorm_equivalent_one_group_f32", |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 2, 1], |
| "data": { "kind": "values", "values": [-3.0, -1.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0] } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 0.5, -1.0, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 1.0, -2.0, 3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 2, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "zero_variance_bias_only", |
| "attrs": { "num_groups": 2, "epsilon": 0.001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 1, 2], |
| "data": { "kind": "values", "values": [7.0, 7.0, 7.0, 7.0, -3.0, -3.0, -3.0, -3.0] } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [10.0, -2.0, 3.0, 4.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, -1.0, 2.0, -3.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "batch2_groups2_f32", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 4, 1, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/batch2_groups2_f32_input_x" } } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.5, 0.5, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.25, -0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 1, 2], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "rank5_ncdhw_groups2_f32", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 2, 1, 2], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/batch2_groups2_f32_input_x" } } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.5, 0.5, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.25, -0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 2, 1, 2], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "ort_rank3_equivalent_instance_norm_groups_equal_channels", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_InstanceNorm_G_C" |
| }, |
| "attrs": { "num_groups": 3, "epsilon": 0.3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_rank3_equivalent_instance_norm_groups_equal_channels_input_x" } |
| } |
| }, |
| "scale": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 1.0, 1.0] } }, |
| "bias": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [0.0, 0.0, 0.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [-0.56495477, 1.48930046, -1.13334329, 0.20899761, 1.46688162, -0.98600774, -0.79911913, 0.31824524, 0.57370438, 0.42193634, 0.6525492, -1.64818992, -0.92380346, -0.60808484, 0.04711878, 1.48476953, -0.14644464, -0.82262872, -0.66852817, 1.63760153, -1.65898662, 0.27618144, 0.64840618, 0.734399] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_rank3_equivalent_instance_norm_groups_equal_channels_f16", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_InstanceNorm_G_C", |
| "notes": "MLFloat16 typed variant of the ORT GroupNormalization instance-normalization case." |
| }, |
| "attrs": { "num_groups": 3, "epsilon": 0.3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_rank3_equivalent_instance_norm_groups_equal_channels_input_x" } |
| } |
| }, |
| "scale": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.0, 1.0, 1.0] } }, |
| "bias": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [0.0, 0.0, 0.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 3, 4], "tolerance": 0.003 } } |
| }, |
| { |
| "name": "ort_rank3_equivalent_layer_norm_one_group", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_LayerNorm_G_1" |
| }, |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| }, |
| "scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 1.0] } }, |
| "bias": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [2.0, 1.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 2, 3], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.5361, 1.1216, 1.7072, 1.2928, 1.8783, 2.4638] } |
| } |
| } |
| }, |
| { |
| "name": "ort_rank3_equivalent_layer_norm_one_group_f16", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.Equivalent_LayerNorm_G_1", |
| "notes": "MLFloat16 typed variant of ORT's GroupNormalization-as-LayerNorm case." |
| }, |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 2, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| }, |
| "scale": { "dtype": "float16", "shape": [2], "data": { "kind": "values", "values": [1.0, 1.0] } }, |
| "bias": { "dtype": "float16", "shape": [2], "data": { "kind": "values", "values": [2.0, 1.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 2, 3], |
| "tolerance": 0.001, |
| "data": { "kind": "values", "values": [0.5361, 1.1216, 1.7072, 1.2928, 1.8783, 2.4638] } |
| } |
| } |
| }, |
| { |
| "name": "ort_rank3_group_size_n", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.GroupSize_N" |
| }, |
| "attrs": { "num_groups": 2, "epsilon": 0.3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 6, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_rank3_group_size_n_input_x" } } |
| }, |
| "scale": { "dtype": "float32", "shape": [6], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float32", "shape": [6], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [2, 6, 4], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_rank3_group_size_n_output_y" } } |
| } |
| } |
| }, |
| { |
| "name": "ort_rank3_group_size_n_f16", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/group_norm_op_test.cc", |
| "test": "GroupNormalizationOpTest.GroupSize_N", |
| "notes": "MLFloat16 typed variant of ORT's six-channel, two-group normalization case; ORT uses 0.005 output tolerance for the fp16 typed test." |
| }, |
| "attrs": { "num_groups": 2, "epsilon": 0.3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 6, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_rank3_group_size_n_input_x" } } |
| }, |
| "scale": { "dtype": "float16", "shape": [6], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float16", "shape": [6], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [2, 6, 4], |
| "tolerance": 0.005, |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_rank3_group_size_n_output_y" } } |
| } |
| } |
| }, |
| { |
| "name": "onnx_backend_group_normalization_example", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_group_normalization_example" }, |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 4, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/onnx_backend_group_normalization_example_input_x" } |
| } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { |
| "kind": "values", |
| "values": [-1.6138978004455566, -0.21274028718471527, -0.8954665660858154, 0.38690251111984253] |
| } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { |
| "kind": "values", |
| "values": [-0.5108051300048828, -1.18063223361969, -0.02818222902715206, 0.4283318817615509] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 4, 2, 2], "tolerance": 0.00005 } } |
| }, |
| { |
| "name": "onnx_backend_group_normalization_epsilon", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_group_normalization_epsilon" }, |
| "attrs": { "num_groups": 2, "epsilon": 0.009999999776482582 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [3, 4, 2, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/onnx_backend_group_normalization_example_input_x" } |
| } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { |
| "kind": "values", |
| "values": [-1.6138978004455566, -0.21274028718471527, -0.8954665660858154, 0.38690251111984253] |
| } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [4], |
| "data": { |
| "kind": "values", |
| "values": [-0.5108051300048828, -1.18063223361969, -0.02818222902715206, 0.4283318817615509] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [3, 4, 2, 2], "tolerance": 0.00005 } } |
| }, |
| { |
| "name": "empty_zero_dim", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [0, 8, 16, 16], "data": { "kind": "values", "values": [] } }, |
| "scale": { "dtype": "float32", "shape": [8], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float32", "shape": [8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [0, 8, 16, 16], "tolerance": 0 } } |
| }, |
| { |
| "name": "empty_zero_dim_f16", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { "dtype": "float16", "shape": [0, 8, 16, 16], "data": { "kind": "values", "values": [] } }, |
| "scale": { "dtype": "float16", "shape": [8], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float16", "shape": [8], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [0, 8, 16, 16], "tolerance": 0 } } |
| }, |
| { |
| "name": "empty_zero_channels", |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [2, 0, 4, 4], "data": { "kind": "values", "values": [] } }, |
| "scale": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } }, |
| "bias": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 0, 4, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "f16_instance_norm_4d_vec4_1x16x8x8_g16", |
| "attrs": { "num_groups": 16, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 16, 8, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.19, "scale": 1.5 } |
| }, |
| "scale": { |
| "dtype": "float16", |
| "shape": [16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.27, "cosStep": 0.13, "scale": 0.5, "offset": 1.0 } |
| }, |
| "bias": { |
| "dtype": "float16", |
| "shape": [16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.09, "cosStep": 0.17, "scale": 0.25 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 16, 8, 8], "tolerance": 0.02 } } |
| }, |
| { |
| "name": "f16_groupnorm_4d_vec4_cpg4_1x32x14x14_g8", |
| "attrs": { "num_groups": 8, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 32, 14, 14], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.23, "scale": 2.0 } |
| }, |
| "scale": { |
| "dtype": "float16", |
| "shape": [32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.07, "scale": 0.4, "offset": 1.0 } |
| }, |
| "bias": { |
| "dtype": "float16", |
| "shape": [32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.29, "scale": 0.3 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 32, 14, 14], "tolerance": 0.03 } } |
| }, |
| { |
| "name": "rank6_vec4_g2_distinct_affine", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 2, 2, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.21, "scale": 1.5 } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -2.0, 0.5, 3.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.25, -1.0, 2.0, -0.5] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 2, 2, 2, 2], "tolerance": 0.00002 } } |
| }, |
| { |
| "name": "vec4_layernorm_equiv_g1_distinct_per_channel_affine", |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 8, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.23, "scale": 2.0 } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [1.0, -2.0, 0.5, 3.0, -1.5, 2.5, -0.5, 4.0] } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [0.0, 1.0, -0.5, 2.0, -1.0, 0.5, 3.0, -2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 8, 4, 4], "tolerance": 0.00002 } } |
| }, |
| { |
| "name": "scalar_layernorm_equiv_g1_distinct_affine_odd_spatial", |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 8, 5, 5], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.29, "scale": 1.75 } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [1.0, -2.0, 0.5, 3.0, -1.5, 2.5, -0.5, 4.0] } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { "kind": "values", "values": [0.0, 1.0, -0.5, 2.0, -1.0, 0.5, 3.0, -2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 8, 5, 5], "tolerance": 0.00002 } } |
| }, |
| { |
| "name": "vec4_instance_equiv_gEqC_distinct_scale_per_channel", |
| "attrs": { "num_groups": 6, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 6, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.07, "scale": 1.25 } |
| }, |
| "scale": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [1.0, -2.0, 0.5, 3.0, -1.5, 2.5] } |
| }, |
| "bias": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [0.0, 1.0, -0.5, 2.0, -1.0, 0.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 6, 4, 4], "tolerance": 0.00002 } } |
| }, |
| { |
| "name": "group_splitk_layernorm_equiv_65536", |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 16, 64, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5 } |
| }, |
| "scale": { "dtype": "float32", "shape": [16], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float32", "shape": [16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 16, 64, 64], "tolerance": 0.0002 } } |
| }, |
| { |
| "name": "rank7_spatial", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 1, 2, 1, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29, "scale": 2.0 } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 0.5, 1.5, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.25, -0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 1, 2, 1, 2, 2], "tolerance": 0.000002 } } |
| }, |
| { |
| "name": "onnx21_f16_stash_float16_rounding", |
| "provenance": { |
| "source": "onnx/defs/nn/defs.cc GroupNormalization-21 function body", |
| "notes": "TensorProto FLOAT16 stash (10). Sequential f16 stage arithmetic produces outputs separated by multiple f16 ULPs from the default float32-stash route." |
| }, |
| "requires": { "features": ["shader-f16"] }, |
| "attrs": { "num_groups": 1, "epsilon": 0.00001, "stash_type": 10 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 2, 1, 2], |
| "data": { "kind": "values", "values": [-3.650390625, -2.51171875, -3.216796875, -2.568359375] } |
| }, |
| "scale": { "dtype": "float16", "shape": [2], "data": { "kind": "values", "values": [1.6484375, 3.365234375] } }, |
| "bias": { |
| "dtype": "float16", |
| "shape": [2], |
| "data": { "kind": "values", "values": [-0.26123046875, 1.74609375] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 2, 1, 2], |
| "tolerance": 0.002, |
| "relTolerance": 0, |
| "data": { "kind": "values", "values": [-2.59375, 1.41796875, 0.1025390625, 4.765625] } |
| } |
| } |
| }, |
| { |
| "name": "onnx21_f32_stash_float16_rounding", |
| "provenance": { |
| "source": "onnx/defs/nn/defs.cc GroupNormalization-21 function body", |
| "notes": "TensorProto FLOAT16 stash (10) with float32 T. Non-f16 input and affine values expose both the cast into float16 stage one and the required cast back to float32 before scale and bias." |
| }, |
| "requires": { "features": ["shader-f16"] }, |
| "attrs": { "num_groups": 1, "epsilon": 0.00001, "stash_type": 10 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2], |
| "data": { "kind": "values", "values": [-3.6501, -2.5113, -3.2172, -2.5687] } |
| }, |
| "scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.6483, 3.3657] } }, |
| "bias": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [-0.2612, 1.7463] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2], |
| "tolerance": 0.000001, |
| "relTolerance": 0, |
| "data": { |
| "kind": "values", |
| "values": [-2.593608856201172, 1.417683720588684, 0.10207010805606842, 4.7668843269348145] |
| } |
| } |
| } |
| }, |
| { |
| "name": "rank8_spatial", |
| "attrs": { "num_groups": 2, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 1, 2, 1, 2, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.27 } |
| }, |
| "scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 0.5, -1.0, 2.0] } }, |
| "bias": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.25, -0.5, 1.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 1, 2, 1, 2, 2, 2], "tolerance": 0.000002 } } |
| }, |
| { |
| "name": "group_splitk_layernorm_equiv_65536_f16", |
| "provenance": { |
| "notes": "float16 twin of the split-K group reduction. Only f32 cases reached the split-K partial and apply shaders, so neither had ever emitted its f16 declaration." |
| }, |
| "attrs": { "num_groups": 1, "epsilon": 0.00001 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 16, 64, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.027, "scale": 0.5 } |
| }, |
| "scale": { "dtype": "float16", "shape": [16], "data": { "kind": "constant", "value": 1.0 } }, |
| "bias": { "dtype": "float16", "shape": [16], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 16, 64, 64], "tolerance": 0.02 } } |
| } |
| ] |
| } |
|
|