File size: 14,412 Bytes
5f03bf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
{
  "op": "ai.onnx.EyeLike",
  "cases": [
    {
      "name": "vec4_upper_diagonal_rectangular_f32",
      "attrs": { "k": 1 },
      "inputs": { "input": { "dtype": "float32", "shape": [4, 8], "data": { "kind": "constant", "value": 7.0 } } },
      "outputs": { "output": { "dtype": "float32", "shape": [4, 8], "tolerance": 0 } }
    },
    {
      "name": "dispatch_cliff_f32_tall",
      "attrs": { "k": 0 },
      "inputs": {
        "input": { "dtype": "float32", "shape": [16777217, 1], "data": { "kind": "constant", "value": 0.0 } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [16777217, 1], "tolerance": 0 } }
    },
    {
      "name": "default_f32_rectangular",
      "inputs": { "input": { "dtype": "float32", "shape": [3, 2], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 2] } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLikeDefault"
      }
    },
    {
      "name": "zero_rows_f32_empty_output",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLikeDefault",
        "notes": "Zero-row rank-2 inputs produce an empty output; no diagonal elements are materialized."
      },
      "inputs": { "input": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } } },
      "outputs": {
        "output": { "dtype": "float32", "shape": [0, 3], "tolerance": 0, "data": { "kind": "values", "values": [] } }
      }
    },
    {
      "name": "upper_diagonal_f32",
      "attrs": { "k": 2 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 4] } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_UpperDiagonal"
      }
    },
    {
      "name": "lower_diagonal_f32",
      "attrs": { "k": -1 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 2], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 2] } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_LowerDiagonal"
      }
    },
    {
      "name": "out_of_range_int32",
      "attrs": { "k": 3 },
      "inputs": { "input": { "dtype": "int32", "shape": [3, 2], "data": { "kind": "constant", "value": 0 } } },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 2] } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_K_EgdeCase_1",
        "notes": "ORT uses int64 dtype; this framework covers the same out-of-range positive diagonal with int32 output storage."
      }
    },
    {
      "name": "ort_out_of_range_negative_int32",
      "attrs": { "k": -3 },
      "inputs": { "input": { "dtype": "int32", "shape": [3, 2], "data": { "kind": "constant", "value": 0 } } },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 2] } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_K_EgdeCase_2",
        "notes": "ORT uses int64 dtype; this framework covers the same out-of-range negative diagonal with int32 output storage."
      }
    },
    {
      "name": "large_positive_k_does_not_wrap_to_main_diagonal",
      "attrs": { "k": 4294967296 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": {
        "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } }
      },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_K_EgdeCase_1",
        "notes": "ONNX k is an int64 attribute. A huge positive offset is valid and should be out of range, not wrap through a 32-bit uniform to the main diagonal."
      }
    },
    {
      "name": "large_negative_k_does_not_wrap_to_main_diagonal",
      "attrs": { "k": -4294967296 },
      "inputs": { "input": { "dtype": "int32", "shape": [3, 3], "data": { "kind": "constant", "value": 0 } } },
      "outputs": {
        "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0, "data": { "kind": "constant", "value": 0 } }
      },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_K_EgdeCase_2",
        "notes": "Negative companion for int64 k values outside the int32 range; the diagonal remains out of range."
      }
    },
    {
      "name": "main_diagonal_f16",
      "attrs": { "dtype": 10 },
      "inputs": { "input": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "float16", "shape": [2, 3] } }
    },
    {
      "name": "uint8_output_main_diagonal",
      "attrs": { "dtype": 2 },
      "inputs": { "input": { "dtype": "uint8", "shape": [2, 4], "data": { "kind": "constant", "value": 99 } } },
      "outputs": { "output": { "dtype": "uint8", "shape": [2, 4], "tolerance": 0 } }
    },
    {
      "name": "int8_output_lower_diagonal",
      "attrs": { "k": -1, "dtype": 3 },
      "inputs": { "input": { "dtype": "int8", "shape": [4, 3], "data": { "kind": "constant", "value": -7 } } },
      "outputs": { "output": { "dtype": "int8", "shape": [4, 3], "tolerance": 0 } }
    },
    {
      "name": "uint32_extreme_input_main_diagonal",
      "provenance": {
        "source": "onnx/onnx/docs/Operators.md#EyeLike-22",
        "notes": "Covers standard uint32 input and output membership; extreme input payloads are intentionally ignored because EyeLike consumes only the input shape."
      },
      "attrs": { "dtype": 12 },
      "inputs": {
        "input": {
          "dtype": "uint32",
          "shape": [2, 4],
          "data": { "kind": "values", "values": [0, 4294967295, 2147483648, 16777217, 1, 42, 4000000000, 255] }
        }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [2, 4], "tolerance": 0 } }
    },
    {
      "name": "int16_extreme_input_lower_diagonal",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_LowerDiagonal",
        "notes": "Extends ORT's lower-diagonal case to ONNX-standard int16 and proves that only the input shape, not its extreme values, affects the result."
      },
      "attrs": { "k": -1, "dtype": 5 },
      "inputs": {
        "input": { "dtype": "int16", "shape": [3, 5], "data": { "kind": "cycle", "values": [-32768, 32767, -1, 0, 1] } }
      },
      "outputs": { "output": { "dtype": "int16", "shape": [3, 5], "tolerance": 0 } }
    },
    {
      "name": "bool_output_upper_diagonal",
      "provenance": {
        "source": "onnx/onnx/docs/Operators.md#EyeLike-22",
        "notes": "Covers the ONNX-standard bool input/output route with a non-default upper diagonal."
      },
      "attrs": { "k": 1, "dtype": 9 },
      "inputs": { "input": { "dtype": "bool", "shape": [3, 4], "data": { "kind": "cycle", "values": [0, 1, 1, 0] } } },
      "outputs": { "output": { "dtype": "bool", "shape": [3, 4], "tolerance": 0 } }
    },
    {
      "name": "upper_diagonal_k1_narrow",
      "attrs": { "k": 1, "dtype": 2 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 2], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "uint8", "shape": [3, 2], "tolerance": 0 } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_UpperrDiagonal2",
        "notes": "The same narrow upper-diagonal shape also covers the independent uint8 output-dtype route."
      }
    },
    {
      "name": "lower_diagonal_k_minus2_wide",
      "attrs": { "k": -2, "dtype": 3 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "int8", "shape": [3, 4], "tolerance": 0 } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_LowerDiagonal2",
        "notes": "The same wide lower-diagonal shape also covers the independent int8 output-dtype route."
      }
    },
    {
      "name": "ort_different_output_dtype_int32",
      "attrs": { "dtype": 6 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/eyelike_op_test.cc",
        "test": "EyeLikeOpTest.EyeLike_DifferentDtype",
        "notes": "ORT requests int64 via dtype attr; this framework expresses the same output-dtype behavior with supported int32 storage."
      }
    },
    {
      "name": "int32_output_nonzero_input_ignored",
      "inputs": { "input": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "constant", "value": 99 } } },
      "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "onnx_backend_eyelike_populate_off_main_diagonal",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_eyelike_populate_off_main_diagonal"
      },
      "attrs": { "k": 1, "dtype": 1 },
      "inputs": {
        "input": {
          "dtype": "int32",
          "shape": [4, 5],
          "data": {
            "kind": "values",
            "values": [44, 47, 64, 67, 67, 9, 83, 21, 36, 87, 70, 88, 88, 12, 58, 65, 39, 87, 46, 88]
          }
        }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } }
    },
    {
      "name": "onnx_backend_eyelike_with_dtype",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_eyelike_with_dtype",
        "notes": "Official output dtype is DOUBLE; adapted to FLOAT because this manifest does not support float64 outputs."
      },
      "attrs": { "dtype": 1 },
      "inputs": {
        "input": {
          "dtype": "int32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [44, 47, 64, 67, 67, 9, 83, 21, 36, 87, 70, 88] }
        }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 4], "tolerance": 0 } }
    },
    {
      "name": "onnx_backend_eyelike_without_dtype",
      "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_eyelike_without_dtype" },
      "attrs": {},
      "inputs": {
        "input": {
          "dtype": "int32",
          "shape": [4, 4],
          "data": { "kind": "values", "values": [44, 47, 64, 67, 67, 9, 83, 21, 36, 87, 70, 88, 88, 12, 58, 65] }
        }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [4, 4], "tolerance": 0 } }
    },
    {
      "name": "empty_input_zero_dim",
      "inputs": { "input": { "dtype": "float32", "shape": [0, 2], "data": { "kind": "values", "values": [] } } },
      "outputs": { "output": { "dtype": "float32", "shape": [0, 2], "tolerance": 0 } }
    },
    {
      "name": "f32_input_f16_output_64x64_upper_diagonal_k1",
      "provenance": {
        "notes": "Separates the float16 output route from the independently typed float32 shape-source input."
      },
      "attrs": { "k": 1, "dtype": 10 },
      "inputs": { "input": { "dtype": "float32", "shape": [64, 64], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": { "output": { "dtype": "float16", "shape": [64, 64], "tolerance": 0 } }
    },
    {
      "name": "int32_nonsquare_tall_lower_diagonal_k_minus2",
      "attrs": { "k": -2 },
      "inputs": { "input": { "dtype": "int32", "shape": [5, 3], "data": { "kind": "constant", "value": 0 } } },
      "outputs": { "output": { "dtype": "int32", "shape": [5, 3], "tolerance": 0 } }
    },
    {
      "name": "k_at_negative_rows_boundary_all_zeros",
      "provenance": {
        "notes": "A float32 shape-source input with bool output covers the independent bool dtype route on an all-off diagonal."
      },
      "attrs": { "k": -3, "dtype": 9 },
      "inputs": { "input": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": {
        "output": { "dtype": "bool", "shape": [3, 3], "tolerance": 0, "data": { "kind": "constant", "value": 0 } }
      }
    },
    {
      "name": "k_zero_1x1_single_element",
      "provenance": {
        "notes": "A float32 shape-source input with int16 output covers the independent int16 dtype route."
      },
      "attrs": { "k": 0, "dtype": 5 },
      "inputs": { "input": { "dtype": "float32", "shape": [1, 1], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": {
        "output": { "dtype": "int16", "shape": [1, 1], "tolerance": 0, "data": { "kind": "values", "values": [1] } }
      }
    },
    {
      "name": "k_at_positive_cols_boundary_all_zeros",
      "provenance": {
        "notes": "A float32 shape-source input with uint32 output covers the independent uint32 dtype route on an all-off diagonal."
      },
      "attrs": { "k": 3, "dtype": 12 },
      "inputs": { "input": { "dtype": "float32", "shape": [4, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": {
        "output": { "dtype": "uint32", "shape": [4, 3], "tolerance": 0, "data": { "kind": "constant", "value": 0 } }
      }
    },
    {
      "name": "k_minus_rows_minus1_single_corner",
      "attrs": { "k": -3 },
      "inputs": { "input": { "dtype": "float32", "shape": [4, 3], "data": { "kind": "constant", "value": 0.0 } } },
      "outputs": {
        "output": {
          "dtype": "float32",
          "shape": [4, 3],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0] }
        }
      }
    }
  ]
}