{ "op": "ai.onnx.Identity", "cases": [ { "name": "int16_copy_boundaries", "inputs": { "x": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [-32768, -1, 0, 32767] } } }, "outputs": { "y": { "dtype": "int16", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [-32768, -1, 0, 32767] } } } }, { "name": "float32_copy", "inputs": { "x": { "dtype": "float32", "shape": [3, 7], "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 7], "tolerance": 0.000001 } } }, { "name": "ort_float_2x2", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType" }, "inputs": { "x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0 } } }, { "name": "onnx_backend_nchw_copy", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_identity", "test": "test_identity" }, "inputs": { "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 2], "tolerance": 0 } } }, { "name": "float32_scalar_copy", "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": ["NaN"] } } }, "outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001, "allowNaN": true } } }, { "name": "float16_copy", "inputs": { "x": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "values", "values": [-5.0, -1.0, 0.0, 1.0, 5.0, 9.0] } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.001 } } }, { "name": "uint32_copy", "inputs": { "x": { "dtype": "uint32", "shape": [2, 3], "data": { "kind": "values", "values": [0, 1, 2, 4294967295, 17, 99] } } }, "outputs": { "y": { "dtype": "uint32", "shape": [2, 3], "tolerance": 0 } } }, { "name": "bool_exact_copy", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType", "notes": "Same tensor-copy behavior as ORT's numeric fixture, using ONNX-valid bool payloads." }, "inputs": { "x": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [0, 1, 1, 0, 1, 0] } } }, "outputs": { "y": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [0, 1, 1, 0, 1, 0] }, "tolerance": 0 } } }, { "name": "ort_int32_copy_dtype_path", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType", "notes": "Same tensor-copy behavior as ORT's float fixture, using supported native int32 storage." }, "inputs": { "x": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [-3, 0, 7, 2147483647] } } }, "outputs": { "y": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } } }, { "name": "ort_int8_copy_edge_values", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType", "notes": "Same tensor-copy behavior as ORT's float fixture, using logical int8 edge values." }, "inputs": { "x": { "dtype": "int8", "shape": [2, 4], "data": { "kind": "values", "values": [-128, -5, -1, 0, 1, 5, 100, 127] } } }, "outputs": { "y": { "dtype": "int8", "shape": [2, 4], "tolerance": 0 } } }, { "name": "ort_uint8_copy_edge_values", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType", "notes": "Same tensor-copy behavior as ORT's float fixture, using logical uint8 edge values." }, "inputs": { "x": { "dtype": "uint8", "shape": [2, 4], "data": { "kind": "values", "values": [0, 1, 2, 127, 128, 200, 254, 255] } } }, "outputs": { "y": { "dtype": "uint8", "shape": [2, 4], "tolerance": 0 } } }, { "name": "ort_float16_copy_nonfinite_values", "provenance": { "source": "onnxruntime/test/providers/cpu/tensor/identity_op_test.cc", "test": "Identity.FloatType", "notes": "Same tensor-copy behavior as ORT's float fixture, using float16 nonfinite payloads." }, "inputs": { "x": { "dtype": "float16", "shape": [2, 4], "data": { "kind": "values", "values": ["NaN", "-Infinity", 0.0, 0.0, 1.0, -2.0, 65504.0, "Infinity"] } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0, "allowNaN": true } } }, { "name": "zero_sized_copy", "inputs": { "x": { "dtype": "float32", "shape": [2, 0, 3], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0.000001 } } }, { "name": "onnx_backend_clip_default_inbounds_expanded", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_clip_default_inbounds_expanded", "notes": "The official expanded Clip default-inbounds function lowers to Identity for this node fixture." }, "inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1.0, 0.0, 1.0] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } } }, { "name": "onnx_backend_clip_default_int8_inbounds_expanded", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_clip_default_int8_inbounds_expanded", "notes": "The official expanded Clip default-inbounds function lowers to Identity for this node fixture." }, "inputs": { "x": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-1, 0, 1] } } }, "outputs": { "y": { "dtype": "int8", "shape": [3], "tolerance": 0 } } }, { "name": "f16_vec4_copy_2x4", "inputs": { "x": { "dtype": "float16", "shape": [2, 4], "data": { "kind": "values", "values": [1.0, -2.0, 3.5, -4.5, 5.0, -6.0, 7.25, -8.75] } } }, "outputs": { "y": { "dtype": "float16", "shape": [2, 4], "tolerance": 0 } } }, { "name": "scalar_copy_dispatch_clamp", "provenance": { "notes": "Odd numel forces the scalar copy variant; WORKGROUP_SIZE=4 makes ceil(numel/WG)=65536 exceed the 65535 workgroups-per-dimension limit, pinning the min(...,65535) dispatch clamp + grid-stride loop (some threads copy two elements)." }, "tunables": { "WORKGROUP_SIZE": 4 }, "inputs": { "x": { "dtype": "float32", "shape": [262141], "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.31 } } }, "outputs": { "y": { "dtype": "float32", "shape": [262141], "tolerance": 0 } } }, { "name": "int32_numel2_scalar_copy", "inputs": { "x": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [-2147483648, 2147483647] } } }, "outputs": { "y": { "dtype": "int32", "shape": [2], "tolerance": 0 } } }, { "name": "f16_numel3_scalar_copy_edge_values", "inputs": { "x": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": ["Infinity", "-Infinity", 65504.0] } } }, "outputs": { "y": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": ["Infinity", "-Infinity", 65504.0] }, "tolerance": 0, "allowNaN": false } } }, { "name": "empty_zero_in_middle_dim", "inputs": { "x": { "dtype": "float32", "shape": [3, 0, 5], "data": { "kind": "values", "values": [] } } }, "outputs": { "y": { "dtype": "float32", "shape": [3, 0, 5], "tolerance": 0 } } } ] }