{ "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": "An identity copy of 262,141 elements, one more than 65,535 groups of four and past the WebGPU per-dimension workgroup limit; every element must be copied exactly once." }, "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 } } }, { "name": "int64_full_range_int16_copy_boundaries", "inputs": { "x": { "dtype": "int64", "shape": [4], "data": { "kind": "cycle", "values": ["0", "4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1"] } } }, "outputs": { "y": { "dtype": "int64", "shape": [4], "tolerance": 0, "relTolerance": 0 } }, "tolerance": 0, "relTolerance": 0 }, { "name": "int64_full_range_float32_copy", "inputs": { "x": { "dtype": "int64", "shape": [3, 7], "data": { "kind": "cycle", "values": ["4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1", "0"] } } }, "outputs": { "y": { "dtype": "int64", "shape": [3, 7], "tolerance": 0, "relTolerance": 0 } }, "tolerance": 0, "relTolerance": 0 } ] }