File size: 12,815 Bytes
89fd67d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
{
  "op": "ai.onnx.BitwiseXor",
  "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.BitwiseXor"
      }
    },
    {
      "name": "ort_int16_signed",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
        "test": "MathOpTest.BitwiseXor_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.BitwiseXor_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.BitwiseXor_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.BitwiseXor_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.BitwiseXor_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.BitwiseXor_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.BitwiseXor_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_xor_i32_2d",
      "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_xor_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_xor_ui8_bcast_4v3d",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_bitwise_xor_ui8_bcast_4v3d",
        "test": "test_bitwise_xor_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": [267448335, 4027518960, 490428791, 4027518960, 267448335, 3804538504, 2857719210, 1437248085, 3097427154]
          },
          "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": [127, 127, 127, 127, -2, -2] },
          "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 } }
    }
  ]
}