{ "fixtureArrays": { "ort_generated_3d_rotation_shear_batch2_no_align_input_theta": [1.409539, 0, 0.51303, 0.3, 0.118782, 1.969615, -0.326352, -0.5, -0.168412, 0.086824, 0.462708, 1.8, 1.409539, 0, 0.51303, 0.3, 0.118782, 1.969615, -0.326352, -0.5, -0.168412, 0.086824, 0.462708, 1.8], "ort_generated_3d_stronger_transform_batch2_no_align_input_theta": [0.259808, 0, -0.15, -0.5, -1.299038, 1.5, -2.25, -0.5, 1.375, 4.76314, 2.38157, 0.3, 0.259808, 0, -0.15, -0.5, -1.299038, 1.5, -2.25, -0.5, 1.375, 4.76314, 2.38157, 0.3], "onnx_backend_affine_grid_3d_input_theta": [2.6830732822418213, -0.7943316102027893, 0.21829216182231903, 5, 0.622253954410553, 3.2880465984344482, -0.5303300619125366, -3.299999952316284, 0.24721935391426086, 1.7241772413253784, 0.07809311151504517, -1.100000023841858, -0.35552558302879333, 1.004422903060913, 1.3995190858840942, 2.5, 0.17578838765621185, 0.06028856709599495, -0.9240381121635437, 1.100000023841858, -1.100000023841858, -0.44999998807907104, 0.44999998807907104, 2.200000047683716] }, "cases": [ { "name": "affine_grid3d_w4_coarsened", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.0, 0.1, 0.0, 0.05, 0.0, 1.0, -0.1, -0.05, 0.1, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 2, 3, 4, 3], "tolerance": 0.000001 } } }, { "name": "f32_subnormal_translation_2d_singleton_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: Metal FTZ: subnormal f32 translation (1e-40) in theta flushes to zero on GPU, so the singleton grid reads 0 instead of the subnormal translation (tolerance 0)." }, "provenance": { "notes": "A singleton 2D output grid has normalized coordinates (0, 0), so the grid should preserve theta's subnormal translation exactly." }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [0.0, 0.0, 1e-40, 0.0, 0.0, -1e-40] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 1, 1, 2], "tolerance": 0 } } }, { "name": "f32_subnormal_translation_3d_singleton_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: Metal FTZ: subnormal f32 translation (1e-40) in theta flushes to zero on GPU, so the singleton grid reads 0 instead of the subnormal translation (tolerance 0)." }, "provenance": { "notes": "A singleton 3D output grid should preserve subnormal x/y/z translations without arithmetic amplification." }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 1e-40, 0.0, 0.0, 0.0, -1e-40, 0.0, 0.0, 0.0, 1e-40] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 1, 1, 1, 3], "tolerance": 0 } } }, { "name": "dispatch_cliff_2d_over_16m_elements", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.5, 0.25, -0.5, 2.0, -1.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 4097, 4097, 2], "tolerance": 0.0001 } } }, { "name": "identity_2x2_align_corners", "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 2, 2, 2] } }, "tolerance": 0.000001 }, { "name": "translate_f16", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float16", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.5, 0.0, 1.0, -0.5] } } }, "outputs": { "grid": { "dtype": "float16", "shape": [1, 2, 2, 2] } }, "tolerance": 0.002 }, { "name": "identity_3x4_no_align_corners", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 4, 2], "tolerance": 0.000001 } } }, { "name": "batch2_scale_translate_align_corners", "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.25, 0.0, 1.0, -0.25, 0.5, 0.0, -0.5, 0.0, 0.5, 0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 3, 2], "tolerance": 0.000001 } } }, { "name": "ort_generated_2d_rotation_shear_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test_gen.py", "test": "AffineGridTest.test_2d_0", "notes": "Generated ORT fixture materialized in affine_grid_test.cc." }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_batch2_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_7" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5, 1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 3, 2], "tolerance": 0.0001 } } }, { "name": "ort_2d_identity_default_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.2d" }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 2, 3, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_batch2_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_1" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5, 1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 3, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_stronger_transform_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_2" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_rotation_shear_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_4" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_stronger_transform_batch2_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_3" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5, 1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 3, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_rotation_shear_batch2_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_5" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5, 1.477212, -0.173648, 0.3, 0.173648, 0.492404, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 3, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_2d_stronger_transform_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_2d_6" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.5, -0.866025, -0.5, 0.866025, 2.75, -0.5] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_rotation_shear_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_0" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.409539, 0.0, 0.51303, 0.3, 0.118782, 1.969615, -0.326352, -0.5, -0.168412, 0.086824, 0.462708, 1.8] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_rotation_shear_batch2_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_1" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_generated_3d_rotation_shear_batch2_no_align_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 2, 3, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_stronger_transform_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_2" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [0.259808, 0.0, -0.15, -0.5, -1.299038, 1.5, -2.25, -0.5, 1.375, 4.76314, 2.38157, 0.3] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_stronger_transform_batch2_no_align", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_3" }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_generated_3d_stronger_transform_batch2_no_align_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 2, 3, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_rotation_shear_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_4" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.409539, 0.0, 0.51303, 0.3, 0.118782, 1.969615, -0.326352, -0.5, -0.168412, 0.086824, 0.462708, 1.8] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_rotation_shear_batch2_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_5" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_generated_3d_rotation_shear_batch2_no_align_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 2, 3, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_stronger_transform_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_6" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [0.259808, 0.0, -0.15, -0.5, -1.299038, 1.5, -2.25, -0.5, 1.375, 4.76314, 2.38157, 0.3] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 3, 2, 2, 3], "tolerance": 0.0001 } } }, { "name": "ort_generated_3d_stronger_transform_batch2_align_corners", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/affine_grid_test.cc", "test": "AffineGridTest.test_3d_7" }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_generated_3d_stronger_transform_batch2_no_align_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 2, 2, 3, 3], "tolerance": 0.0001 } } }, { "name": "onnx_backend_affine_grid_2d", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_affine_grid_2d", "notes": "The fixture represents the official size metadata through the declared output grid shape." }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.088944435119629, -3.2880465984344482, 5.0, 2.022325277328491, 1.096015453338623, -3.299999952316284, 0.835788369178772, -0.5544228553771973, 2.5, 0.7876279354095459, 0.8397114276885986, 1.100000023841858] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 5, 6, 2], "tolerance": 0.00001 } } }, { "name": "onnx_backend_affine_grid_2d_align_corners", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_affine_grid_2d_align_corners", "notes": "The fixture represents the official size metadata through the declared output grid shape." }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 2, 3], "data": { "kind": "values", "values": [1.088944435119629, -3.2880465984344482, 5.0, 2.022325277328491, 1.096015453338623, -3.299999952316284, 0.835788369178772, -0.5544228553771973, 2.5, 0.7876279354095459, 0.8397114276885986, 1.100000023841858] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 5, 6, 2], "tolerance": 0.00001 } } }, { "name": "onnx_backend_affine_grid_3d", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_affine_grid_3d", "notes": "The fixture represents the official size metadata through the declared output grid shape." }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_affine_grid_3d_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 4, 5, 6, 3], "tolerance": 0.00001 } } }, { "name": "onnx_backend_affine_grid_3d_align_corners", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_affine_grid_3d_align_corners", "notes": "The fixture represents the official size metadata through the declared output grid shape." }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_affine_grid_3d_input_theta" } } } }, "outputs": { "grid": { "dtype": "float32", "shape": [2, 4, 5, 6, 3], "tolerance": 0.00001 } } }, { "name": "empty_zero_dim", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float32", "shape": [0, 2, 3], "data": { "kind": "values", "values": [] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [0, 2, 2, 2], "tolerance": 0 } } }, { "name": "empty_zero_dim_f16", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float16", "shape": [0, 2, 3], "data": { "kind": "values", "values": [] } } }, "outputs": { "grid": { "dtype": "float16", "shape": [0, 2, 2, 2], "tolerance": 0 } } }, { "name": "align_corners_1_h1_w3_identity", "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 2, 3], "data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 1, 3, 2], "tolerance": 0.000001 } } }, { "name": "3d_f16_identity_no_align", "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float16", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float16", "shape": [1, 2, 2, 2, 3] } }, "tolerance": 0.002 }, { "name": "affine_grid3d_w4_coarsened_f16", "provenance": { "notes": "A float16 width-by-four 3D grid checks half-precision inputs and output on the vectorized 3D path." }, "attrs": { "align_corners": 0 }, "inputs": { "theta": { "dtype": "float16", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.0, 0.1, 0.0, 0.05, 0.0, 1.0, -0.1, -0.05, 0.1, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float16", "shape": [1, 2, 3, 4, 3], "tolerance": 0.002 } } }, { "name": "affine_grid3d_w4_align_corners", "provenance": { "notes": "align_corners=1 on the width-by-four 3D grid. The flag changes the normalized-coordinate step the kernel bakes in, and every case that reached this route left it at 0." }, "attrs": { "align_corners": 1 }, "inputs": { "theta": { "dtype": "float32", "shape": [1, 3, 4], "data": { "kind": "values", "values": [1.0, 0.1, 0.0, 0.05, 0.0, 1.0, -0.1, -0.05, 0.1, 0.0, 1.0, 0.0] } } }, "outputs": { "grid": { "dtype": "float32", "shape": [1, 2, 3, 4, 3], "tolerance": 0.000001 } } } ] }