File size: 42,313 Bytes
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a695686
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
36920ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21aa3ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36920ad
 
 
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
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
{
  "fixtureArrays": {
    "onnx_backend_roialign_input_x": [0.27639999985694885, 0.7149999737739563, 0.19580000638961792, 0.3416000008583069, 0.46380001306533813, 0.02590000070631504, 0.2962999939918518, 0.6517999768257141, 0.48559999465942383, 0.7250000238418579, 0.963699996471405, 0.08950000256299973, 0.29190000891685486, 0.6753000020980835, 0.023399999365210533, 0.6132000088691711, 0.8084999918937683, 0.5324000120162964, 0.8992000222206116, 0.44670000672340393, 0.3264999985694885, 0.8478999733924866, 0.9697999954223633, 0.24709999561309814, 0.9336000084877014, 0.18780000507831573, 0.4765999913215637, 0.4307999908924103, 0.3400000035762787, 0.21619999408721924, 0.020600000396370888, 0.1720000058412552, 0.21549999713897705, 0.43939998745918274, 0.06530000269412994, 0.34060001373291016, 0.7724000215530396, 0.3921000063419342, 0.2540999948978424, 0.5799000263214111, 0.40619999170303345, 0.21940000355243683, 0.447299987077713, 0.46869999170303345, 0.7109000086784363, 0.932699978351593, 0.9815000295639038, 0.6320000290870667, 0.1728000044822693, 0.6118999719619751, 0.30970001220703125, 0.1282999962568283, 0.4984000027179718, 0.5067999958992004, 0.4278999865055084, 0.01730000041425228, 0.43880000710487366, 0.0430000014603138, 0.46709999442100525, 0.711899995803833, 0.10109999775886536, 0.8476999998092651, 0.4726000130176544, 0.1776999980211258, 0.9922999739646912, 0.4041999876499176, 0.18690000474452972, 0.7795000076293945, 0.9945999979972839, 0.9689000248908997, 0.13660000264644623, 0.3671000003814697, 0.7010999917984009, 0.6233999729156494, 0.9866999983787537, 0.5584999918937683, 0.6984999775886536, 0.5608999729156494, 0.8787999749183655, 0.9927999973297119, 0.5697000026702881, 0.8511000275611877, 0.6711000204086304, 0.9405999779701233, 0.8751000165939331, 0.7495999932289124, 0.16500000655651093, 0.10490000247955322, 0.1559000015258789, 0.2513999938964844, 0.701200008392334, 0.40560001134872437, 0.7878999710083008, 0.34610000252723694, 0.04149999842047691, 0.29980000853538513, 0.5094000101089478, 0.3727000057697296, 0.5482000112533569, 0.050200000405311584],
    "avg_single_roi_f32_input_x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
    "ort_f16_half_pixel_8x8_sampling2_input_x": [0, 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],
    "onnx_backend_aligned_false_5x5_input_x": [0.2764, 0.715, 0.1958, 0.3416, 0.4638, 0.0259, 0.2963, 0.6518, 0.4856, 0.725, 0.9637, 0.0895, 0.2919, 0.6753, 0.0234, 0.6132, 0.8085, 0.5324, 0.8992, 0.4467, 0.3265, 0.8479, 0.9698, 0.2471, 0.9336, 0.1878, 0.4766, 0.4308, 0.34, 0.2162, 0.0206, 0.172, 0.2155, 0.4394, 0.0653, 0.3406, 0.7724, 0.3921, 0.2541, 0.5799, 0.4062, 0.2194, 0.4473, 0.4687, 0.7109, 0.9327, 0.9815, 0.632, 0.1728, 0.6119, 0.3097, 0.1283, 0.4984, 0.5068, 0.4279, 0.0173, 0.4388, 0.043, 0.4671, 0.7119, 0.1011, 0.8477, 0.4726, 0.1777, 0.9923, 0.4042, 0.1869, 0.7795, 0.9946, 0.9689, 0.1366, 0.3671, 0.7011, 0.6234, 0.9867, 0.5585, 0.6985, 0.5609, 0.8788, 0.9928, 0.5697, 0.8511, 0.6711, 0.9406, 0.8751, 0.7496, 0.165, 0.1049, 0.1559, 0.2514, 0.7012, 0.4056, 0.7879, 0.3461, 0.0415, 0.2998, 0.5094, 0.3727, 0.5482, 0.0502],
    "ort_out_of_bounds_degenerate_rois_half_pixel_input_x": [0, 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],
    "ort_out_of_bounds_degenerate_rois_half_pixel_input_rois": [7, 5, 7, 5, -15, -15, -15, -15, -10, 21, -10, 21, 13, 8, 13, 8, -14, 19, -14, 19]
  },
  "cases": [
    {
      "name": "onnx_default_adaptive_sampling_omitted",
      "provenance": {
        "source": "https://onnx.ai/onnx/operators/onnx__RoiAlign.html",
        "test": "RoiAlign sampling_ratio default",
        "notes": "Omitted sampling_ratio, mode, and spatial_scale exercise their ONNX defaults (0, avg, and 1). The adaptive grid produces 0.625 for this nonlinear feature map; a fixed one-sample grid would produce 2.5."
      },
      "attrs": { "coordinate_transformation_mode": "half_pixel" },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 4, 4],
          "data": {
            "kind": "values",
            "values": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
          }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 4.0, 4.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 1, 1],
          "tolerance": 0.000001,
          "data": { "kind": "values", "values": [0.625] }
        }
      }
    },
    {
      "name": "avg_half_pixel_exact_subnormal_pixel_gpu_gap",
      "skipGpu": {
        "category": "permanent",
        "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes denormals to zero in the ALU; RoiAlign interpolation/pooling arithmetic flushes the subnormal pixel on GPU. Permanent FTZ limitation."
      },
      "provenance": {
        "notes": "A zero-area half-pixel ROI samples exactly at pixel (0, 0); the positive subnormal payload should survive avg mode."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 1,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "data": { "kind": "values", "values": [1e-40, 0.0, 0.0, 0.0] }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.5, 0.5, 0.5, 0.5] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } }
    },
    {
      "name": "max_half_pixel_exact_subnormal_pixel_gpu_gap",
      "skipGpu": {
        "category": "permanent",
        "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes denormals to zero in the ALU; RoiAlign interpolation/pooling arithmetic flushes the subnormal pixel on GPU. Permanent FTZ limitation."
      },
      "provenance": {
        "notes": "Max mode must preserve the exact positive subnormal sample because it is greater than every zero-valued neighbor."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 1,
        "mode": "max",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "data": { "kind": "values", "values": [1e-40, 0.0, 0.0, 0.0] }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.5, 0.5, 0.5, 0.5] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } }
    },
    {
      "name": "max_half_pixel_fractional_sample_matches_ort",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.MaxModePositive",
        "notes": "Max mode takes the maximum weighted corner contribution at a fractional sample point; this pins the unintuitive fractional-sample behavior."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 1,
        "mode": "max",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 2.0, 2.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 1, 1],
          "tolerance": 0.000001,
          "data": { "kind": "values", "values": [1.0] }
        }
      }
    },
    {
      "name": "dispatch_cliff_nchw_over_16m_elements",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 1, "mode": "avg", "output_height": 64, "output_width": 64 },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 256, 16, 16] },
        "rois": { "dtype": "float32", "shape": [16, 4], "data": { "kind": "cycle", "values": [0.0, 0.0, 15.0, 15.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [16], "data": { "kind": "constant", "value": 0 } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [16, 256, 64, 64], "tolerance": 0.001 } }
    },
    {
      "name": "avg_single_roi_f32",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 2, "mode": "avg", "output_height": 2, "output_width": 2 },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 4, 4],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/avg_single_roi_f32_input_x" } }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 3.0, 3.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "max_two_rois_f16",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 1, "mode": "max", "output_height": 1, "output_width": 1 },
      "inputs": {
        "x": {
          "dtype": "float16",
          "shape": [1, 1, 4, 4],
          "data": {
            "kind": "values",
            "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]
          }
        },
        "rois": {
          "dtype": "float16",
          "shape": [2, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 2.0, 2.0, 1.0, 1.0, 2.0, 2.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } }
      },
      "outputs": { "y": { "dtype": "float16", "shape": [2, 1, 1, 1], "tolerance": 0.002 } }
    },
    {
      "name": "ort_f16_half_pixel_8x8_sampling2",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.Float16_HalfPixel_Opset16"
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": {
          "dtype": "float16",
          "shape": [1, 1, 8, 8],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_f16_half_pixel_8x8_sampling2_input_x" } }
        },
        "rois": { "dtype": "float16", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 7.0, 7.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 2, 2], "tolerance": 0.01 } }
    },
    {
      "name": "ort_f16_output_half_pixel_2x2_sampling1",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.Float16_Opset22"
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 1,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": { "dtype": "float16", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 1.0, 1.0] } },
        "rois": { "dtype": "float16", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 1.0, 1.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 1, 1], "tolerance": 0.01 } }
    },
    {
      "name": "half_pixel_small_roi_no_min_size_f32",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 1, "mode": "avg", "output_height": 1, "output_width": 1 },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 4, 4],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/avg_single_roi_f32_input_x" } }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [1.0, 1.0, 1.5, 1.5] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0.000001 } }
    },
    {
      "name": "avg_output_half_pixel_mode",
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 4, 4],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/avg_single_roi_f32_input_x" } }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 3.0, 3.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 2], "tolerance": 0.000001 } }
    },
    {
      "name": "avg_two_batches_two_channels",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 1, "mode": "avg", "output_height": 1, "output_width": 1 },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [2, 2, 3, 3],
          "data": {
            "kind": "values",
            "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0]
          }
        },
        "rois": {
          "dtype": "float32",
          "shape": [2, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 2.0, 2.0, 1.0, 1.0, 2.0, 2.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [0, 1] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 1, 1], "tolerance": 0.000001 } }
    },
    {
      "name": "onnx_backend_aligned_false_5x5",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/case/node/roialign.py",
        "test": "test_roialign_aligned_false"
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 5,
        "output_width": 5
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 10, 10],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_aligned_false_5x5_input_x" } }
        },
        "rois": {
          "dtype": "float32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 9.0, 9.0, 0.0, 5.0, 4.0, 9.0, 5.0, 5.0, 9.0, 9.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 5, 5], "tolerance": 0.0002 } }
    },
    {
      "name": "onnx_backend_aligned_true_5x5",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/case/node/roialign.py",
        "test": "test_roialign_aligned_true"
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 5,
        "output_width": 5
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 10, 10],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_aligned_false_5x5_input_x" } }
        },
        "rois": {
          "dtype": "float32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 9.0, 9.0, 0.0, 5.0, 4.0, 9.0, 5.0, 5.0, 9.0, 9.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 5, 5], "tolerance": 0.0002 } }
    },
    {
      "name": "ort_out_of_bounds_degenerate_rois_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.AvgModePositive_half_pixel"
      },
      "attrs": {
        "spatial_scale": 0.0625,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 3,
        "output_width": 4
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 3, 5, 5],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_x" }
          }
        },
        "rois": {
          "dtype": "float32",
          "shape": [5, 4],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_rois" }
          }
        },
        "batch_indices": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [5, 3, 3, 4], "tolerance": 0.00001 } }
    },
    {
      "name": "ort_out_of_bounds_degenerate_rois_output_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.AvgModePositive_output_half_pixel"
      },
      "attrs": {
        "spatial_scale": 0.0625,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 3,
        "output_width": 4
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 3, 5, 5],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_x" }
          }
        },
        "rois": {
          "dtype": "float32",
          "shape": [5, 4],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_rois" }
          }
        },
        "batch_indices": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [5, 3, 3, 4], "tolerance": 0.00001 } }
    },
    {
      "name": "onnx_backend_roialign_aligned_false",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_roialign_aligned_false",
        "notes": "Representable ONNX int64 batch_indices values are stored in uint32 slots."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 5,
        "output_width": 5
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 10, 10],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_roialign_input_x" } }
        },
        "rois": {
          "dtype": "float32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 9.0, 9.0, 0.0, 5.0, 4.0, 9.0, 5.0, 5.0, 9.0, 9.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 5, 5], "tolerance": 0.0002 } }
    },
    {
      "name": "onnx_backend_roialign_aligned_true",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_roialign_aligned_true",
        "notes": "Representable ONNX int64 batch_indices values are stored in uint32 slots."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 5,
        "output_width": 5
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 10, 10],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_roialign_input_x" } }
        },
        "rois": {
          "dtype": "float32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 9.0, 9.0, 0.0, 5.0, 4.0, 9.0, 5.0, 5.0, 9.0, 9.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 5, 5], "tolerance": 0.0002 } }
    },
    {
      "name": "onnx_backend_roialign_mode_max",
      "provenance": {
        "source": "cmake/external/onnx/onnx/backend/test/data/node/test_roialign_mode_max",
        "notes": "Representable ONNX int64 batch_indices values are stored in uint32 slots."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 2,
        "mode": "max",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 5,
        "output_width": 5
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 10, 10],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_roialign_input_x" } }
        },
        "rois": {
          "dtype": "float32",
          "shape": [3, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 9.0, 9.0, 0.0, 5.0, 4.0, 9.0, 5.0, 5.0, 9.0, 9.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [3, 1, 5, 5], "tolerance": 0.0002 } }
    },
    {
      "name": "ort_f16_adaptive_sampling_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.Float16_AdaptiveSampling_Opset16",
        "notes": "Exercises adaptive per-bin sampling with sampling_ratio=0 and half_pixel coordinates in float16."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": {
          "dtype": "float16",
          "shape": [1, 1, 8, 8],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_f16_half_pixel_8x8_sampling2_input_x" } }
        },
        "rois": { "dtype": "float16", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 7.0, 7.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float16",
          "shape": [1, 1, 2, 2],
          "tolerance": 0.01,
          "data": { "kind": "values", "values": [11.39062, 14.875, 39.26562, 42.75] }
        }
      }
    },
    {
      "name": "ort_f32_adaptive_sampling_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.Float16_AdaptiveSampling_Opset16",
        "notes": "Exercises adaptive per-bin sampling with sampling_ratio=0 and half_pixel coordinates in float32."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 8, 8],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_f16_half_pixel_8x8_sampling2_input_x" } }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 7.0, 7.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "tolerance": 0.00001,
          "data": { "kind": "values", "values": [11.390625, 14.875, 39.265625, 42.75] }
        }
      }
    },
    {
      "name": "adaptive_avg_output_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.Float16_AdaptiveSampling_Opset16",
        "notes": "Exercises adaptive average pooling with sampling_ratio=0 and output_half_pixel coordinates."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 4, 4],
          "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/avg_single_roi_f32_input_x" } }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 4.0, 4.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "tolerance": 0.00001,
          "data": { "kind": "values", "values": [5.0, 6.75, 12.0, 13.75] }
        }
      }
    },
    {
      "name": "ort_max_out_of_bounds_degenerate_rois_output_half_pixel",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/object_detection/roialign_test.cc",
        "test": "RoiAlignTest.MaxModePositive",
        "notes": "Opset-10 RoiAlign behavior maps to output_half_pixel in current ONNX attributes."
      },
      "attrs": {
        "spatial_scale": 0.0625,
        "sampling_ratio": 2,
        "mode": "max",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 3,
        "output_width": 4
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 3, 5, 5],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_x" }
          }
        },
        "rois": {
          "dtype": "float32",
          "shape": [5, 4],
          "data": {
            "kind": "values",
            "values": { "$ref": "#/fixtureArrays/ort_out_of_bounds_degenerate_rois_half_pixel_input_rois" }
          }
        },
        "batch_indices": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [0, 0, 0, 0, 0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [5, 3, 3, 4], "tolerance": 0.00001 } }
    },
    {
      "name": "empty_input_zero_dim",
      "attrs": { "spatial_scale": 1, "sampling_ratio": 2, "mode": "avg", "output_height": 4, "output_width": 4 },
      "inputs": {
        "x": { "dtype": "float32", "shape": [0, 1, 4, 4], "data": { "kind": "values", "values": [] } },
        "rois": { "dtype": "float32", "shape": [0, 4], "data": { "kind": "values", "values": [] } },
        "batch_indices": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [0, 1, 4, 4], "tolerance": 0 } }
    },
    {
      "name": "adaptive_sampling_zero_constant_input_avg_grid_bounds",
      "provenance": {
        "notes": "sampling_ratio=0 selects an adaptive grid with at least one sample per axis. Constant input makes every bilinear sample equal to that constant regardless of the grid, so the inline expected output is exact."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 4,
        "output_width": 4
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 2, 16, 16], "data": { "kind": "constant", "value": 3.5 } },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [1.0, 1.0, 14.0, 14.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 2, 4, 4],
          "tolerance": 0.00001,
          "data": { "kind": "constant", "value": 3.5 }
        }
      }
    },
    {
      "name": "adaptive_sampling_zero_area_roi_grid_clamp_no_divzero",
      "provenance": {
        "notes": "For a zero-area ROI with sampling_ratio=0, each zero-sized bin clamps its adaptive grid to one sample, avoiding division by zero. Constant input makes every expected sample exactly 2.0."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 1, 8, 8], "data": { "kind": "constant", "value": 2.0 } },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [3.0, 3.0, 3.0, 3.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "tolerance": 0.00001,
          "data": { "kind": "constant", "value": 2.0 }
        }
      }
    },
    {
      "name": "dispatch_fold_over_16m_constant_input_exact",
      "provenance": {
        "notes": "Y=16,842,752 > 16,777,216 engages the gid.y 2D-fold; constant input 1.0 with fully in-bounds ROIs makes every output exactly 1.0, so fold-arithmetic or last-row-guard bugs corrupt the high rows and fail an exact compare."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 1,
        "mode": "avg",
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 256,
        "output_width": 257
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 4, 32, 32], "data": { "kind": "constant", "value": 1.0 } },
        "rois": { "dtype": "float32", "shape": [64, 4], "data": { "kind": "cycle", "values": [0.0, 0.0, 31.0, 31.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [64], "data": { "kind": "constant", "value": 0 } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [64, 4, 256, 257],
          "tolerance": 0.00001,
          "data": { "kind": "constant", "value": 1.0 }
        }
      }
    },
    {
      "name": "adaptive_cooperative_constant_64x64_1x1_exact",
      "provenance": {
        "notes": "With sampling_ratio=0 on a 64x64 input, one output bin uses an adaptive sample grid of roughly 63x63 points. A constant input of 2.5 makes the cooperative reduction and final divisor exactly observable at tolerance zero."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 1, 64, 64], "data": { "kind": "constant", "value": 2.5 } },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 63.0, 63.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 1, 1],
          "tolerance": 0,
          "data": { "kind": "values", "values": [2.5] }
        }
      }
    },
    {
      "name": "adaptive_cooperative_varying_128x128_2x2",
      "provenance": {
        "notes": "A nonconstant input with a 2-by-2 output produces an adaptive grid of about 64-by-64 samples per bin. The input-to-pooled-area ratio of 4,096 exercises dense adaptive sampling."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 2,
        "output_width": 2
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 1, 128, 128], "data": { "kind": "linspace", "start": 0.0, "end": 4.0 } },
        "rois": {
          "dtype": "float32",
          "shape": [1, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 127.0, 127.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 2, 2], "tolerance": 0.0001 } }
    },
    {
      "name": "adaptive_cooperative_max_64x64_1x1",
      "provenance": {
        "notes": "Max mode over the adaptive grid exercises cooperative tree reduction. Exact associativity and identical per-sample bilinear arithmetic permit zero tolerance."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "max",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 64, 64],
          "data": { "kind": "linspace", "start": -5.0, "end": 100.0 }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 63.0, 63.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } }
    },
    {
      "name": "adaptive_shallow_bins_large_feature_map_scalar",
      "provenance": {
        "notes": "A realistic 7x7 pooled ROI on a 128x128 feature map has a 5x5 adaptive grid per bin and remains on the one-thread-per-output path. Constant input makes every expected output exactly 3.0."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 7,
        "output_width": 7
      },
      "inputs": {
        "x": { "dtype": "float32", "shape": [1, 1, 128, 128], "data": { "kind": "constant", "value": 3.0 } },
        "rois": {
          "dtype": "float32",
          "shape": [1, 4],
          "data": { "kind": "values", "values": [16.0, 16.0, 48.0, 48.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1, 1, 7, 7],
          "tolerance": 0.00001,
          "data": { "kind": "constant", "value": 3.0 }
        }
      }
    },
    {
      "name": "adaptive_split_varying_257x257_1x1_channel_tail",
      "provenance": {
        "notes": "A non-divisible 256-by-255 adaptive grid over three output channels creates many empty split partitions and verifies partial normalization and combine indexing."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 3, 257, 257],
          "data": { "kind": "linspace", "start": -2.0, "end": 5.0 }
        },
        "rois": {
          "dtype": "float32",
          "shape": [1, 4],
          "data": { "kind": "values", "values": [0.25, 1.5, 256.0, 256.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 3, 1, 1], "tolerance": 0.0002 } }
    },
    {
      "name": "adaptive_split_max_256x256_1x1",
      "provenance": {
        "notes": "A 256x256 adaptive grid exercises the max-mode split combine. The small tolerance covers float32 contraction and rounding in bilinear sample evaluation without hiding an incorrect maximum."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "max",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 256, 256],
          "data": { "kind": "linspace", "start": -3.0, "end": 9.0 }
        },
        "rois": {
          "dtype": "float32",
          "shape": [1, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 255.0, 255.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0.0005 } }
    },
    {
      "name": "adaptive_cooperative_constant_64x64_1x1_exact_f16",
      "provenance": {
        "notes": "A float16 cooperative adaptive-sampling case uses constant 2.5 input, so every bilinear sample and the reduced average are exactly 2.5 regardless of reduction order."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": { "dtype": "float16", "shape": [1, 1, 64, 64], "data": { "kind": "constant", "value": 2.5 } },
        "rois": { "dtype": "float16", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 63.0, 63.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float16",
          "shape": [1, 1, 1, 1],
          "tolerance": 0,
          "data": { "kind": "values", "values": [2.5] }
        }
      }
    },
    {
      "name": "adaptive_split_constant_256x256_1x1_exact_f16",
      "provenance": {
        "notes": "A float16 256-by-256 input pooled to 1-by-1 reaches the 65,536 input-to-output area ratio for split adaptive sampling. Constant input makes the average exact, verifying split partials and their combine at zero tolerance."
      },
      "attrs": {
        "spatial_scale": 1,
        "sampling_ratio": 0,
        "mode": "avg",
        "coordinate_transformation_mode": "half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": { "dtype": "float16", "shape": [1, 1, 256, 256], "data": { "kind": "constant", "value": 2.5 } },
        "rois": {
          "dtype": "float16",
          "shape": [1, 4],
          "data": { "kind": "values", "values": [0.0, 0.0, 255.0, 255.0] }
        },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": {
        "y": {
          "dtype": "float16",
          "shape": [1, 1, 1, 1],
          "tolerance": 0,
          "data": { "kind": "values", "values": [2.5] }
        }
      }
    },
    {
      "name": "max_all_negative_infinity_samples",
      "provenance": {
        "notes": "Every bilinear weight at this single centre sample is strictly positive, so the pooled value is exactly -Infinity with no 0 * Infinity ambiguity. The max reductions used a finite -FLT_MAX identity that a sampled -Infinity could not replace, and reported the sentinel instead."
      },
      "attrs": {
        "mode": "max",
        "sampling_ratio": 1,
        "coordinate_transformation_mode": "output_half_pixel",
        "output_height": 1,
        "output_width": 1
      },
      "inputs": {
        "x": {
          "dtype": "float32",
          "shape": [1, 1, 2, 2],
          "data": { "kind": "values", "values": ["-Infinity", "-Infinity", "-Infinity", "-Infinity"] }
        },
        "rois": { "dtype": "float32", "shape": [1, 4], "data": { "kind": "values", "values": [0.0, 0.0, 1.0, 1.0] } },
        "batch_indices": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }
      },
      "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 0 } }
    }
  ]
}