File size: 26,966 Bytes
e394010
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
{
  "op": "ai.onnx.Expand",
  "cases": [
    {
      "name": "int16_broadcast_boundaries",
      "inputs": {
        "input": { "dtype": "int16", "shape": [1, 4], "data": { "kind": "values", "values": [-32768, -1, 0, 32767] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } }
      },
      "outputs": {
        "output": {
          "dtype": "int16",
          "shape": [2, 4],
          "tolerance": 0,
          "data": { "kind": "values", "values": [-32768, -1, 0, 32767, -32768, -1, 0, 32767] }
        }
      }
    },
    {
      "name": "dispatch_cliff_scalar_splat",
      "inputs": {
        "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [7.0] } },
        "shape": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [16776963] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [16776963], "tolerance": 0 } }
    },
    {
      "name": "scalar_to_3x3",
      "inputs": {
        "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.5] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "ort_float_scalar_to_3x3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x3"
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "row_vector_to_3x3",
      "inputs": {
        "input": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "ort_float_vector_to_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1"
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "col_vector_to_3x3",
      "inputs": {
        "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "ort_float_col_vector_to_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3"
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "rank3_broadcast",
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [1, 3, 1],
          "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 }
        },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } }
    },
    {
      "name": "uint32_bool_like_broadcast",
      "inputs": {
        "input": { "dtype": "uint32", "shape": [1, 3, 1], "data": { "kind": "values", "values": [1, 0, 2] } },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [2, 3, 4], "tolerance": 0 } }
    },
    {
      "name": "rank5_broadcast",
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [2, 1, 2, 1, 1],
          "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 }
        },
        "shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [2, 3, 2, 4, 2] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 2, 4, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "rank7_broadcast",
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [1, 2, 1, 3, 1, 1, 2],
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
        },
        "shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "true_scalar_to_rank3",
      "inputs": {
        "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-2.5] } },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 2, 3] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
    },
    {
      "name": "scalar_to_scalar_empty_shape",
      "inputs": {
        "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [6.5] } },
        "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
    },
    {
      "name": "broadcast_to_zero_width_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1",
        "notes": "Valid empty-output broadcast: input shape [1,0] expands to [3,0]. No elements are written, but generated stride math must still compile."
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [1, 0], "data": { "kind": "values", "values": [] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 0] } }
      },
      "outputs": {
        "output": { "dtype": "float32", "shape": [3, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
      }
    },
    {
      "name": "broadcast_to_zero_middle_dim_scalar",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1x3x1_int64",
        "notes": "Scalar-template companion for zero-sized broadcast output: the final dimension is not vec4-aligned, so the generic Expand shader must handle zero strides."
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [1, 0, 5], "data": { "kind": "values", "values": [] } },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 0, 5] } }
      },
      "outputs": {
        "output": { "dtype": "float32", "shape": [3, 0, 5], "tolerance": 0, "data": { "kind": "values", "values": [] } }
      }
    },
    {
      "name": "ort_int32_scalar_to_3x3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x3_int32"
      },
      "inputs": {
        "input": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_int32_vector_to_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1_int32"
      },
      "inputs": {
        "input": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_int32_rank4_singletons",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1x3x1_int64",
        "notes": "Same rank-4 singleton broadcast pattern adapted to int32 storage."
      },
      "inputs": {
        "input": {
          "dtype": "int32",
          "shape": [1, 3, 1, 3],
          "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9] }
        },
        "shape": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [3, 3, 3, 3] } }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 3, 3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_f16_scalar_to_3x3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x3_float16"
      },
      "inputs": {
        "input": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": [1.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
    },
    {
      "name": "ort_f16_vector_to_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1_float16"
      },
      "inputs": {
        "input": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
    },
    {
      "name": "ort_f16_col_vector_to_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3_float16"
      },
      "inputs": {
        "input": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
    },
    {
      "name": "ort_uint32_bool_scalar_to_3x3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x3_bool",
        "notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
      },
      "inputs": {
        "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [1] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_uint32_bool_col_to_four_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x4_bool",
        "notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
      },
      "inputs": {
        "input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 4] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [3, 4], "tolerance": 0 } }
    },
    {
      "name": "ort_shape_dim_one_does_not_shrink_rank5",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_2x2x1x2x1_float"
      },
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [2, 2, 1, 2, 1],
          "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] }
        },
        "shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [1, 2, 2, 2, 2] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2, 2, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "ort_shape_dim_one_does_not_shrink_middle",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1x8_float"
      },
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [3, 2, 1],
          "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
        },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 1, 8] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 2, 8], "tolerance": 0.000001 } }
    },
    {
      "name": "ort_int32_col_vector_to_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3_int32"
      },
      "inputs": {
        "input": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 2, 3] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_uint32_bool_col_to_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3_bool",
        "notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
      },
      "inputs": {
        "input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_uint32_bool_row_to_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_4x1_bool",
        "notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
      },
      "inputs": {
        "input": { "dtype": "uint32", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [4, 4], "tolerance": 0 } }
    },
    {
      "name": "ort_scalar_float_empty_shape",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_scalar_float"
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } },
        "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
    },
    {
      "name": "onnx_backend_expand_dim_changed",
      "inputs": {
        "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 1, 6] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 6] } },
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_changed",
        "notes": "ONNX int64 metadata/index tensors use framework int32/uint32 slots where representable."
      }
    },
    {
      "name": "onnx_backend_expand_dim_unchanged",
      "inputs": {
        "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [3, 4] } },
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_unchanged",
        "notes": "ONNX int64 metadata/index tensors use framework int32/uint32 slots where representable."
      }
    },
    {
      "name": "ort_scalar_float_to_scalar",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_scalar_float",
        "notes": "ORT shape is int64; this framework stores the empty shape tensor in uint32 slots."
      },
      "inputs": {
        "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } },
        "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0 } }
    },
    {
      "name": "ort_scalar_int32_to_rank3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_scalar_int32",
        "notes": "ORT shape is int64; this framework stores representable shape values in uint32 slots."
      },
      "inputs": {
        "input": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [9] } },
        "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
      },
      "outputs": { "output": { "dtype": "int32", "shape": [2, 3, 4], "tolerance": 0 } }
    },
    {
      "name": "ort_bool_pattern_uint32_row_expand",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1_bool",
        "notes": "ORT uses bool payloads; this framework represents logical bool-like values as uint32 slots."
      },
      "inputs": {
        "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_int8_vector_to_rows_edge_values",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1_int32",
        "notes": "Same row-broadcast shape as ORT's int32 case, using ONNX-valid signed byte edge values."
      },
      "inputs": {
        "input": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-128, -1, 127] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": { "output": { "dtype": "int8", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_uint8_col_vector_to_cols_edge_values",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3_int32",
        "notes": "Same column-broadcast shape as ORT's int32 case, using ONNX-valid unsigned byte edge values."
      },
      "inputs": {
        "input": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [0, 128, 255] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": { "output": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } }
    },
    {
      "name": "ort_bool_scalar_to_3x3",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x3_bool"
      },
      "inputs": {
        "input": { "dtype": "bool", "shape": [1], "data": { "kind": "values", "values": [1] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
      },
      "outputs": {
        "output": {
          "dtype": "bool",
          "shape": [3, 3],
          "tolerance": 0,
          "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1, 1] }
        }
      }
    },
    {
      "name": "ort_bool_vector_to_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_3x1_bool"
      },
      "inputs": {
        "input": { "dtype": "bool", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
      },
      "outputs": {
        "output": {
          "dtype": "bool",
          "shape": [3, 3],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 1, 0, 0, 1, 0, 0, 1, 0] }
        }
      }
    },
    {
      "name": "ort_bool_col_to_cols",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_1x3_bool",
        "notes": "The requested shape has a leading dimension of 1; ONNX Expand keeps the input's leading dimension of 3 rather than shrinking it."
      },
      "inputs": {
        "input": { "dtype": "bool", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
      },
      "outputs": {
        "output": {
          "dtype": "bool",
          "shape": [3, 3],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 0, 0, 1, 1, 1, 0, 0, 0] }
        }
      }
    },
    {
      "name": "ort_bool_row_to_four_rows",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
        "test": "ExpandOpTest.Expand_4x1_bool"
      },
      "inputs": {
        "input": { "dtype": "bool", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } }
      },
      "outputs": {
        "output": {
          "dtype": "bool",
          "shape": [4, 4],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0] }
        }
      }
    },
    {
      "name": "int8_vec4_path_edge_values",
      "inputs": {
        "input": { "dtype": "int8", "shape": [1, 4], "data": { "kind": "values", "values": [-128, -1, 0, 127] } },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } }
      },
      "outputs": { "output": { "dtype": "int8", "shape": [3, 4], "tolerance": 0 } }
    },
    {
      "name": "uint8_vec4_path_broadcast_row",
      "inputs": {
        "input": {
          "dtype": "uint8",
          "shape": [1, 8],
          "data": { "kind": "values", "values": [0, 64, 128, 192, 255, 1, 127, 254] }
        },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 8] } }
      },
      "outputs": { "output": { "dtype": "uint8", "shape": [4, 8], "tolerance": 0 } }
    },
    {
      "name": "rank7_vec4_last_dim_divisible",
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [2, 1, 3, 1, 2, 1, 4],
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
        },
        "shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 3, 3, 2, 2, 2, 4] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3, 2, 2, 2, 4], "tolerance": 0.000001 } }
    },
    {
      "name": "rank8_broadcast",
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [1, 2, 1, 3, 1, 1, 2, 1],
          "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
        },
        "shape": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2, 2] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "f16_vec4_row_broadcast",
      "provenance": {
        "source": "authored for render coverage",
        "test": "expand-vec4 `usesF16` arm",
        "notes": "A float16 output whose innermost dimension is four exercises vec4 broadcasting and half-precision storage. Expand only copies exactly representable values, so the expected output is exact at tolerance zero."
      },
      "inputs": {
        "input": {
          "dtype": "float16",
          "shape": [1, 8],
          "data": { "kind": "values", "values": [1.0, -2.0, 3.5, -4.25, 8.0, -16.5, 0.125, 64.0] }
        },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 8] } }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [3, 8], "tolerance": 0 } }
    },
    {
      "name": "same_shape_identity_vec4",
      "provenance": {
        "source": "authored for render coverage",
        "test": "expand-vec4 `x_same` arm",
        "notes": "The requested shape equals the input shape, so expand-vec4 takes the x_same branch and emits the identity offset `return out_index;` instead of including expand-broadcast-offset. No other case has an input shape identical to the output shape while the innermost dim is divisible by 4; every other vec4-eligible case broadcasts at least one axis. All eight values are distinct so a wrong offset in the identity path shows up per position."
      },
      "inputs": {
        "input": {
          "dtype": "float32",
          "shape": [2, 4],
          "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] }
        },
        "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0 } }
    }
  ]
}