Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
d59fe5a verified
Raw
History Blame
15.3 kB
{
"op": "ai.onnx.BitwiseOr",
"fixtureArrays": {
"onnx_backend_bitwise_or_i16_4d_values": [-91, 107, 12, -56, 9, 75, 5, -49, 64, 16, 1, 76, -57, 109, 124, 6, -103, 50, -108, 126, -27, 18, 84, 11, 124, 106, 28, 29, 14, -78, -60, 87, 87, 105, 113, 119, 94, -32, -42, 13, 105, 9, -121, -65, -67, -106, -71, -127, 0, -68, 81, -120, 88, 13, -13, 47, 106, -7, 72, -98, -57, 3, 70, 21, -79, -71, -125, 68, -104, 113, -85, -52, -102, -76, -48, -19, -13, -87, 82, -113, -64, 68, -103, -17, 98, 87, 7, -102, 25, -24, -106, -119, 67, 103, -2, -105, -3, -28, 27, 37, -71, -45, 38, 8, -96, 34, -118, -105, 15, 111, -41, -103, 71, 115, -36, -54, 62, -82, 32, 88, 23, 55, -63, -15, -51, -125, 0, 120, 125, 77, -122, -76, 85, 70, -126, -52, 91, 21, 75, -121, -51, 72, -53, -52, -85, -108, -98, -92, -25, -121, -83, 68, -71, 112, 124, 82, -32, -115, -118, -105, -4, -47, 7, -7, 24, 74, 92, 20, 32, 12, 65, -34, -68, 105, 24, -46, -13, -31, 2, 108, 92, -25, -30, -118, 54, -32, 105, -46, 86, 70, 66, -57, 103, 48, -74, -113, 5, 17, 42, -108, -10, 48, -106, 101, 13, 113, -14, -31, 53, -44, -118, -32, 55, -67, -72, 89, 21, 103, -32, 121, 83, -103, 113, 14, 13, 84, -12, -85, 6, 77, 56, 59, 15, -104, 123, 9, 66, 71, -75, -59, 36, -27, 120, -107, -88, -51, 91, 49, -15, -81, 77, 40, 78, -83, -41, 16, 28, 106, -83, 67, -12, -62, 78, -82, 0, 29, -65, -53, -93, 53, 93, -95, 2, 84, -45, -80, -74, -96, 125, 28, -73, 82, -97, -100, 94, -54, 8, -19, -29, -96, -120, -44, 77, -78, -49, 41, -64, -20, 83, -104, -15, 106, -108, -84, -113, 30, 91, 14, 115, -109, 123, 26, 107, -42, 7, 99, -75, 47, -18, 60, 115, -94, -28, 100, -96, 19, 67, -104, 83, 101, -34, 38, 47, 103, 5, -49, -65, -15, -41, 32, -86, 74, 66, 88, 98, 30, 17, -60, -64, 60, 116, 78, 17, 39, 35, 81, 28, 22, -90, 41]
},
"cases": [
{
"name": "int32_signed_ort",
"inputs": {
"a": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-1, -2, 3] } },
"b": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 0, 4] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [3] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr"
}
},
{
"name": "ort_int16_signed",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_int8",
"notes": "Signed ORT bitwise pattern widened to ONNX-valid int16 with min/max sentinels."
},
"inputs": {
"a": { "dtype": "int16", "shape": [5], "data": { "kind": "values", "values": [-32768, -1, -2, 3, 32767] } },
"b": { "dtype": "int16", "shape": [5], "data": { "kind": "values", "values": [32767, 1, 0, 4, -32768] } }
},
"outputs": { "c": { "dtype": "int16", "shape": [5], "tolerance": 0 } }
},
{
"name": "uint8_logical_width",
"inputs": {
"a": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 4, 5, 3] } },
"b": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 2, 2, 1] } }
},
"outputs": { "c": { "dtype": "uint8", "shape": [4] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_uint8"
}
},
{
"name": "broadcast_ab",
"inputs": {
"a": {
"dtype": "int32",
"shape": [4, 2],
"data": { "kind": "values", "values": [10, 11, 12, 13, 14, 15, 16, 17] }
},
"b": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [15, 7] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [4, 2] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_broadcastAB"
}
},
{
"name": "broadcast_ba",
"inputs": {
"a": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [15, 7] } },
"b": {
"dtype": "int32",
"shape": [4, 2],
"data": { "kind": "values", "values": [10, 11, 12, 13, 14, 15, 16, 17] }
}
},
"outputs": { "c": { "dtype": "int32", "shape": [4, 2] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_broadcastBA"
}
},
{
"name": "multidirectional_broadcast",
"inputs": {
"a": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [10, 11, 12, 13] } },
"b": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [15, 7] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [4, 2] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_multidirectional_broadcastAB"
}
},
{
"name": "multidirectional_broadcast_ba",
"inputs": {
"a": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [15, 7] } },
"b": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [10, 11, 12, 13] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [4, 2] } },
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_multidirectional_broadcastBA"
}
},
{
"name": "int32_high_bits_no_float_cast",
"inputs": {
"a": {
"dtype": "int32",
"shape": [6],
"data": {
"kind": "values",
"values": [2147483647, -2147483648, 16777217, -16777217, 1431655765, -1431655766]
}
},
"b": {
"dtype": "int32",
"shape": [6],
"data": { "kind": "values", "values": [252645135, 252645135, 16777216, 16777216, 858993459, 858993459] }
}
},
"outputs": { "c": { "dtype": "int32", "shape": [6] } }
},
{
"name": "uint32_high_bits_no_float_cast",
"inputs": {
"a": {
"dtype": "uint32",
"shape": [5],
"data": { "kind": "values", "values": [4294967295, 4000000001, 2147483648, 16777217, 305419896] }
},
"b": {
"dtype": "uint32",
"shape": [5],
"data": { "kind": "values", "values": [252645135, 4042322160, 2147483648, 16777216, 16711935] }
}
},
"outputs": { "c": { "dtype": "uint32", "shape": [5] } }
},
{
"name": "uint8_backend_bcast_4v3d",
"inputs": {
"a": {
"dtype": "uint8",
"shape": [2, 2, 2, 3],
"data": {
"kind": "values",
"values": [255, 170, 85, 15, 240, 51, 204, 129, 126, 1, 2, 4, 8, 16, 32, 64, 128, 127, 3, 5, 9, 17, 33, 65]
}
},
"b": {
"dtype": "uint8",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [15, 240, 170, 85, 51, 204, 3, 5, 9, 17, 33, 65] }
}
},
"outputs": { "c": { "dtype": "uint8", "shape": [2, 2, 2, 3] } }
},
{
"name": "ort_int8_vector",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.BitwiseOr_int8"
},
"inputs": {
"a": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-1, -2, 3] } },
"b": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [1, 0, 4] } }
},
"outputs": { "c": { "dtype": "int8", "shape": [3], "tolerance": 0 } }
},
{
"name": "onnx_backend_bitwise_or_i32_2d",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_or_i32_2d" },
"inputs": {
"a": {
"dtype": "int32",
"shape": [3, 4],
"data": {
"kind": "values",
"values": [-356387803, 2135392491, 946286476, 1857819720, -2146992385, -1597193335, -848975157, 2143362693, -1517171889, -1133489216, -1750892400, -444182399]
}
},
"b": {
"dtype": "int32",
"shape": [3, 4],
"data": {
"kind": "values",
"values": [-356387803, 2135392491, 946286476, 1857819720, -2146992385, -1597193335, -848975157, 2143362693, -1517171889, -1133489216, -1750892400, -444182399]
}
}
},
"outputs": { "c": { "dtype": "int32", "shape": [3, 4], "tolerance": 0 } }
},
{
"name": "onnx_backend_bitwise_or_i16_4d",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_or_i16_4d",
"test": "test_bitwise_or_i16_4d"
},
"inputs": {
"a": {
"dtype": "int8",
"shape": [3, 4, 5, 6],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_bitwise_or_i16_4d_values" } }
},
"b": {
"dtype": "int8",
"shape": [3, 4, 5, 6],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_bitwise_or_i16_4d_values" } }
}
},
"outputs": { "c": { "dtype": "int8", "shape": [3, 4, 5, 6], "tolerance": 0 } }
},
{
"name": "onnx_backend_bitwise_or_ui8_bcast_4v3d",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_or_ui8_bcast_4v3d",
"test": "test_bitwise_or_ui8_bcast_4v3d"
},
"inputs": {
"a": {
"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]
}
},
"b": {
"dtype": "uint8",
"shape": [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]
}
}
},
"outputs": { "c": { "dtype": "uint8", "shape": [3, 4, 5, 6], "tolerance": 0 } }
},
{
"name": "empty_input_zero_dim",
"inputs": {
"a": { "dtype": "int32", "shape": [0], "data": { "kind": "values", "values": [] } },
"b": { "dtype": "int32", "shape": [0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [0], "tolerance": 0 } }
},
{
"name": "broadcast_scalar_a_uint32",
"inputs": {
"a": { "dtype": "uint32", "shape": [], "data": { "kind": "values", "values": [4042322160] } },
"b": {
"dtype": "uint32",
"shape": [2, 3],
"data": { "kind": "values", "values": [65535, 16711935, 4278255360, 4042322160, 252645135, 2863311530] }
}
},
"outputs": { "c": { "dtype": "uint32", "shape": [2, 3] } }
},
{
"name": "broadcast_rank6_uint32",
"inputs": {
"a": {
"dtype": "uint32",
"shape": [3, 1, 1, 1, 1, 1],
"data": { "kind": "values", "values": [252645135, 4042322160, 2863311530] }
},
"b": {
"dtype": "uint32",
"shape": [1, 1, 1, 1, 1, 3],
"data": { "kind": "values", "values": [16776960, 4278190335, 305419896] }
}
},
"outputs": {
"c": {
"dtype": "uint32",
"shape": [3, 1, 1, 1, 1, 3],
"data": {
"kind": "values",
"values": [268435215, 4279177215, 524246911, 4043309040, 4293980415, 4076140280, 2868903850, 4289374975, 3133079290]
},
"tolerance": 0
}
}
},
{
"name": "int8_sign_boundary_broadcast",
"inputs": {
"a": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-128, -1, 0, 127, -85, 85] } },
"b": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-1, -128, 127, 0, 85, -85] } }
},
"outputs": {
"c": {
"dtype": "int8",
"shape": [6],
"data": { "kind": "values", "values": [-1, -1, 127, 127, -1, -1] },
"tolerance": 0
}
}
},
{
"name": "empty_multidim_broadcast",
"inputs": {
"a": { "dtype": "int32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } },
"b": { "dtype": "int32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] } }
},
"outputs": {
"c": { "dtype": "int32", "shape": [2, 0, 4], "data": { "kind": "values", "values": [] }, "tolerance": 0 }
}
},
{
"name": "rank7_broadcast_scalar_tail",
"inputs": {
"a": { "dtype": "uint32", "shape": [2, 1, 2, 1, 2, 1, 3], "data": { "kind": "cycle", "values": [1, 3, 7, 15] } },
"b": { "dtype": "uint32", "shape": [1, 2, 1, 2, 1, 2, 1], "data": { "kind": "cycle", "values": [2, 5, 10] } }
},
"outputs": { "c": { "dtype": "uint32", "shape": [2, 2, 2, 2, 2, 2, 3], "tolerance": 0 } }
}
]
}