Xenova's picture
Xenova HF Staff
sync 6fdf6301e2bb
0592a26 verified
Raw History Blame
61.2 kB
{
"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],
"strided_f32": [0, 1e-40, -1e-40, 0.125, -3.5, 100000000000000000000, -100000000000000000000, 17.25, -31.5, 0.5, 7.75, -0.75, 2],
"strided_f16": [0, 5.960464477539063e-8, -5.960464477539063e-8, 0.125, -3.5, 65504, -65504, 17.25, -31.5, 0.5, 7.75, -0.75, 2],
"strided_signed": [-63, -62, -61, -60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 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],
"strided_unsigned": [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, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126],
"strided_bool": [0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0]
},
"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": "A two-dimensional transpose with an ONNX-valid bool payload verifies bit-preserving data movement."
},
"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": "A uint32 payload exercises an explicit two-dimensional transpose."
},
"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": "Projects representable uint64 source values to uint32 storage."
},
"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": "A 5-by-7 transpose avoids vector and tiled alignment, exercising scalar rank-2 address mapping."
},
"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": "A rank-7 explicit permutation exercises generic high-rank index decomposition."
},
"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": "An aligned 4-by-4 bool tensor uses u32 storage and exercises vectorized tiled transpose without requiring subnormal preservation."
},
"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": "The rank-5 permutation [4,2,0,3,1] scrambles all nontrivial strides and exercises generic scalar gathering."
},
"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": "A rank-1 identity transpose with 16,777,217 elements requires 65,536 workgroups and therefore a two-row scalar dispatch. The odd element count exercises the final-row bound and makes a dropped tail element observable."
},
"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": "An aligned [8,8] transpose with perm=[1,0] must carry NaN, both infinities, and zeros exactly to their transposed positions."
},
"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": "With perm omitted, the default full reversal [3,2,1,0] maps output[l,k,j,i] to input[i,j,k,l]. NaN and both infinities must land exactly at their reversed positions."
},
"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": "NCDHW-to-NDHWC transpose with four channels and 32 spatial positions checks exact batched 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": "A rank-5 NDHWC-to-NCDHW transpose (perm [0,4,1,2,3]) moves the size-4 channel axis to position 1, with the D, H, and W dimensions (2x4x4=32 elements) kept contiguous; distinct linspace values at every position make a wrong index mapping observable."
},
"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": "Permutation [0,2,1,3] swaps non-unit extents 3 and 4, so it must perform a true transpose rather than a flat copy."
},
"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 } }
},
{
"name": "rank8_explicit_perm_regroups_two_middle_axes",
"provenance": {
"source": "ONNX Transpose-13 specification",
"notes": "A rank-8 staging permutation that moves one middle axis past two others. A distinct value per position makes any axis-stride mistake visible at the position it corrupts."
},
"attrs": { "perm": [0, 1, 2, 3, 5, 6, 4, 7] },
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2, 4, 2, 2, 4],
"data": { "kind": "linspace", "start": 0.0, "end": 1535.0 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 3, 2, 2, 2, 2, 4, 4], "tolerance": 0 } }
},
{
"name": "rank8_default_perm_reverses_every_axis",
"provenance": {
"source": "ONNX Transpose-13 specification",
"notes": "With `perm` omitted on a rank-8 tensor, the operator reverses every axis."
},
"attrs": {},
"inputs": {
"x": {
"dtype": "float32",
"shape": [2, 3, 2, 2, 4, 2, 2, 4],
"data": { "kind": "linspace", "start": 0.0, "end": 1535.0 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4, 2, 2, 4, 2, 2, 3, 2], "tolerance": 0 } }
},
{
"name": "strided_planes_ragged_batched_float32",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_float16",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_int32",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "int32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_signed" } }
}
},
"outputs": { "y": { "dtype": "int32", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_int16",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "int16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_signed" } }
}
},
"outputs": { "y": { "dtype": "int16", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_uint32",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "uint32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_unsigned" } }
}
},
"outputs": { "y": { "dtype": "uint32", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_uint8",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "uint8",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_unsigned" } }
}
},
"outputs": { "y": { "dtype": "uint8", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_int8",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "int8",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_signed" } }
}
},
"outputs": { "y": { "dtype": "int8", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_batched_bool",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "bool",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_bool" } }
}
},
"outputs": { "y": { "dtype": "bool", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_rank3_default_aligned_float32",
"inputs": {
"x": {
"shape": [16, 3, 32],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [32, 3, 16], "tolerance": 0, "relTolerance": 0 } }
},
{
"name": "strided_planes_half_full_tile_float32",
"inputs": {
"x": {
"shape": [2, 16, 3, 32],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 32, 3, 16], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_padding_demoted_boundary_float32",
"inputs": {
"x": {
"shape": [2, 15, 3, 32],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 32, 3, 15], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_skinny_demoted_float32",
"inputs": {
"x": {
"shape": [2, 8, 5, 64],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 64, 5, 8], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_partial_scalar_demoted_float32",
"inputs": {
"x": {
"shape": [2, 17, 3, 32],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 32, 3, 17], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_rank3_explicit_ragged_float32",
"inputs": {
"x": {
"shape": [47, 3, 63],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [2, 1, 0] }
},
{
"name": "strided_planes_aligned_nan_float32",
"inputs": {
"x": {
"shape": [2, 16, 3, 32],
"dtype": "float32",
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/strided_f32" },
"nanStart": 3.0,
"nanCount": 2.0
}
}
},
"outputs": {
"y": { "dtype": "float32", "shape": [2, 32, 3, 16], "tolerance": 0, "relTolerance": 0, "allowNaN": true }
},
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_nan_float32",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "float32",
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/strided_f32" },
"nanStart": 3.0,
"nanCount": 2.0
}
}
},
"outputs": {
"y": { "dtype": "float32", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0, "allowNaN": true }
},
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_rank3_default_aligned_float16",
"inputs": {
"x": {
"shape": [16, 3, 32],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [32, 3, 16], "tolerance": 0, "relTolerance": 0 } }
},
{
"name": "strided_planes_half_full_tile_float16",
"inputs": {
"x": {
"shape": [2, 16, 3, 32],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 32, 3, 16], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_padding_demoted_boundary_float16",
"inputs": {
"x": {
"shape": [2, 15, 3, 32],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 32, 3, 15], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_skinny_demoted_float16",
"inputs": {
"x": {
"shape": [2, 8, 5, 64],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 64, 5, 8], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_partial_scalar_demoted_float16",
"inputs": {
"x": {
"shape": [2, 17, 3, 32],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 32, 3, 17], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_rank3_explicit_ragged_float16",
"inputs": {
"x": {
"shape": [47, 3, 63],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [63, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [2, 1, 0] }
},
{
"name": "strided_planes_aligned_nan_float16",
"inputs": {
"x": {
"shape": [2, 16, 3, 32],
"dtype": "float16",
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/strided_f16" },
"nanStart": 3.0,
"nanCount": 2.0
}
}
},
"outputs": {
"y": { "dtype": "float16", "shape": [2, 32, 3, 16], "tolerance": 0, "relTolerance": 0, "allowNaN": true }
},
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_ragged_nan_float16",
"inputs": {
"x": {
"shape": [2, 47, 3, 63],
"dtype": "float16",
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/strided_f16" },
"nanStart": 3.0,
"nanCount": 2.0
}
}
},
"outputs": {
"y": { "dtype": "float16", "shape": [2, 63, 3, 47], "tolerance": 0, "relTolerance": 0, "allowNaN": true }
},
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_empty_outer_float32",
"inputs": {
"x": {
"shape": [0, 3, 4],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4, 3, 0], "tolerance": 0, "relTolerance": 0 } }
},
{
"name": "strided_planes_empty_middle_float32",
"inputs": {
"x": {
"shape": [2, 16, 0, 32],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 32, 0, 16], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_full_scalar_tile_boundary_float32",
"inputs": {
"x": {
"shape": [2, 33, 3, 64],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 64, 3, 33], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_full_scalar_tile_boundary_float16",
"inputs": {
"x": {
"shape": [2, 33, 3, 64],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 64, 3, 33], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_two_axis_padding_47_float32",
"inputs": {
"x": {
"shape": [2, 47, 3, 65],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 65, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_two_axis_padding_48_float32",
"inputs": {
"x": {
"shape": [2, 48, 3, 65],
"dtype": "float32",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f32" } }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 65, 3, 48], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_two_axis_padding_47_float16",
"inputs": {
"x": {
"shape": [2, 47, 3, 65],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 65, 3, 47], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "strided_planes_two_axis_padding_48_float16",
"inputs": {
"x": {
"shape": [2, 48, 3, 65],
"dtype": "float16",
"data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/strided_f16" } }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 65, 3, 48], "tolerance": 0, "relTolerance": 0 } },
"attrs": { "perm": [0, 3, 2, 1] }
},
{
"name": "int64_full_range_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": "int64",
"shape": [2, 3],
"data": {
"kind": "cycle",
"values": ["0", "4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1"]
}
}
},
"outputs": { "y": { "dtype": "int64", "shape": [3, 2], "tolerance": 0, "relTolerance": 0 } },
"tolerance": 0,
"relTolerance": 0
},
{
"name": "int64_full_range_rank1_default_perm",
"inputs": {
"x": {
"dtype": "int64",
"shape": [7],
"data": {
"kind": "cycle",
"values": ["4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1", "0"]
}
}
},
"outputs": { "y": { "dtype": "int64", "shape": [7], "tolerance": 0, "relTolerance": 0 } },
"tolerance": 0,
"relTolerance": 0
}
]
}