{ "op": "ai.onnx.Transpose", "fixtureArrays": { "onnx_backend_transpose_input_x": [0.54881352186203, 0.7151893377304077, 0.6027633547782898, 0.5448831915855408, 0.42365479469299316, 0.6458941102027893, 0.4375872015953064, 0.891772985458374, 0.9636627435684204, 0.3834415078163147, 0.7917250394821167, 0.5288949012756348, 0.5680445432662964, 0.9255966544151306, 0.07103605568408966, 0.08712930232286453, 0.020218396559357643, 0.832619845867157, 0.7781567573547363, 0.8700121641159058, 0.978618323802948, 0.7991585731506348, 0.4614793658256531, 0.7805292010307312], "ort_transpose021_f32_input_x": [1, 2, 3, 4, 5, 6, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 1.3, 2.3, 3.3, 4.3, 5.3, 6.3], "ort_nhwc_to_nchw_uint32_input_x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] }, "cases": [ { "name": "f32_subnormal_rank2_preserve_data", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim", "notes": "Transpose is data movement with reindexing; selected finite subnormal values must survive the permutation." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1e-40, -1e-40, 0.0, 1e-39, -1e-39, 2.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0 } } }, { "name": "rank1_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [7], "data": { "kind": "values", "values": [0.0, 1.0, -2.0, 3.5, 4.0, -5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [7], "tolerance": 0.000001 } } }, { "name": "rank1_explicit_identity_perm", "attrs": { "perm": [0] }, "inputs": { "x": { "dtype": "float32", "shape": [7], "data": { "kind": "values", "values": [0.0, 1.0, -2.0, 3.5, 4.0, -5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [7], "tolerance": 0.000001 } } }, { "name": "matrix_2d", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.07 } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3], "tolerance": 0.000001 } } }, { "name": "matrix_2d_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0.000001 } } }, { "name": "rank3_0_2_1", "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.23 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3], "tolerance": 0.000001 } } }, { "name": "rank3_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "fillFloat32", "sinStep": 0.15, "cosStep": 0.27 } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3, 2], "tolerance": 0.000001 } } }, { "name": "rank4_attention_layout", "attrs": { "perm": [0, 2, 1, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3, 5], "tolerance": 0.000001 } } }, { "name": "rank4_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "fillFloat32", "sinStep": 0.09, "cosStep": 0.21 } } }, "outputs": { "y": { "dtype": "float32", "shape": [5, 4, 3, 2], "tolerance": 0.000001 } } }, { "name": "rank5_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 1, 3, 2], "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.17 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 1, 2, 1], "tolerance": 0.000001 } } }, { "name": "rank6_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 1, 3, 1, 2], "data": { "kind": "values", "values": [0.0, 1.0, 10.0, 11.0, 20.0, 21.0, 100.0, 101.0, 110.0, 111.0, 120.0, 121.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 3, 1, 2, 1], "tolerance": 0.000001 } } }, { "name": "rank6_explicit_interleaved_perm", "attrs": { "perm": [0, 2, 4, 1, 3, 5] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 1, 4, 2, 1], "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 1, 2, 3, 4, 1], "tolerance": 0.000001 } } }, { "name": "rank0_scalar_default_perm", "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [12.25] } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } }, { "name": "rank0_scalar_explicit_empty_perm", "attrs": { "perm": [] }, "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-7.5] } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } }, { "name": "zero_dim_middle_to_last_axis_empty_output", "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 0], "tolerance": 0 } } }, { "name": "ort_two_dim_default_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDimNoAttr" }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0.000001 } } }, { "name": "ort_two_dim_default_bool", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDimNoAttr", "notes": "Same two-dimensional data-movement fixture with an ONNX-valid bool payload." }, "inputs": { "x": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 1, 0, 1, 0] } } }, "outputs": { "y": { "dtype": "bool", "shape": [3, 2], "tolerance": 0 } } }, { "name": "ort_two_dim_default_f16", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDimNoAttr" }, "inputs": { "x": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float16", "shape": [3, 2], "tolerance": 0.001 } } }, { "name": "ort_two_dim_explicit_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim" }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2], "tolerance": 0.000001 } } }, { "name": "ort_two_dim_explicit_f16", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim_mlfloat16", "notes": "Uses normal f16 numeric values instead of ORT's raw MLFloat16 bit-pattern payloads." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "y": { "dtype": "float16", "shape": [3, 2], "tolerance": 0.001 } } }, { "name": "ort_two_dim_uint32_adapted", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim_int32", "notes": "ORT covers int32; this framework covers the same 2D explicit transpose with supported uint32 data." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "uint32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6] } } }, "outputs": { "y": { "dtype": "uint32", "shape": [3, 2], "tolerance": 0 } } }, { "name": "ort_transpose021_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose021" }, "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [4, 2, 3], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_transpose021_f32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3, 2], "tolerance": 0.000001 } } }, { "name": "ort_transpose120_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose120" }, "attrs": { "perm": [1, 2, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [4, 2, 3], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_transpose021_f32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } }, { "name": "ort_transpose102_suffix_preserved_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose102" }, "attrs": { "perm": [1, 0, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [4, 2, 3], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_transpose021_f32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3], "tolerance": 0.000001 } } }, { "name": "ort_transpose_reshape_rank5_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TransposeReshape" }, "attrs": { "perm": [1, 3, 2, 4, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 4, 2, 1, 3], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_transpose021_f32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 1, 2, 3, 1], "tolerance": 0.000001 } } }, { "name": "ort_six_dim_swap_outer_axes_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.SixDim" }, "attrs": { "perm": [1, 0, 2, 3, 4, 5] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2, 2, 2, 2, 2], "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, 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] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 2, 2, 2], "tolerance": 0.000001 } } }, { "name": "ort_nchw_to_nhwc_uint32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.NCHW2NHWC" }, "attrs": { "perm": [0, 2, 3, 1] }, "inputs": { "x": { "dtype": "uint32", "shape": [1, 3, 2, 2], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } } }, "outputs": { "y": { "dtype": "uint32", "shape": [1, 2, 2, 3], "tolerance": 0 } } }, { "name": "ort_nhwc_to_nchw_uint32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.NHWC2NCHW" }, "attrs": { "perm": [0, 3, 1, 2] }, "inputs": { "x": { "dtype": "uint32", "shape": [2, 2, 2, 2], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_nhwc_to_nchw_uint32_input_x" } } } }, "outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 2, 2], "tolerance": 0 } } }, { "name": "ort_two_dim_int32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim_int32" }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6] } } }, "outputs": { "y": { "dtype": "int32", "shape": [3, 2], "tolerance": 0 } } }, { "name": "ort_two_dim_int16", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim_int16" }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "int16", "shape": [2, 3], "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6] } } }, "outputs": { "y": { "dtype": "int16", "shape": [3, 2], "tolerance": 0 } } }, { "name": "ort_single_axis_moving_inwards_block_copy_uint32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.SingleAxisMovingInwardsBlockCopy", "notes": "ORT uses uint64 payload values; this framework stores the representable test values as uint32." }, "attrs": { "perm": [1, 2, 0, 3] }, "inputs": { "x": { "dtype": "uint32", "shape": [2, 2, 2, 2], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_nhwc_to_nchw_uint32_input_x" } } } }, "outputs": { "y": { "dtype": "uint32", "shape": [2, 2, 2, 2], "tolerance": 0 } } }, { "name": "ort_do_transpose_impl_rank4_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.DoTransposeImpl" }, "attrs": { "perm": [2, 1, 0, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [5, 2, 1, 3], "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] } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 5, 3], "tolerance": 0 } } }, { "name": "ort_transpose3dimpl_flatten_dims23_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose3DImpl", "notes": "Compact projection of ORT's rank-4 [0,2,3,1] case that flattens source dims 2 and 3 into one moved block." }, "attrs": { "perm": [0, 2, 3, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "fillFloat32" } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 5, 3], "tolerance": 0 } } }, { "name": "ort_transpose3dimpl_flatten_dims12_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose3DImpl", "notes": "Compact projection of ORT's rank-4 [0,3,1,2] case that flattens source dims 1 and 2 into one moved block." }, "attrs": { "perm": [0, 3, 1, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "fillFloat32" } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 5, 3, 4], "tolerance": 0 } } }, { "name": "ort_ndim_rank4_swap_outer_axes_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.NDim" }, "attrs": { "perm": [1, 0, 2, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2, 2, 2], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_nhwc_to_nchw_uint32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 2], "tolerance": 0 } } }, { "name": "ort_ndim_rank4_swap_outer_and_inner_axes_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.NDim" }, "attrs": { "perm": [1, 0, 3, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2, 2, 2], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_nhwc_to_nchw_uint32_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 2], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_0", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_0" }, "attrs": { "perm": [0, 1, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_1", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_1" }, "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_2", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_2" }, "attrs": { "perm": [1, 0, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2, 4], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_3", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_3" }, "attrs": { "perm": [1, 2, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 4, 2], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_4", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_4" }, "attrs": { "perm": [2, 0, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 2, 3], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_all_permutations_5", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_all_permutations_5" }, "attrs": { "perm": [2, 1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3, 2], "tolerance": 0 } } }, { "name": "onnx_backend_transpose_default", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_transpose_default" }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_transpose_input_x" } } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3, 2], "tolerance": 0 } } }, { "name": "ort_int8_two_dim_edge_values", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim_int8", "notes": "Two-dimensional transpose with logical int8 edge values." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "int8", "shape": [2, 3], "data": { "kind": "values", "values": [-128, -1, 0, 1, 2, 127] } } }, "outputs": { "y": { "dtype": "int8", "shape": [3, 2], "tolerance": 0 } } }, { "name": "uint8_transpose021_edge_values", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.Transpose021", "notes": "Rank-3 non-default permutation with logical uint8 edge values." }, "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "uint8", "shape": [2, 3, 2], "data": { "kind": "values", "values": [0, 1, 2, 3, 4, 5, 250, 251, 252, 253, 254, 255] } } }, "outputs": { "y": { "dtype": "uint8", "shape": [2, 2, 3], "tolerance": 0 } } }, { "name": "tiled_2d_f32_64x32", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [64, 32], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [32, 64], "tolerance": 0.000001 } } }, { "name": "tiled_2d_f32_36x20_partial_tile", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [36, 20], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [20, 36], "tolerance": 0.000001 } } }, { "name": "tiled_2d_f32_256x256", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [256, 256], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [256, 256], "tolerance": 0.000001 } } }, { "name": "tiled_2d_f16_32x64", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float16", "shape": [32, 64], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float16", "shape": [64, 32], "tolerance": 0.001 } } }, { "name": "tiled_2d_u32_8x12", "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "uint32", "shape": [8, 12], "data": { "kind": "cycle", "values": [7, 1, 9, 4, 3, 12, 5, 0, 2, 8, 6, 11, 10] } } }, "outputs": { "y": { "dtype": "uint32", "shape": [12, 8], "tolerance": 0 } } }, { "name": "tiled_2d_default_perm_f32_16x44", "inputs": { "x": { "dtype": "float32", "shape": [16, 44], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [44, 16], "tolerance": 0.000001 } } }, { "name": "tiled_3d_batched_f32_3x36x12", "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [3, 36, 12], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 12, 36], "tolerance": 0.000001 } } }, { "name": "tiled_3d_batched_f16_2x32x16", "attrs": { "perm": [0, 2, 1] }, "inputs": { "x": { "dtype": "float16", "shape": [2, 32, 16], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 16, 32], "tolerance": 0.001 } } }, { "name": "tiled_4d_batched_f32_2x3x16x8", "attrs": { "perm": [0, 1, 3, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 16, 8], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 3, 8, 16], "tolerance": 0.000001 } } }, { "name": "identity_vec4_rank1_f32_12", "inputs": { "x": { "dtype": "float32", "shape": [12], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [12], "tolerance": 0.000001 } } }, { "name": "identity_vec4_rank2_f32_6x10", "attrs": { "perm": [0, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [6, 10], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [6, 10], "tolerance": 0.000001 } } }, { "name": "identity_vec4_rank3_f16_2x3x4", "attrs": { "perm": [0, 1, 2] }, "inputs": { "x": { "dtype": "float16", "shape": [2, 3, 4], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 3, 4], "tolerance": 0.001 } } }, { "name": "identity_vec4_rank4_f32_1x2x2x4", "attrs": { "perm": [0, 1, 2, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 2, 4], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 2, 4], "tolerance": 0.000001 } } }, { "name": "inner_vec4_rank3_f32_5x3x8", "attrs": { "perm": [1, 0, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [5, 3, 8], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 5, 8], "tolerance": 0.000001 } } }, { "name": "inner_vec4_rank3_f16_4x6x12", "attrs": { "perm": [1, 0, 2] }, "inputs": { "x": { "dtype": "float16", "shape": [4, 6, 12], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float16", "shape": [6, 4, 12], "tolerance": 0.001 } } }, { "name": "inner_vec4_rank4_attention_f32_2x3x4x8", "attrs": { "perm": [0, 2, 1, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 8], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3, 8], "tolerance": 0.000001 } } }, { "name": "inner_vec4_rank4_f32_2x3x4x8_perm2103", "attrs": { "perm": [2, 1, 0, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 8], "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.13 } } }, "outputs": { "y": { "dtype": "float32", "shape": [4, 3, 2, 8], "tolerance": 0.000001 } } }, { "name": "rank2_scalar_odd_width_5x7", "provenance": { "notes": "Compact correctness sibling for the odd-width rank2 scalar transpose benchmark; the dimensions avoid vec4/tiled alignment while preserving the same rank2 permutation." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [5, 7], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 } } }, "outputs": { "y": { "dtype": "float32", "shape": [7, 5], "tolerance": 0.000001 } } }, { "name": "rank7_explicit_perm", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest (generic N-dim)", "notes": "Rank-7 explicit-permutation coverage for the generic transpose path. The manifest supplies the rank and permutation as template inputs instead of maintaining a rank-specific variant." }, "attrs": { "perm": [1, 0, 3, 2, 5, 4, 6] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 2, 2, 2, 2, 2], "data": { "kind": "values", "values": [-10.0, -9.5, -9.0, -8.5, -8.0, -7.5, -7.0, -6.5, -6.0, -5.5, -5.0, -4.5, -4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0, 15.5, 16.0, 16.5, 17.0, 17.5, 18.0, 18.5, 19.0, 19.5, 20.0, 20.5, 21.0, 21.5, 22.0, 22.5, 23.0, 23.5, 24.0, 24.5, 25.0, 25.5, 26.0, 26.5, 27.0, 27.5, 28.0, 28.5, 29.0, 29.5, 30.0, 30.5, 31.0, 31.5, 32.0, 32.5, 33.0, 33.5, 34.0, 34.5, 35.0, 35.5, 36.0, 36.5, 37.0, 37.5, 38.0, 38.5, 39.0, 39.5, 40.0, 40.5, 41.0, 41.5, 42.0, 42.5, 43.0, 43.5, 44.0, 44.5, 45.0, 45.5, 46.0, 46.5, 47.0, 47.5, 48.0, 48.5, 49.0, 49.5, 50.0, 50.5, 51.0, 51.5, 52.0, 52.5, 53.0, 53.5, 54.0, 54.5, 55.0, 55.5, 56.0, 56.5, 57.0, 57.5, 58.0, 58.5, 59.0, 59.5, 60.0, 60.5, 61.0, 61.5, 62.0, 62.5, 63.0, 63.5, 64.0, 64.5, 65.0, 65.5, 66.0, 66.5, 67.0, 67.5, 68.0, 68.5, 69.0, 69.5, 70.0, 70.5, 71.0, 71.5, 72.0, 72.5, 73.0, 73.5, 74.0, 74.5, 75.0, 75.5, 76.0, 76.5, 77.0, 77.5, 78.0, 78.5, 79.0, 79.5, 80.0, 80.5, 81.0, 81.5, 82.0, 82.5, 83.0, 83.5, 84.0, 84.5, 85.0, 85.5] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 2, 2, 2, 2, 2, 2], "tolerance": 0 } } }, { "name": "rank2_bool_explicit_tiled", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TwoDim (bool payload)", "notes": "bool is in typeConstraints T and scalarType maps it to u32, so an aligned [4,4] bool transpose selects tiled_vec4 (gate is only f16Ok, true for u32). The pre-existing ort_two_dim_default_bool_gpu_gap fixture is stale-named; this NON-gpu-gapped case gives bool its first real GPU validation on the vec4 path." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "bool", "shape": [4, 4], "data": { "kind": "values", "values": [1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1] } } }, "outputs": { "y": { "dtype": "bool", "shape": [4, 4], "tolerance": 0 } } }, { "name": "rank5_scrambled_perm_f32", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/transpose_test.cc", "test": "TransposeOpTest.TransposeReshape (scrambled rank5)", "notes": "Genuinely scrambled rank-5 explicit perm [4,2,0,3,1] exercising the generic scalar-gather path with rank-specific template inputs; prior rank-5 coverage only exercised a default reversal and a near-reshape perm." }, "attrs": { "perm": [4, 2, 0, 3, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 2, 3, 2], "data": { "kind": "values", "values": [-5.0, -4.75, -4.5, -4.25, -4.0, -3.75, -3.5, -3.25, -3.0, -2.75, -2.5, -2.25, -2.0, -1.75, -1.5, -1.25, -1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75, 12.0, 12.25, 12.5, 12.75] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 3, 3], "tolerance": 0.000001 } } }, { "name": "rank7_default_full_reversal", "provenance": { "notes": "A rank-7 default transpose (no perm) reverses all seven dimensions through the generic transpose path." }, "inputs": { "x": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 3], "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 2, 1, 2, 1, 2], "tolerance": 0 } } }, { "name": "rank1_2d_fold_boundary_last_element_guard", "provenance": { "notes": "numel = 2^24+1 = 16777217 forces ceilDiv(numel,256)=65536 > maxComputeWorkgroupsPerDimension(65535), engaging the scalar path's y-axis 2D fold (i = gid.x + gid.y*nwg.x*WG). rank1 numel%4 != 0 bypasses identity_vec4 and lands on the generic scalar path, isolating the fold last-row guard. Referenceless: TS reference supplies truth so a corrupted/dropped tail element in the second y-row fails the compare." }, "inputs": { "x": { "dtype": "float32", "shape": [16777217], "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017 } } }, "outputs": { "y": { "dtype": "float32", "shape": [16777217], "tolerance": 0 } } }, { "name": "tiled_2d_vec4_naninf_signedzero_payload_preserved", "provenance": { "notes": "Aligned [8,8] perm[1,0] f32 selects tiled_vec4 (both dims %4==0, %32 partial). Verifies NaN / +-Inf / signed-zero survive the vec4->scalar->workgroup->vec4 staging bit-exact. Expected values are the [8,8] input transposed (column-major read)." }, "attrs": { "perm": [1, 0] }, "inputs": { "x": { "dtype": "float32", "shape": [8, 8], "data": { "kind": "values", "values": ["NaN", "Infinity", "-Infinity", 0.0, 0.0, 1.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, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [8, 8], "allowNaN": true, "tolerance": 0, "data": { "kind": "values", "values": ["NaN", 3.0, 11.0, 19.0, 27.0, 35.0, 43.0, 51.0, "Infinity", 4.0, 12.0, 20.0, 28.0, 36.0, 44.0, 52.0, "-Infinity", 5.0, 13.0, 21.0, 29.0, 37.0, 45.0, 53.0, 0.0, 6.0, 14.0, 22.0, 30.0, 38.0, 46.0, 54.0, 0.0, 7.0, 15.0, 23.0, 31.0, 39.0, 47.0, 55.0, 1.0, 8.0, 16.0, 24.0, 32.0, 40.0, 48.0, 56.0, -1.0, 9.0, 17.0, 25.0, 33.0, 41.0, 49.0, 57.0, 2.0, 10.0, 18.0, 26.0, 34.0, 42.0, 50.0, 58.0] } } } }, { "name": "scalar_rank4_default_reverse_naninf_preserved", "provenance": { "notes": "No perm => default full reversal [3,2,1,0] on the generic scalar path. Values placed so index [i,j,k,l] holds 8*i+4*j+2*k+l; output[l,k,j,i] = input[i,j,k,l]. NaN/Inf/-0 payloads at select positions must survive the scalar input_offset gather." }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2, 2, 2], "data": { "kind": "values", "values": ["NaN", 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, "Infinity", "-Infinity", 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 0.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 2, 2], "allowNaN": true, "tolerance": 0, "data": { "kind": "values", "values": ["NaN", "-Infinity", 4.0, 12.0, 2.0, 10.0, 6.0, 14.0, 1.0, 9.0, 5.0, 13.0, 3.0, 11.0, "Infinity", 0.0] } } } }, { "name": "rank5_ncdhw_to_ndhwc_tiled_vec4", "provenance": { "notes": "Compact route lock for the flattened batched-2D NCDHW-to-NDHWC tile. C=4 and D*H*W=32 exercise one complete spatial tile boundary while preserving exact copy semantics." }, "attrs": { "perm": [0, 2, 3, 4, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 4, 2, 4, 4], "data": { "kind": "linspace", "start": -64.0, "end": 63.0 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 4, 4, 4], "tolerance": 0 } } }, { "name": "rank5_ndhwc_to_ncdhw_tiled_candidate", "provenance": { "notes": "Inverse rank-5 layout lock: NDHWC [N,D,H,W,C] becomes NCDHW via perm [0,4,1,2,3]. C=4 and D*H*W=32 match one flattened 2D transpose boundary with bit-exact copy semantics." }, "attrs": { "perm": [0, 4, 1, 2, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 4, 4, 4], "data": { "kind": "linspace", "start": -64.0, "end": 63.0 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 4, 2, 4, 4], "tolerance": 0 } } }, { "name": "rank4_nchw_to_nhwc_perm0231_tiled", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "channels-last conversions use the tiled shared-memory kernel", "notes": "perm (0,2,3,1)/(0,3,1,2) are batched 2D transposes with merged row/col dims and must reach the tiled kernel, not the scalar generic path." }, "attrs": { "perm": [0, 2, 3, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 8, 4, 12], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 12, 8], "tolerance": 0 } } }, { "name": "rank4_nhwc_to_nchw_perm0312_tiled", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "channels-last conversions use the tiled shared-memory kernel", "notes": "perm (0,2,3,1)/(0,3,1,2) are batched 2D transposes with merged row/col dims and must reach the tiled kernel, not the scalar generic path." }, "attrs": { "perm": [0, 3, 1, 2] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 4, 12, 8], "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 8, 4, 12], "tolerance": 0 } } }, { "name": "rank4_unitdim_memcpy_perm0213", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "unit-dim permutations lower to a flat copy", "notes": "A permutation that only moves size-1 axes preserves the row-major layout, so the flat vec4 copy is exact." }, "attrs": { "perm": [0, 2, 1, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 6, 1, 8], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 6, 8], "tolerance": 0 } } }, { "name": "rank3_unitdim_memcpy_perm201", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "unit-dim permutations lower to a flat copy", "notes": "A permutation that only moves size-1 axes preserves the row-major layout, so the flat vec4 copy is exact." }, "attrs": { "perm": [2, 0, 1] }, "inputs": { "x": { "dtype": "float32", "shape": [6, 8, 1], "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.31 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 6, 8], "tolerance": 0 } } }, { "name": "rank5_unitdim_memcpy_perm20134", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "unit-dim permutations lower to a flat copy", "notes": "A permutation that only moves size-1 axes preserves the row-major layout, so the flat vec4 copy is exact." }, "attrs": { "perm": [2, 0, 1, 3, 4] }, "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 1, 3, 4], "data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.07 } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 3, 4], "tolerance": 0 } } }, { "name": "rank4_nonmemcpy_perm0213_canary", "provenance": { "source": "onnxruntime/core/providers/webgpu/tensor/transpose.cc", "test": "unit-dim permutations lower to a flat copy", "notes": "A permutation that only moves size-1 axes preserves the row-major layout, so the flat vec4 copy is exact." }, "attrs": { "perm": [0, 2, 1, 3] }, "inputs": { "x": { "dtype": "float32", "shape": [2, 3, 4, 4], "data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11 } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 4, 3, 4], "tolerance": 0 } } } ] }