| { | |
| "op": "ai.onnx.BitwiseNot", | |
| "cases": [ | |
| { | |
| "name": "int32_signed_ort", | |
| "inputs": { "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-1, -2, 3] } } }, | |
| "outputs": { "y": { "dtype": "int32", "shape": [3] } }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.BitwiseNot" | |
| } | |
| }, | |
| { | |
| "name": "ort_int16_signed", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.BitwiseNot_int8", | |
| "notes": "Signed ORT bitwise pattern widened to ONNX-valid int16 with min/max sentinels." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "int16", "shape": [5], "data": { "kind": "values", "values": [-32768, -2, -1, 0, 32767] } } | |
| }, | |
| "outputs": { "y": { "dtype": "int16", "shape": [5], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int8_signed_ort", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.BitwiseNot_int8", | |
| "notes": "Extends ORT's signed int8 values with min/max sentinels." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [-128, -2, -1, 0, 127] } } | |
| }, | |
| "outputs": { "y": { "dtype": "int8", "shape": [5] } } | |
| }, | |
| { | |
| "name": "uint8_logical_width", | |
| "inputs": { "x": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 4, 5, 255] } } }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4] } } | |
| }, | |
| { | |
| "name": "int32_high_bits_no_float_cast", | |
| "inputs": { | |
| "x": { | |
| "dtype": "int32", | |
| "shape": [6], | |
| "data": { | |
| "kind": "values", | |
| "values": [2147483647, -2147483648, 16777217, -16777217, 1431655765, -1431655766] | |
| } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "int32", "shape": [6] } } | |
| }, | |
| { | |
| "name": "uint32_high_bits_no_float_cast", | |
| "inputs": { | |
| "x": { | |
| "dtype": "uint32", | |
| "shape": [5], | |
| "data": { "kind": "values", "values": [4294967295, 4000000001, 2147483648, 16777217, 305419896] } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "uint32", "shape": [5] } } | |
| }, | |
| { | |
| "name": "ort_int8_vector", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.BitwiseNot_int8" | |
| }, | |
| "inputs": { "x": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-1, -2, 3] } } }, | |
| "outputs": { "y": { "dtype": "int8", "shape": [3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_vector", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.BitwiseNot_uint8" | |
| }, | |
| "inputs": { "x": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 4, 5, 3] } } }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "onnx_backend_bitwise_not_2d", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_not_2d" }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "int32", | |
| "shape": [3, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [-356387803, 2135392491, 946286476, 1857819720, -2146992385, -1597193335, -848975157, 2143362693, -1517171889, -1133489216, -1750892400, -444182399] | |
| } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "int32", "shape": [3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "onnx_backend_bitwise_not_4d", | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_not_4d", | |
| "test": "test_bitwise_not_4d" | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "uint8", | |
| "shape": [3, 4, 5, 6], | |
| "data": { | |
| "kind": "values", | |
| "values": [37, 235, 140, 72, 137, 203, 133, 79, 192, 144, 129, 204, 71, 237, 252, 134, 25, 178, 20, 254, 101, 146, 212, 139, 252, 234, 156, 157, 142, 50, 68, 215, 215, 233, 241, 247, 222, 96, 86, 141, 233, 137, 7, 63, 61, 22, 57, 1, 128, 60, 209, 8, 216, 141, 115, 175, 234, 121, 200, 30, 71, 131, 198, 149, 49, 57, 3, 196, 24, 241, 43, 76, 26, 52, 80, 109, 115, 41, 210, 15, 64, 196, 25, 111, 226, 215, 135, 26, 153, 104, 22, 9, 195, 231, 126, 23, 125, 100, 155, 165, 57, 83, 166, 136, 32, 162, 10, 23, 143, 239, 87, 25, 199, 243, 92, 74, 190, 46, 160, 216, 151, 183, 65, 113, 77, 3, 128, 248, 253, 205, 6, 52, 213, 198, 2, 76, 219, 149, 203, 7, 77, 200, 75, 76, 43, 20, 30, 36, 103, 7, 45, 196, 57, 240, 252, 210, 96, 13, 10, 23, 124, 81, 135, 121, 152, 202, 220, 148, 160, 140, 193, 94, 60, 233, 152, 82, 115, 97, 130, 236, 220, 103, 98, 10, 182, 96, 233, 82, 214, 198, 194, 71, 231, 176, 54, 15, 133, 145, 170, 20, 118, 176, 22, 229, 141, 241, 114, 97, 181, 84, 10, 96, 183, 61, 56, 217, 149, 231, 96, 249, 211, 25, 241, 142, 141, 212, 116, 43, 134, 205, 184, 187, 143, 24, 251, 137, 194, 199, 53, 69, 164, 101, 248, 21, 40, 77, 219, 177, 113, 47, 205, 168, 206, 45, 87, 144, 156, 234, 45, 195, 116, 66, 206, 46, 128, 157, 63, 75, 35, 181, 221, 33, 130, 212, 83, 48, 54, 32, 253, 156, 55, 210, 31, 28, 222, 74, 136, 109, 99, 32, 8, 84, 205, 50, 79, 169, 64, 108, 211, 24, 113, 234, 20, 44, 15, 158, 219, 142, 243, 19, 251, 154, 235, 86, 135, 227, 53, 175, 110, 188, 243, 34, 100, 228, 32, 147, 195, 24, 211, 229, 94, 166, 175, 231, 133, 79, 63, 113, 87, 160, 42, 202, 194, 216, 226, 158, 145, 68, 64, 188, 244, 206, 145, 167, 163, 209, 156, 150, 38, 169] | |
| } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [3, 4, 5, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "empty_input_zero_dim", | |
| "inputs": { "x": { "dtype": "int32", "shape": [0], "data": { "kind": "values", "values": [] } } }, | |
| "outputs": { "y": { "dtype": "int32", "shape": [0], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int8_vec4_boundary_values", | |
| "inputs": { | |
| "x": { | |
| "dtype": "int8", | |
| "shape": [8], | |
| "data": { "kind": "values", "values": [-128, -127, -2, -1, 0, 1, 126, 127] } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "int8", "shape": [8], "tolerance": 0 } } | |
| } | |
| ] | |
| } | |