| { |
| "op": "ai.onnx.Resize", |
| "fixtureArrays": { |
| "resize_5d_ramp_64": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63], |
| "resize_4x4_ramp": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], |
| "ort_linear_downsample_odd_third_3x6_to_1x2_input_x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], |
| "ort_cubic_align_corners_floor_nchw_input_x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], |
| "ort_linear_axes_scales_5d_output_y": [3.5, 4.8333335, 6.1666665, 8.833333, 10.166667, 11.5, 14.166667, 15.5, 16.833334, 24.833334, 26.166666, 27.5, 30.166666, 31.5, 32.833332, 35.5, 36.833332, 38.166668, 46.166668, 47.5, 48.833332, 51.5, 52.833332, 54.166668, 56.833332, 58.166668, 59.5] |
| }, |
| "cases": [ |
| { |
| "name": "linear_align_corners_exact_subnormal_pixel_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 f32 flushes subnormals to zero (Metal/Dawn FTZ), so a positive-subnormal payload (1e-40) carried through an exact-pixel linear resize cannot survive on the GPU; CPU-reference-only." |
| }, |
| "provenance": { |
| "notes": "Linear align_corners resize to a singleton spatial output samples the exact top-left source pixel, so a positive subnormal payload should survive." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 2], |
| "data": { "kind": "values", "values": [1e-40, 0.0, 0.0, 0.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_half_pixel_2x_f32", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 4] } } |
| }, |
| { |
| "name": "linear_align_corners_f32", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 3, 3] } }, |
| "tolerance": 0.000001 |
| }, |
| { |
| "name": "linear_f16", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { "dtype": "float16", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 4, 4] } }, |
| "tolerance": 0.002 |
| }, |
| { |
| "name": "nearest_round_prefer_ceil_ties", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 4], |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_round_prefer_floor_near_half_scale", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSampleTest", |
| "notes": "Valid near-half source coordinate: output column 1 maps to 0.5000006, which is above the round_prefer_floor tie and should select input column 1." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor", |
| "scales": [1, 1, 1, 1.499999] |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1, 2], "data": { "kind": "values", "values": [10.0, 20.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 2], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [10.0, 20.0] } |
| } |
| } |
| }, |
| { |
| "name": "nearest_asymmetric_inferred_scale_half_tie", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpNearestDownSampleTest_tf", |
| "notes": "With sizes-driven 7-to-2 downsampling, output column 1 maps to exactly 3.5; round_prefer_ceil must choose source column 4, not an f32-rounded column 3." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 7], |
| "data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 2], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [0.0, 4.0] } |
| } |
| } |
| }, |
| { |
| "name": "nearest_floor_align_corners_ort_4x4_to_8x8", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "align_corners", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8], "tolerance": 0 } }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample_Floor_Align_Corners" |
| } |
| }, |
| { |
| "name": "nearest_round_prefer_ceil_half_pixel_ort_2x2_to_7x8", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 7, 8], "tolerance": 0 } }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample_RoundPreferCeil_HalfPixel_2x2to7x8" |
| } |
| }, |
| { |
| "name": "nearest_round_prefer_ceil_half_pixel_gh28291_tie", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 20], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 0.052631579, 0.105263158, 0.157894737, 0.210526316, 0.263157895, 0.315789474, 0.368421053, 0.421052632, 0.473684211, 0.526315789, 0.578947368, 0.631578947, 0.684210526, 0.736842105, 0.789473684, 0.842105263, 0.894736842, 0.947368421, 1.0] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 6], "tolerance": 0.000001 } }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample_RoundPreferCeil_HalfPixel_GH28291_Regression" |
| } |
| }, |
| { |
| "name": "linear_pytorch_half_pixel_downsample_ort", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_2DBilinear_pytorch_half_pixel", |
| "notes": "Projects ORT's rank-2 PyTorch half-pixel downsample into rank-4 NCHW form." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "pytorch_half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "linear_align_corners_non_square_multichannel", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 2, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, -1.0, -2.0, -4.0, -8.0, -16.0, -32.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 4, 5], "tolerance": 0.000003 } } |
| }, |
| { |
| "name": "nearest_ceil_asymmetric_downsample", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "ceil" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 7], |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_linear_downsample_half_scale_2x4_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_4DBilinear1" |
| }, |
| "attrs": { "mode": "linear" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_linear_downsample_explicit_scale_point6_2x4_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_4DBilinear", |
| "notes": "ORT supplies explicit spatial scales of 0.6; output shape alone would imply 0.5, so this catches accidental scale inference." |
| }, |
| "attrs": { "mode": "linear", "scales": [1, 1, 0.6, 0.6] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], |
| "tolerance": 0.000001, |
| "data": { "kind": "values", "values": [2.6666665, 4.3333331] } |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_downsample_odd_third_3x6_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_4DBilinear1_OddNumber" |
| }, |
| "attrs": { "mode": "linear" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 6], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_linear_downsample_odd_third_3x6_to_1x2_input_x" } |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_linear_align_corners_sizes_2x4_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_4DBilinear_align_corners_sizes" |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_nearest_downsample_default_half_pixel_2x4_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestDownSampleTest" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_nearest_downsample_with_sizes_2x4_to_1x3", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestDownSampleTest_WithSizes" |
| }, |
| "attrs": { "mode": "nearest" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_nearest_ceil_sizes_2x2_to_7x8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSampleTest_WithSizes_CeilMode" |
| }, |
| "attrs": { "mode": "nearest", "nearest_mode": "ceil" }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 7, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_nearest_ceil_sizes_rank5_2x2_to_7x8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample5dTest_WithSizes_CeilMode", |
| "notes": "Direct rank-5 NCDHW sibling of the ORT rank-4 ceil-mode sizes test." |
| }, |
| "attrs": { "mode": "nearest", "nearest_mode": "ceil" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 2, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 7, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_nearest_asymmetric_rank5_scale_1p5", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSampleTest_5D_CudaRegression_Optimized3DMapping", |
| "notes": "Covers rank-5 nearest-neighbor upsampling by 1.5 with asymmetric coordinates." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "floor", |
| "scales": [1, 1, 1.5, 1.5, 1.5] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 2, 2], |
| "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": [1, 1, 3, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 1.0, 2.0, 1.0, 1.0, 2.0, 3.0, 3.0, 4.0, 1.0, 1.0, 2.0, 1.0, 1.0, 2.0, 3.0, 3.0, 4.0, 5.0, 5.0, 6.0, 5.0, 5.0, 6.0, 7.0, 7.0, 8.0] |
| }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_nearest_asymmetric_rank5_downsample_0p5", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestDownSampleTest_5D_CudaRegression_Optimized3DMapping", |
| "notes": "Covers rank-5 nearest-neighbor downsampling by 0.5 with asymmetric coordinates." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "floor", |
| "scales": [1, 1, 0.5, 0.5, 0.5] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 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, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 2, 2], |
| "data": { "kind": "values", "values": [1.0, 3.0, 9.0, 11.0, 33.0, 35.0, 41.0, 43.0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_asymmetric_upsample_batch2_2x2_to_4x8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearUpSampleTest_4DBilinear_asymmetric_scales" |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 2], |
| "data": { "kind": "values", "values": [1.0, 3.0, 4.0, 8.0, 6.0, 2.0, 7.0, 11.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 4, 8], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_linear_noop_scales_batch2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearScalesNoOpTest" |
| }, |
| "attrs": { "mode": "linear" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 2], |
| "data": { "kind": "values", "values": [1.0, 3.0, 4.0, 8.0, 6.0, 2.0, 7.0, 11.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_nearest_round_prefer_ceil_half_pixel_26_to_64", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample_RoundPreferCeil_HalfPixel" |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 26], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 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, 25.0] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 64], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_linear_5d_trilinear_pytorch_half_pixel", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearUpSampleTest_5DTrilinear_pytorch_half_pixel", |
| "notes": "Valid NCDHW trilinear Resize case from ORT." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "pytorch_half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 2, 1, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 1.0, 2.0, 1.0, 2.0, 1.0, 2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 4, 2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_linear_align_corners_rank2_projection_2x2_to_4x8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearUpSampleTest_2DBilinear_align_corners", |
| "notes": "Projects ORT's rank-2 align-corners bilinear upsample into rank-4 NCHW form." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 3.0, 4.0, 8.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 8], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "ort_nearest_asymmetric_floor_2x_2x2_to_4x4", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpNearestUpSample_Nearest2xOptimization_Scales" |
| }, |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_linear_half_pixel_symmetric_downsample_scales", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpHalfPixelSymmetricDownSample_ver19", |
| "notes": "ONNX scales input represented by `scales` adaptation so half_pixel_symmetric can use fractional output width." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel_symmetric", "scales": [1, 1, 1, 0.6] }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 1, 4], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 2], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "ort_linear_half_pixel_symmetric_upsample_scales", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpHalfPixelSymmetricUpSample_ver19", |
| "notes": "ONNX scales input represented by `scales` adaptation so half_pixel_symmetric can use fractional output width." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel_symmetric", |
| "scales": [1, 1, 2.3, 2.94] |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 5], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "onnx_backend_resize_downsample_scales_linear", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_downsample_scales_linear", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "linear" } |
| }, |
| { |
| "name": "onnx_backend_resize_downsample_scales_linear_align_corners", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_downsample_scales_linear_align_corners", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0.0001 } }, |
| "attrs": { "coordinate_transformation_mode": "align_corners", "mode": "linear" } |
| }, |
| { |
| "name": "onnx_backend_resize_downsample_scales_nearest", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_downsample_scales_nearest", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "nearest" } |
| }, |
| { |
| "name": "onnx_backend_resize_downsample_sizes_linear_pytorch_half_pixel", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_downsample_sizes_linear_pytorch_half_pixel", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 3, 1], "tolerance": 0.0001 } }, |
| "attrs": { "coordinate_transformation_mode": "pytorch_half_pixel", "mode": "linear" } |
| }, |
| { |
| "name": "onnx_backend_resize_downsample_sizes_nearest", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_downsample_sizes_nearest", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 3], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "nearest" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_scales_linear", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_scales_linear", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 4], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "linear" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_scales_linear_align_corners", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_scales_linear_align_corners", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 4], "tolerance": 0.0001 } }, |
| "attrs": { "coordinate_transformation_mode": "align_corners", "mode": "linear" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_scales_nearest", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_scales_nearest", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 6], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "nearest" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_sizes_nearest", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_sizes_nearest", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 7, 8], "tolerance": 0.0001 } }, |
| "attrs": { "mode": "nearest" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_sizes_nearest_ceil_half_pixel", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_sizes_nearest_ceil_half_pixel", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8], "tolerance": 0.0001 } }, |
| "attrs": { "coordinate_transformation_mode": "half_pixel", "mode": "nearest", "nearest_mode": "ceil" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_sizes_nearest_floor_align_corners", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_sizes_nearest_floor_align_corners", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8], "tolerance": 0.0001 } }, |
| "attrs": { "coordinate_transformation_mode": "align_corners", "mode": "nearest", "nearest_mode": "floor" } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric", |
| "notes": "Official scales/sizes input is represented by the fixture output shape in this framework." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8], "tolerance": 0.0001 } }, |
| "attrs": { |
| "coordinate_transformation_mode": "asymmetric", |
| "mode": "nearest", |
| "nearest_mode": "round_prefer_ceil" |
| } |
| }, |
| { |
| "name": "onnx_backend_resize_upsample_scales_nearest_axes_2_3_shape", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_resize_upsample_scales_nearest_axes_2_3", |
| "notes": "Official axes/scales inputs map to the full NCHW output shape; test_resize_upsample_scales_nearest_axes_3_2 and ORT ResizeOpNearestUpSampleTest map to this same request." |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 6], "tolerance": 0 } }, |
| "attrs": { "mode": "nearest" } |
| }, |
| { |
| "name": "ort_cubic_half_pixel_2x2_to_4x4", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicUpSampleTest", |
| "notes": "Compact ORT CPU-derived cubic half-pixel case using cubic_coeff_a=-0.75." |
| }, |
| "attrs": { "mode": "cubic", "coordinate_transformation_mode": "half_pixel", "cubic_coeff_a": -0.75 }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { |
| "kind": "values", |
| "values": [0.68359375, 1.015625, 1.5625, 1.89453125, 1.34765625, 1.6796875, 2.2265625, 2.55859375, 2.44140625, 2.7734375, 3.3203125, 3.65234375, 3.10546875, 3.4375, 3.984375, 4.31640625] |
| }, |
| "tolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_downsample_coeff_minus_half", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicDownSampleTest_coeff", |
| "notes": "Valid cubic downsample with cubic_coeff_a=-0.5." |
| }, |
| "attrs": { "mode": "cubic", "cubic_coeff_a": -0.5, "scales": [1, 1, 0.8, 0.8] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.38574, 2.68359, 4.00684, 6.57715, 7.875, 9.19824, 11.8701, 13.168, 14.4912] |
| }, |
| "tolerance": 0.0001 |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_pytorch_half_pixel_boundary_clamp", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicDownSample_PytorchHalfPixel_GH28292_SpecDifference", |
| "notes": "Covers ONNX cubic boundary clamping with pytorch_half_pixel coordinates." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "coordinate_transformation_mode": "pytorch_half_pixel", |
| "cubic_coeff_a": -0.5, |
| "antialias": 0, |
| "scales": [1, 1, 0.5, 0.5] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 8, 8], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 0.015873016, 0.031746034, 0.04761905, 0.06349207, 0.07936508, 0.0952381, 0.11111111, 0.12698413, 0.14285715, 0.15873016, 0.17460318, 0.1904762, 0.20634921, 0.22222222, 0.23809524, 0.25396827, 0.26984128, 0.2857143, 0.3015873, 0.31746033, 0.33333334, 0.34920636, 0.36507937, 0.3809524, 0.3968254, 0.41269842, 0.42857143, 0.44444445, 0.46031746, 0.47619048, 0.4920635, 0.50793654, 0.52380955, 0.53968257, 0.5555556, 0.5714286, 0.5873016, 0.6031746, 0.61904764, 0.63492066, 0.6507937, 0.6666667, 0.6825397, 0.6984127, 0.71428573, 0.73015875, 0.74603176, 0.7619048, 0.7777778, 0.7936508, 0.8095238, 0.82539684, 0.84126985, 0.85714287, 0.8730159, 0.8888889, 0.9047619, 0.9206349, 0.93650794, 0.95238096, 0.96825397, 0.984127, 1.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { |
| "kind": "values", |
| "values": [0.0625, 0.0952381, 0.12698413, 0.15972222, 0.32440478, 0.35714287, 0.3888889, 0.42162699, 0.57837301, 0.61111116, 0.64285719, 0.67559528, 0.84027779, 0.87301588, 0.90476191, 0.9375] |
| }, |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001 |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_align_corners_floor_nchw", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NoAntialias_AlignCorners_Cubic_Floor_NCHW", |
| "notes": "Valid cubic align_corners fixture from ORT." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "coordinate_transformation_mode": "align_corners", |
| "cubic_coeff_a": -0.75, |
| "antialias": 0, |
| "exclude_outside": 0, |
| "extrapolation_value": 0, |
| "nearest_mode": "floor" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_cubic_align_corners_floor_nchw_input_x" } |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 2, 6, 8], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 1.34111, 1.80029, 2.32945, 2.67055, 3.19971, 3.65889, 4.0, 2.264, 2.60511, 3.06429, 3.59345, 3.93455, 4.46371, 4.92289, 5.264, 3.912, 4.25311, 4.71229, 5.24145, 5.58256, 6.11171, 6.5709, 6.912, 6.088, 6.42911, 6.88829, 7.41745, 7.75856, 8.28771, 8.7469, 9.08801, 7.736, 8.07711, 8.53629, 9.06545, 9.40655, 9.93571, 10.3949, 10.736, 9.0, 9.34111, 9.80029, 10.3295, 10.6706, 11.1997, 11.6589, 12.0, 13.0, 13.3411, 13.8003, 14.3295, 14.6706, 15.1997, 15.6589, 16.0, 14.264, 14.6051, 15.0643, 15.5934, 15.9346, 16.4637, 16.9229, 17.264, 15.912, 16.2531, 16.7123, 17.2415, 17.5826, 18.1117, 18.5709, 18.912, 18.088, 18.4291, 18.8883, 19.4175, 19.7586, 20.2877, 20.7469, 21.088, 19.736, 20.0771, 20.5363, 21.0654, 21.4066, 21.9357, 22.3949, 22.736, 21.0, 21.3411, 21.8003, 22.3295, 22.6706, 23.1997, 23.6589, 24.0] |
| }, |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001 |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_align_corners_floor_nhwc", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_sample_test_gen.py", |
| "test": "ResizeOpTest.NoAntialias_AlignCorners_Cubic_Floor_NHWC", |
| "notes": "Covers rank-4 cubic align_corners with NHWC-style height and width resize axes, using pinned ORT expectations." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "coordinate_transformation_mode": "align_corners", |
| "cubic_coeff_a": -0.75, |
| "antialias": 0, |
| "exclude_outside": 0, |
| "extrapolation_value": 0, |
| "nearest_mode": "floor" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 4, 2], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_cubic_align_corners_floor_nchw_input_x" } |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 6, 8, 2], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 2.0, 1.6822, 2.6822, 2.6006, 3.6006, 3.6589, 4.6589, 4.3411, 5.3411, 5.3994, 6.3994, 6.3178, 7.3178, 7.0, 8.0, 3.528, 4.528, 4.2102, 5.2102, 5.1286, 6.1286, 6.1869, 7.1869, 6.8691, 7.8691, 7.9274, 8.9274, 8.8458, 9.8458, 9.528, 10.528, 6.824, 7.824, 7.5062, 8.5062, 8.4246, 9.4246, 9.4829, 10.4829, 10.1651, 11.1651, 11.2234, 12.2234, 12.1418, 13.1418, 12.824, 13.824, 11.176, 12.176, 11.8582, 12.8582, 12.7766, 13.7766, 13.8349, 14.8349, 14.5171, 15.5171, 15.5754, 16.5754, 16.4938, 17.4938, 17.176, 18.176, 14.472, 15.472, 15.1542, 16.1542, 16.0726, 17.0726, 17.1309, 18.1309, 17.8131, 18.8131, 18.8714, 19.8714, 19.7898, 20.7898, 20.472, 21.472, 17.0, 18.0, 17.6822, 18.6822, 18.6006, 19.6006, 19.6589, 20.6589, 20.3411, 21.3411, 21.3994, 22.3994, 22.3178, 23.3178, 23.0, 24.0] |
| }, |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001 |
| } |
| } |
| }, |
| { |
| "name": "ort_antialias_bilinear_no_exclude_outside", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Bilinear_No_ExcludeOutside", |
| "notes": "Uses axes-relative scales, including a negative axis, for the same 4x4 to 3x3 antialiased downsample." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel", |
| "antialias": 1, |
| "exclude_outside": 0, |
| "axes": [2, -1], |
| "scales": [0.75, 0.75] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [2.3636363, 3.590909, 4.818182, 7.2727275, 8.5, 9.727273, 12.181818, 13.409091, 14.636364] |
| }, |
| "tolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_antialias_bilinear_exclude_outside", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Bilinear_ExcludeOutside", |
| "notes": "Valid antialiased linear downsample." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel", |
| "antialias": 1, |
| "exclude_outside": 1 |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "data": { "kind": "values", "values": [2.5, 3.7, 4.9, 7.3, 8.5, 9.7, 12.1, 13.3, 14.5] }, |
| "tolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_nearest_uint8_2x2_to_4x4", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearDownSampleTest_4DBilinear_uint8", |
| "notes": "Compact NCHW nearest uint8 adaptation to preserve integer tensor support." |
| }, |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [10, 20, 30, 40] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "uint8", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": [10, 10, 20, 20, 10, 10, 20, 20, 30, 30, 40, 40, 30, 30, 40, 40] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "f32_antialias_linear_8x_downsample_compact", |
| "provenance": { |
| "source": "onnxruntime CPU EP (local run, opset 19)", |
| "test": "Resize linear antialias 8x downsample, scales [1,1,0.125,0.125]", |
| "notes": "Expected values computed with ORT CPU on the exact fillFloat32(0.017,0.031,0.5) input; pinned inline because the antialias case previously carried a stale skipGpu." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel", |
| "antialias": 1, |
| "scales": [1, 1, 0.125, 0.125] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 4, 32, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.031, "scale": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 4, 4, 4], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [0.14381, 0.134832, 0.122264, 0.107406, 0.010124, 0.021276, 0.032032, 0.041531, -0.058779, -0.062911, -0.066305, -0.068616, 0.049954, 0.043287, 0.034385, 0.023672, 0.033038, 0.038028, 0.042104, 0.045359, -0.060355, -0.056795, -0.052536, -0.047923, 0.018086, 0.006446, -0.005784, -0.017588, 0.145374, 0.151656, 0.15382, 0.151574, -0.103847, -0.109422, -0.113012, -0.11396, -0.011121, -0.019306, -0.02784, -0.036078, 0.072642, 0.069839, 0.065722, 0.0607, 0.041272, 0.058634, 0.073706, 0.08536, -0.05019, -0.07342, -0.095276, -0.113782, 0.074633, 0.069684, 0.062911, 0.054858, 0.004398, 0.011032, 0.017827, 0.024365, -0.069399, -0.067173, -0.06541, -0.064116] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_nearest_int8_2x2_to_4x4", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearDownSampleTest_4DBilinear_int8", |
| "notes": "Compact NCHW nearest int8 adaptation to preserve signed integer tensor support." |
| }, |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { "dtype": "int8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [-8, -1, 7, 12] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "int8", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": [-8, -8, -1, -1, -8, -8, -1, -1, 7, 7, 12, 12, 7, 7, 12, 12] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_nhwc_linear_asymmetric_uint8_upsample", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearUpSampleTest_4DBilinear_asymmetric_uint8" |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { |
| "dtype": "uint8", |
| "shape": [2, 2, 2, 1], |
| "data": { "kind": "values", "values": [1, 3, 4, 8, 6, 2, 7, 11] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "uint8", |
| "shape": [2, 4, 8, 1], |
| "data": { |
| "kind": "values", |
| "values": [1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 4, 4, 5, 5, 5, 5, 4, 5, 6, 7, 8, 8, 8, 8, 4, 5, 6, 7, 8, 8, 8, 8, 6, 5, 4, 3, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 11, 11, 11, 7, 8, 9, 10, 11, 11, 11, 11] |
| }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_nhwc_linear_asymmetric_int8_upsample", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearUpSampleTest_4DBilinear_asymmetric_int8" |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { |
| "dtype": "int8", |
| "shape": [2, 2, 2, 1], |
| "data": { "kind": "values", "values": [1, -3, -4, 8, 6, -2, -7, 11] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "int8", |
| "shape": [2, 4, 8, 1], |
| "data": { |
| "kind": "values", |
| "values": [1, 0, -1, -2, -3, -3, -3, -3, -1, 0, 0, 1, 2, 2, 2, 2, -4, -1, 2, 5, 8, 8, 8, 8, -4, -1, 2, 5, 8, 8, 8, 8, 6, 4, 2, 0, -2, -2, -2, -2, 0, 0, 2, 3, 4, 4, 4, 4, -7, -2, 2, 6, 11, 11, 11, 11, -7, -2, 2, 6, 11, 11, 11, 11] |
| }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_3x_integer_scale", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 12, 12], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_4x_integer_scale", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.41 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 16, 16], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_mixed_3x2_integer_scale", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.31 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 9, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_nonsquare_2x_scalar_path", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 3, 5], |
| "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.37 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 6, 10], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_half_pixel_round_prefer_floor_3x_integer_scale", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 6, 12], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_half_pixel_round_prefer_ceil_2x_integer_scale", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_ceil" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.13 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 6, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_2x_integer_scale_f16", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { "dtype": "float16", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 1, 4, 4], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 1.0, 2.0, 2.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 3.0, 3.0, 4.0, 4.0] |
| }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "nearest_half_pixel_default_2x_larger_grid", |
| "attrs": { "mode": "nearest" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 64, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.43 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 3, 128, 128], "tolerance": 0 } } |
| }, |
| { |
| "name": "linear_half_pixel_2x_stencil_multichannel", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 8, 16], |
| "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.33 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 16, 32] } } |
| }, |
| { |
| "name": "linear_pytorch_half_pixel_2x_stencil", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "pytorch_half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.27, "cosStep": 0.39 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8] } } |
| }, |
| { |
| "name": "linear_asymmetric_2x_stencil", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 6], |
| "data": { "kind": "fillFloat32", "sinStep": 0.15, "cosStep": 0.47 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 12] } } |
| }, |
| { |
| "name": "linear_half_pixel_2x_stencil_explicit_scales", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel", "scales": [1, 1, 2, 2] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.25, "cosStep": 0.35 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 8] } } |
| }, |
| { |
| "name": "ort_linear_axes_scales_5d", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Axes_and_Scale_18" |
| }, |
| "attrs": { |
| "mode": "linear", |
| "axes": [2, 3, 4], |
| "exclude_outside": 0, |
| "antialias": 0, |
| "scales": [0.75, 0.75, 0.75] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_5d_ramp_64" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_linear_axes_scales_5d_output_y" } }, |
| "tolerance": 0.00002, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_negative_axes_scales_5d", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Axes_NegativeInRange_18" |
| }, |
| "attrs": { |
| "mode": "linear", |
| "axes": [-3, -2, -1], |
| "exclude_outside": 0, |
| "antialias": 0, |
| "scales": [0.75, 0.75, 0.75] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_5d_ramp_64" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_linear_axes_scales_5d_output_y" } }, |
| "tolerance": 0.00002, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_axes_sizes_5d", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Axes_and_Size_18", |
| "notes": "The ORT case supplies axes-specific sizes {3,3,3}; this framework represents that through the output shape with scale attrs omitted." |
| }, |
| "attrs": { "mode": "linear", "axes": [2, 3, 4], "exclude_outside": 0, "antialias": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_5d_ramp_64" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_linear_axes_scales_5d_output_y" } }, |
| "tolerance": 0.00002, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_antialias_trilinear_no_exclude_outside", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Trilinear_No_ExcludeOutside", |
| "notes": "Rank-5 NCDHW adaptation of ORT's rank-3 trilinear antialias coverage." |
| }, |
| "attrs": { "mode": "linear", "antialias": 1, "exclude_outside": 0, "scales": [1, 1, 0.75, 0.75, 0.75] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_5d_ramp_64" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [5.7272725, 6.9545455, 8.181818, 10.636364, 11.863636, 13.090909, 15.545455, 16.772728, 18.0, 25.363636, 26.59091, 27.818182, 30.272728, 31.5, 32.727272, 35.18182, 36.409092, 37.636364, 45.0, 46.227272, 47.454544, 49.909092, 51.136364, 52.363636, 54.81818, 56.045456, 57.272728] |
| }, |
| "tolerance": 0.00001, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_antialias_trilinear_exclude_outside", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Trilinear_ExcludeOutside", |
| "notes": "Rank-5 NCDHW adaptation of ORT's rank-3 trilinear antialias coverage." |
| }, |
| "attrs": { "mode": "linear", "antialias": 1, "exclude_outside": 1, "scales": [1, 1, 0.75, 0.75, 0.75] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_5d_ramp_64" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [6.3, 7.5, 8.7, 11.1, 12.3, 13.5, 15.9, 17.1, 18.3, 25.5, 26.7, 27.9, 30.3, 31.5, 32.7, 35.1, 36.3, 37.5, 44.7, 45.9, 47.1, 49.5, 50.7, 51.9, 54.3, 55.5, 56.7] |
| }, |
| "tolerance": 0.00001, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "nearest_tf_crop_and_resize_default_roi_singleton", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample.cc", |
| "test": "Resize with omitted roi input", |
| "notes": "ONNX Runtime defaults an omitted ROI to [0, 1] per axis. A singleton output samples the center of the full source interval, covering the default-ROI nearest compiler path." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "tf_crop_and_resize", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0] } } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1], "data": { "kind": "values", "values": [10.0] } } } |
| }, |
| { |
| "name": "linear_tf_crop_and_resize_default_roi", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample.cc", |
| "test": "Resize with omitted roi input", |
| "notes": "The default full ROI maps the first and last output coordinates to the source endpoints; the middle output interpolates at source coordinate 1.5." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "tf_crop_and_resize" }, |
| "inputs": { |
| "x": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [0.0, 15.0, 30.0] } } |
| } |
| }, |
| { |
| "name": "ort_tf_crop_and_resize_rank2_roi", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_tf_crop_and_resize", |
| "notes": "Pinned ORT expected values for ROI-based tf_crop_and_resize." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "tf_crop_and_resize", "roi": [0.4, 0.6, 0.6, 0.8] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [7.600004, 7.9, 8.2, 8.8, 9.1, 9.4, 10.0, 10.3, 10.6] }, |
| "tolerance": 0.00002, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_tf_crop_and_resize_extrapolation_nchw", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_tf_crop_and_resize_with_extrapolation", |
| "notes": "Pinned ORT values expressed with axes-relative ROI and scales; the negative width axis also verifies axis normalization." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "tf_crop_and_resize", |
| "extrapolation_value": 10, |
| "axes": [2, -1], |
| "roi": [0.4, 0.6, 1.2, 1.7], |
| "scales": [0.8, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "data": { "kind": "values", "values": [7.6, 10.0, 10.0, 12.4, 10.0, 10.0, 10.0, 10.0, 10.0] }, |
| "tolerance": 0.00002, |
| "relTolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_nhwc_tf_crop_and_resize_extrapolation_uint8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearDownSampleTest_tf_crop_and_resize_with_extrapolation_uint8", |
| "notes": "Pinned ORT NHWC integer crop-and-resize case with extrapolation." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "tf_crop_and_resize", |
| "extrapolation_value": 10, |
| "roi": [0, 0.4, 0.6, 0, 1, 1.2, 1.7, 1], |
| "scales": [1, 0.8, 0.8, 1] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "uint8", |
| "shape": [1, 4, 4, 1], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "uint8", |
| "shape": [1, 3, 3, 1], |
| "data": { "kind": "values", "values": [7, 10, 10, 12, 10, 10, 10, 10, 10] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_nhwc_tf_crop_and_resize_no_extrapolation_int8", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.NhwcResizeOpLinearDownSampleTest_tf_crop_and_resize_without_extrapolation_int8", |
| "notes": "Pinned ORT NHWC signed integer crop-and-resize case where out-of-ROI samples use the integer zero value." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "tf_crop_and_resize", |
| "roi": [0, 0.4, 0.6, 0, 1, 1.2, 1.7, 1], |
| "scales": [1, 0.8, 0.8, 1] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "int8", |
| "shape": [1, 4, 4, 1], |
| "data": { "kind": "values", "values": [1, -2, 3, -4, -5, 6, -7, 8, 9, -10, 11, -12, -13, 14, -15, 16] } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "int8", |
| "shape": [1, 3, 3, 1], |
| "data": { "kind": "values", "values": [-2, 0, 0, 0, 0, 0, 0, 0, 0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_align_corners_scales_2x4_to_1x2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpLinearDownSampleTest_4DBilinear_align_corners", |
| "notes": "Explicit-scales sibling of the imported sizes case; catches scale-input handling for align_corners." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners", "scales": [1, 1, 0.6, 0.6] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 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": [1, 1, 1, 2], |
| "data": { "kind": "values", "values": [1.0, 4.0] }, |
| "tolerance": 0.000001 |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_downsample_asymmetric", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicDownSampleTest_asymmetric" |
| }, |
| "attrs": { "mode": "cubic", "coordinate_transformation_mode": "asymmetric", "scales": [1, 1, 0.8, 0.8] }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 2.29688, 3.59375, 6.1875, 7.48438, 8.78125, 11.375, 12.6719, 13.9688] |
| }, |
| "tolerance": 0.00005 |
| } |
| } |
| }, |
| { |
| "name": "empty_input_zero_dim", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { "x": { "dtype": "float32", "shape": [0, 1, 2, 2], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [0, 1, 2, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "linear_half_pixel_downsample_f16_vec4_feature_map", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 32, 64, 64], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 32, 32, 32], "tolerance": 0.02, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "linear_half_pixel_exact_2x_f16_x8_route", |
| "provenance": { |
| "notes": "Route-lock for the eight-output 2x bilinear stencil; the non-square multichannel shape exercises row and plane boundaries." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 3, 7, 12], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.31 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 3, 14, 24], "tolerance": 0.02, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "linear_half_pixel_upsample_f16_scalar_w_odd", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 16, 40, 40], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.31 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 16, 80, 82], "tolerance": 0.03, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "nearest_asymmetric_floor_3x_f16_scalar_w_odd", |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "asymmetric", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 8, 10, 10], |
| "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.19 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 8, 30, 30], "tolerance": 0, "relTolerance": 0 } } |
| }, |
| { |
| "name": "linear_align_corners_f16_upsample_scalar", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 4, 8, 8], |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.37 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 4, 15, 15], "tolerance": 0.02, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "empty_spatial_dim_h_zero_nearest_nchw", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 0, 4], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 0, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "empty_spatial_dim_w_zero_linear_nchw", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 3, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 6, 0], "tolerance": 0 } } |
| }, |
| { |
| "name": "nchw_uint8_linear_asymmetric_3x_fractional_round_vs_trunc", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1, 4, 7, 10] } } |
| }, |
| "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 6, 6] } } |
| }, |
| { |
| "name": "linear_align_corners_out1_axis_singleton_source_pixel", |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_linear_downsample_odd_third_3x6_to_1x2_input_x" } |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1], "tolerance": 0 } } |
| }, |
| { |
| "name": "linear_half_pixel_channel_quad_odd_width_tail", |
| "provenance": { |
| "source": "ONNX Resize-19 linear half-pixel semantics", |
| "notes": "Locks four-output scalar batching across odd row tails without allowing a batch to cross an NCHW row boundary." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 4, 5], |
| "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.31, "scale": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 3, 7, 9], "tolerance": 0.000001, "relTolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank7_nearest_last_axis", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "floor", |
| "scales": [1, 1, 1, 1, 1, 1, 2] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 1, 2, 1, 3], |
| "data": { "kind": "linspace", "start": 0.0, "end": 11.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 1, 2, 1, 6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_cubic_exclude_outside_rank2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicDownSampleTest_exclude_outside", |
| "notes": "exclude_outside=1 zeroes cubic taps outside the input range and renormalizes the remaining per-axis weights; clamp-replicating the edge instead changes every border value." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "coordinate_transformation_mode": "half_pixel", |
| "cubic_coeff_a": -0.5, |
| "exclude_outside": 1, |
| "scales": [0.8, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [1.36812973, 2.66949376, 4.01334, 6.57362935, 7.875, 9.21884343, 11.94896221, 13.25033, 14.59417723] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_exclude_outside_nchw", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.ResizeOpCubicDownSampleTest_exclude_outside", |
| "notes": "exclude_outside=1 zeroes cubic taps outside the input range and renormalizes the remaining per-axis weights; clamp-replicating the edge instead changes every border value." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "coordinate_transformation_mode": "half_pixel", |
| "cubic_coeff_a": -0.5, |
| "exclude_outside": 1, |
| "scales": [1, 1, 0.8, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/resize_4x4_ramp" } } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 3], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [1.36812973, 2.66949376, 4.01334, 6.57362935, 7.875, 9.21884343, 11.94896221, 13.25033, 14.59417723] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_antialias_nchw", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Bicubic_No_ExcludeOutside", |
| "notes": "antialias=1 with cubic widens the filter support to 2*filter_scale; the plain bicubic kernel must not select for this combination." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "antialias": 1, |
| "coordinate_transformation_mode": "half_pixel", |
| "cubic_coeff_a": -0.75 |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 4, 6], |
| "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, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 2, 3, 4], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [2.175381, 3.65532, 5.204702, 6.684642, 10.24537, 11.725309, 13.274693, 14.754631, 18.315359, 19.795298, 21.344679, 22.824617, 26.175383, 27.655321, 29.204706, 30.684639, 34.245377, 35.725315, 37.274696, 38.754627, 42.315361, 43.795296, 45.344681, 46.824615] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_cubic_antialias_rank2", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/resize_op_test.cc", |
| "test": "ResizeOpTest.Antialias_Bicubic_No_ExcludeOutside", |
| "notes": "Rank-2 sibling of the NCHW antialiased-bicubic case; exercises the generic antialias route." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "antialias": 1, |
| "coordinate_transformation_mode": "half_pixel", |
| "cubic_coeff_a": -0.75 |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 6], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/ort_cubic_align_corners_floor_nchw_input_x" } |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [3, 4], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [2.175381, 3.65532, 5.204702, 6.684642, 10.24537, 11.725309, 13.274693, 14.754631, 18.315359, 19.795298, 21.344679, 22.824617] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_linear_antialias_fractional_scale06", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "explicit-scale coordinate transform", |
| "notes": "floor(7*0.6)=4 truncates, so the explicit 0.6 scale and the baked 4/7 shape ratio give different centers and filter scales; the explicit scale must win." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "antialias": 1, |
| "coordinate_transformation_mode": "half_pixel", |
| "scales": [1, 1, 0.6, 0.6] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 7, 7], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 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, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "tolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [3.0, 4.625, 6.375, 7.875, 14.375001, 16.0, 17.75, 19.25, 26.625, 28.250002, 30.0, 31.499998, 37.125, 38.749996, 40.499996, 41.999996] |
| } |
| } |
| } |
| }, |
| { |
| "name": "rank5_antialias_linear_fractional_scales_per_axis", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "rank-5 explicit-scale coordinate transform", |
| "notes": "Rank-5 linear antialias coverage with distinct fractional scales [0.6,0.7,0.8]. Each output extent truncates, so the supplied scales differ from the inferred shape ratios and any dropped or shifted axis changes the result. Pinned values follow ONNX Runtime's separable antialias algorithm in `onnxruntime/core/providers/cpu/tensor/upsample_antialias.h`, including edge-clamped taps and per-axis weight normalization." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "antialias": 1, |
| "coordinate_transformation_mode": "half_pixel", |
| "exclude_outside": 0, |
| "scales": [1, 1, 0.6, 0.7, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 7, 5, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.18, -2.64, 3.54, -0.28, -4.1, 2.08, -1.74, 4.44, 0.62, -3.2, 2.98, -0.84, -4.66, 1.52, -2.29, 3.89, 0.07, -3.75, 2.43, -1.39, 4.79, 0.97, -2.85, 3.33, -0.49, -4.31, 1.87, -1.95, 4.23, 0.41, -3.41, 2.77, -1.05, -4.87, 1.31, -2.51, 3.67, -0.15, -3.97, 2.21, -1.61, 4.57, 0.75, -3.07, 3.12, -0.7, -4.52, 1.66, -2.16, 4.02, 0.2, -3.62, 2.56, -1.26, 4.92, 1.1, -2.72, 3.46, -0.36, -4.18, 2.0, -1.82, 4.36, 0.54, -3.28, 2.9, -0.92, -4.74, 1.44, -2.38, 3.8, -0.02, -3.84, 2.35, -1.47, 4.71, 0.89, -2.93, 3.25, -0.57, -4.39, 1.79, -2.03, 4.15, 0.33, -3.49, 2.69, -1.13, -4.95, 1.23, -2.59, 3.59, -0.23, -4.05, 2.13, -1.69, 4.49, 0.67, -3.15, 3.03, -0.79, -4.61, 1.58, -2.24, 3.94] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 3, 2], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [0.861608, -0.57944, -0.209847, 0.732485, -1.521765, 0.617429, -1.078995, 0.120811, -0.055723, -0.187044, 1.076578, -0.13302, 0.260176, -0.213807, -0.91959, -0.214676, 0.22326, 0.241922, 1.164493, 0.039813, 0.958422, -0.624769, 0.270865, -0.932433] |
| } |
| } |
| } |
| }, |
| { |
| "name": "rank5_antialias_cubic_fractional_scales_per_axis", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "rank-5 explicit-scale coordinate transform, cubic filter", |
| "notes": "Cubic counterpart to the rank-5 fractional-scale case, covering the cubic route's independent scale plumbing. Depth and width truncate, so scales 0.6 and 0.8 differ from inferred shape ratios; height remains unchanged to bound the tap count. Pinned values follow the Keys-cubic separable algorithm in `onnxruntime/core/providers/cpu/tensor/upsample_antialias.h`, including edge-clamped taps and per-axis normalization." |
| }, |
| "attrs": { |
| "mode": "cubic", |
| "antialias": 1, |
| "coordinate_transformation_mode": "half_pixel", |
| "exclude_outside": 0, |
| "cubic_coeff_a": -0.75, |
| "scales": [1, 1, 0.6, 1, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 7, 2, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.18, -2.64, 3.54, -0.28, -4.1, 2.08, -1.74, 4.44, 0.62, -3.2, 2.98, -0.84, -4.66, 1.52, -2.29, 3.89, 0.07, -3.75, 2.43, -1.39, 4.79, 0.97, -2.85, 3.33, -0.49, -4.31, 1.87, -1.95, 4.23, 0.41, -3.41, 2.77, -1.05, -4.87, 1.31, -2.51, 3.67, -0.15, -3.97, 2.21, -1.61, 4.57] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 2, 2], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [-0.182603, 1.118934, -1.642603, -0.341066, -1.538309, 1.475514, 1.706941, -0.683816, -0.811055, -0.656666, -0.779036, 1.324795, -0.110369, -0.125005, -1.54873, 0.731214] |
| } |
| } |
| } |
| }, |
| { |
| "name": "ort_nearest_round_prefer_ceil_tie_scale03", |
| "provenance": { |
| "source": "onnxruntime/core/providers/webgpu/tensor/resize_impl.cc", |
| "test": "nearest half-tie epsilon (PR #28757, GH issue 28291)", |
| "notes": "Output col 4 maps to x_original = 4.5/0.3 - 0.5 = 14.5 exactly in reals, but f32 division can land just below .5; round_prefer_ceil must still pick 15." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "nearest_mode": "round_prefer_ceil", |
| "coordinate_transformation_mode": "half_pixel", |
| "scales": [1, 1, 1, 0.3] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 20], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 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] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 6], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [1.0, 5.0, 8.0, 11.0, 15.0, 18.0] } |
| } |
| } |
| }, |
| { |
| "name": "linear_half_pixel_2x_stencil_odd_width_scalar", |
| "provenance": { |
| "notes": "An odd input width makes the doubled output width 6, which is not a multiple of 4, so the vec4 (and f16 x8) 2x stencil kernels drop out and the scalar 2x stencil is the only remaining stencil route. Every other 2x linear fixture has a width divisible by four." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 4.0, 8.0, 16.0, 32.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 6], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank8_nearest_last_axis", |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "asymmetric", |
| "nearest_mode": "floor", |
| "scales": [1, 1, 1, 1, 1, 1, 1, 2] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 1, 2, 1, 2, 3], |
| "data": { "kind": "linspace", "start": 1.0, "end": 24.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 1, 2, 1, 2, 6], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank2_nearest_half_pixel_sizes", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Rank-2 sizes-driven half-pixel nearest resize." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank2_nearest_pytorch_half_pixel_sizes", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "The singleton first output axis exercises pytorch_half_pixel's size-one rule." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "pytorch_half_pixel", |
| "nearest_mode": "round_prefer_floor" |
| }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank2_nearest_half_pixel_symmetric_scales", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Fractional exact scales make the half_pixel_symmetric adjustment observable." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "half_pixel_symmetric", |
| "nearest_mode": "round_prefer_floor", |
| "scales": [0.6, 0.5] |
| }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank2_linear_asymmetric_scales", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Rank-2 linear resize with exact fractional scales and asymmetric coordinates." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric", "scales": [0.6, 0.5] }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank2_linear_pytorch_half_pixel_scales", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Exact scales combine a singleton first output axis with a non-singleton second axis." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "pytorch_half_pixel", "scales": [0.6, 0.5] }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank2_linear_align_corners_scales", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Exact scales combine align_corners' singleton and non-singleton output rules." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners", "scales": [0.6, 0.5] }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank2_linear_half_pixel_symmetric_scales", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Fractional exact scales make the half_pixel_symmetric offset observable on both axes." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel_symmetric", "scales": [0.6, 0.5] }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank2_linear_align_corners_sizes", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Sizes-driven align_corners resize combines singleton and non-singleton output axes." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank2_linear_pytorch_half_pixel_sizes", |
| "provenance": { |
| "source": "ONNX Resize-19 specification", |
| "notes": "Sizes-driven pytorch_half_pixel resize combines singleton and non-singleton output axes." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "pytorch_half_pixel" }, |
| "inputs": { |
| "x": { |
| "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] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "rank5_linear_align_corners_ncdhw", |
| "provenance": { |
| "source": "ONNX Resize-19 specification (coordinate_transformation_mode=align_corners)", |
| "test": "rank-5 NCDHW trilinear align_corners", |
| "notes": "Rank-5 align_corners uses the no-explicit-scale coordinate formula. Its three spatial axes have distinct (in-1)/(out-1) ratios: D 4->3 gives 1.5, H 2->3 gives 0.5, and W 3->4 gives 2/3, so swapping or dropping an axis changes the output." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 2, 3], |
| "data": { "kind": "fillFloat32", "sinStep": 0.41, "cosStep": 0.73, "scale": 0.6 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 3, 3, 4], "tolerance": 0.00001, "relTolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "rank5_linear_half_pixel_symmetric_explicit_scales_ncdhw", |
| "provenance": { |
| "source": "ONNX Resize-19 specification (coordinate_transformation_mode=half_pixel_symmetric)", |
| "test": "rank-5 NCDHW trilinear half_pixel_symmetric with per-axis scales", |
| "notes": "Rank-5 half_pixel_symmetric resize with explicit scales. Each spatial product is non-integral (3*1.4, 4*0.6, and 3*0.8), producing three distinct symmetry offsets and making a dropped or axis-shifted scale observable. This is valid ONNX opset-19 behavior: output dimensions are floor(input_dim*scale), with scales supplied by the compile-time adaptation." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel_symmetric", |
| "scales": [1, 1, 1.4, 0.6, 0.8] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 3, 4, 3], |
| "data": { "kind": "fillFloat32", "sinStep": 0.67, "cosStep": 1.13, "scale": 0.6 } |
| } |
| }, |
| "outputs": { |
| "y": { "dtype": "float32", "shape": [1, 1, 4, 2, 2], "tolerance": 0.00001, "relTolerance": 0.000001 } |
| } |
| }, |
| { |
| "name": "rank5_linear_half_pixel_f16_ncdhw", |
| "provenance": { |
| "source": "ONNX Resize-19 specification (T = tensor(float16))", |
| "test": "rank-5 NCDHW trilinear half_pixel, float16", |
| "notes": "float16 is in ai.onnx.Resize's type constraint but every rank-5 fixture was float32, so the NCDHW kernel's `enable f16;` guard had no consumer - an f16 rank-5 tensor would have compiled a module that declares f16 storage without requesting the extension. Mixed up/down resize (D 2->3, H 3->2, W 2->4) so no two axes share a scale. The reference reads the same f16 bits the kernel does, so the tolerance only has to cover the f16 round of the f32 accumulator." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 1, 2, 3, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.83, "cosStep": 1.31, "scale": 0.6 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 3, 2, 4], "tolerance": 0.002, "relTolerance": 0.002 } } |
| }, |
| { |
| "name": "antialias_linear_asymmetric_downsample", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "antialiased linear downsample, asymmetric coordinates", |
| "notes": "Covers valid ONNX linear antialiasing with asymmetric coordinates, where center=output*ratio and no half-pixel shift is applied. Different H/W ratios expose axis mix-ups, while the first output exercises edge-clamped taps. Pinned values follow the separable triangle filter in `onnxruntime/core/providers/cpu/tensor/upsample_antialias.h`; window starts remain clear of floating-point floor boundaries." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "asymmetric", |
| "antialias": 1, |
| "exclude_outside": 0 |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 5], |
| "data": { "kind": "fillFloat32", "sinStep": 0.91, "cosStep": 0.31, "scale": 0.6 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 3], |
| "tolerance": 0.00001, |
| "relTolerance": 0.00001, |
| "data": { |
| "kind": "values", |
| "values": [0.369885653, 0.24363111, -0.345615536, -0.281011194, -0.20116964, 0.148209721] |
| } |
| } |
| } |
| }, |
| { |
| "name": "antialias_linear_half_pixel_f16", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "antialiased linear downsample, float16", |
| "notes": "Covers the float16 storage route for linear antialiasing with distinct H/W ratios. Inputs are exact multiples of 0.125, isolating tolerance to the final f32-to-f16 rounding. Pinned values follow the separable triangle filter in `onnxruntime/core/providers/cpu/tensor/upsample_antialias.h`; window starts remain clear of floating-point floor boundaries." |
| }, |
| "attrs": { |
| "mode": "linear", |
| "coordinate_transformation_mode": "half_pixel", |
| "antialias": 1, |
| "exclude_outside": 0 |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 1, 5, 3], |
| "data": { |
| "kind": "values", |
| "values": [1.25, -2.5, 0.75, 3.0, -1.875, 2.125, -0.375, 1.5, -2.75, 0.25, 2.875, -1.125, 0.625, -3.0, 1.75] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 1, 3, 2], |
| "tolerance": 0.001, |
| "relTolerance": 0.001, |
| "data": { |
| "kind": "values", |
| "values": [0.515625, 0.0885416642, 0.694444418, -0.518518507, 0.0572916679, 0.182291672] |
| } |
| } |
| } |
| }, |
| { |
| "name": "nearest_align_corners_scalar_x4_odd_width", |
| "provenance": { |
| "notes": "nearest + align_corners on the scalar-x4 path checks the no-explicit-scale coordinate formula at width 7, which is at least four but not divisible by four." |
| }, |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "align_corners", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.97, "cosStep": 1.31, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 8, 7], "tolerance": 0.0002 } } |
| }, |
| { |
| "name": "rank5_nearest_align_corners_ncdhw", |
| "provenance": { |
| "notes": "Rank-5 NCDHW nearest + align_corners checks the no-explicit-scale coordinate formula. D 2->4, H 4->8, and W 4->8 keep the three axes independently addressable." |
| }, |
| "attrs": { "mode": "nearest", "coordinate_transformation_mode": "align_corners", "nearest_mode": "floor" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 1.13, "cosStep": 0.89, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 4, 8, 8], "tolerance": 0.0002 } } |
| }, |
| { |
| "name": "cubic_half_pixel_f16", |
| "provenance": { |
| "notes": "float16 is in ai.onnx.Resize's type constraint but every cubic fixture was float32, so the NCHW cubic shader's `enable f16;` guard had no consumer - an f16 cubic resize would have compiled a module that declares f16 storage without requesting the extension. ai.onnx.Resize's reference declines cubic, so the expected values are pinned. They come from a plain-bicubic re-implementation of the shader that reproduces the existing pinned NCHW cubic fixtures, evaluated on the same float16 bits the kernel reads." |
| }, |
| "attrs": { "mode": "cubic", "coordinate_transformation_mode": "half_pixel", "cubic_coeff_a": -0.75 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.91, "cosStep": 1.19, "scale": 0.4, "offset": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float16", |
| "shape": [1, 1, 8, 8], |
| "tolerance": 0.02, |
| "relTolerance": 0.01, |
| "data": { |
| "kind": "values", |
| "values": [0.595215, 0.71875, 0.922852, 1.049805, 1.040039, 0.835449, 0.544922, 0.368408, 0.371094, 0.451904, 0.583496, 0.731445, 0.815918, 0.803711, 0.696289, 0.631836, -0.012573, -0.000332, 0.013382, 0.201416, 0.448975, 0.760254, 0.957031, 1.081055, 0.224976, 0.139893, -0.00399, 0.002836, 0.14563, 0.4375, 0.717773, 0.890625, 0.966309, 0.804199, 0.541992, 0.237793, 0.061188, -0.000281, 0.098633, 0.155884, 1.098633, 1.001953, 0.849121, 0.560059, 0.30249, 0.073669, 0.009857, -0.032959, 0.559082, 0.635254, 0.762207, 0.806152, 0.74707, 0.621094, 0.494873, 0.41748, 0.23999, 0.420654, 0.716309, 0.958496, 1.015625, 0.947754, 0.781738, 0.682129] |
| } |
| } |
| } |
| }, |
| { |
| "name": "rank3_linear_half_pixel_f16_generic", |
| "provenance": { |
| "notes": "float16 on the generic rank-N route. Every fixture outside rank 4 and 5 was float32, so the generic shader's `enable f16;` guard had no consumer - an f16 resize at any other rank would have compiled a module that declares f16 storage without requesting the extension. Rank 3 falls to the generic route by rank alone." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 1.07, "cosStep": 0.83, "scale": 0.4, "offset": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [2, 4, 8], "tolerance": 0.02, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "nearest_tf_crop_and_resize_roi_axis_to_one", |
| "provenance": { |
| "notes": "Every explicit-ROI fixture is mode=linear, so the generic route's ROI-aware nearest coordinate path and the ROI form of the nearest index helper both rendered nowhere. Output height 1 additionally takes the ROI midpoint branch that a resized axis with more than one output element never reaches. ai.onnx.Resize's reference declines an explicit roi, so the expected values are pinned; nearest_mode is floor so no value sits on a rounding tie, and the ROI keeps all three taps inside the input so none of them collapses onto the extrapolation value." |
| }, |
| "attrs": { |
| "mode": "nearest", |
| "coordinate_transformation_mode": "tf_crop_and_resize", |
| "nearest_mode": "floor", |
| "roi": [0, 0, 0.1, 0.1, 1, 1, 0.9, 0.9] |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.79, "cosStep": 1.21, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 3], |
| "tolerance": 0.0002, |
| "data": { "kind": "values", "values": [-0.055154, -0.323958, 0.122715] } |
| } |
| } |
| }, |
| { |
| "name": "linear_asymmetric_exact_2x_f16_x8_route", |
| "provenance": { |
| "notes": "Exercises the float16 x8 linear stencil with asymmetric coordinates. Width 8 keeps the vectorized stencil aligned while distinct sampling positions verify the asymmetric coordinate transform." |
| }, |
| "attrs": { "mode": "linear", "coordinate_transformation_mode": "asymmetric" }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 1, 4, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.87, "cosStep": 1.09, "scale": 0.4, "offset": 0.5 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 8, 8], "tolerance": 0.02, "relTolerance": 0.01 } } |
| }, |
| { |
| "name": "antialias_linear_align_corners_axis_to_one", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "antialiased linear resize, align_corners coordinates", |
| "notes": "align_corners was the fourth coordinate mode the antialias variant's when-clause admits and no antialias fixture used, so its arm of the coordinate-transform macro was dark - and with it the outS == 1 special case, which is the only place the align_corners formula's (outS - 1) divisor would be zero. Axis 0 collapses 8 -> 1 and takes that branch; axis 1 goes 6 -> 3 and takes the ordinary one, so a single case renders both. ai.onnx.Resize's reference throws on antialias by design, so the expected values are pinned. They come from an independent re-implementation of ORT's separable antialias resampler that reproduces all twelve existing pinned antialias fixtures, including the one pinned from an ORT CPU run." |
| }, |
| "attrs": { "mode": "linear", "antialias": 1, "coordinate_transformation_mode": "align_corners" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 6], |
| "data": { "kind": "fillFloat32", "sinStep": 1.03, "cosStep": 0.77, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 3], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.785487, 0.321457, 0.443004] } |
| } |
| } |
| }, |
| { |
| "name": "antialias_linear_pytorch_half_pixel_axis_to_one", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "antialiased linear resize, pytorch_half_pixel coordinates", |
| "notes": "pytorch_half_pixel was likewise unused by any antialias fixture. It differs from half_pixel only when an output extent is 1, where it yields 0 instead of the half-pixel shift, so the pairing of a 8 -> 1 axis with a 6 -> 3 axis renders both of its arms in one case. ai.onnx.Resize's reference throws on antialias by design, so the expected values are pinned. They come from an independent re-implementation of ORT's separable antialias resampler that reproduces all twelve existing pinned antialias fixtures, including the one pinned from an ORT CPU run." |
| }, |
| "attrs": { "mode": "linear", "antialias": 1, "coordinate_transformation_mode": "pytorch_half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8, 6], |
| "data": { "kind": "fillFloat32", "sinStep": 0.93, "cosStep": 1.27, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 3], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { "kind": "values", "values": [0.693016, 0.605582, 0.168189] } |
| } |
| } |
| }, |
| { |
| "name": "antialias_linear_upsampled_axis_unit_filter_scale", |
| "provenance": { |
| "source": "onnxruntime/core/providers/cpu/tensor/upsample_antialias.h", |
| "test": "antialiased linear resize, half_pixel coordinates", |
| "notes": "Mixed-direction antialiasing upsamples axis 0 from 4 to 8, clamping its filter scale to 1.0, while downsampling axis 1 from 6 to 3 with filter scale 2. The pinned values come from an independent separable antialias implementation cross-checked against the existing reference cases." |
| }, |
| "attrs": { "mode": "linear", "antialias": 1, "coordinate_transformation_mode": "half_pixel" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [4, 6], |
| "data": { "kind": "fillFloat32", "sinStep": 1.17, "cosStep": 0.71, "scale": 0.5, "offset": 0.5 } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [8, 3], |
| "tolerance": 0.0001, |
| "relTolerance": 0.0001, |
| "data": { |
| "kind": "values", |
| "values": [0.595145, 0.064221, 0.678453, 0.683032, 0.080117, 0.624435, 0.858805, 0.111908, 0.516397, 0.826848, 0.241738, 0.586882, 0.587161, 0.469606, 0.83589, 0.337075, 0.525641, 0.96268, 0.076591, 0.409842, 0.967253, -0.053651, 0.351942, 0.96954] |
| } |
| } |
| } |
| } |
| ] |
| } |
|
|