File size: 61,083 Bytes
9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 e0b7578 9337f34 | 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 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | {
"fixtureArrays": {
"scatter_nd_data_4x4x4": [1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8],
"backend_row_slice_updates_input_updates": [5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4],
"ort_reduction_add_slice_duplicates_input_updates": [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144],
"f16_reduction_add_sparse_router_gradient_input_indices": [0, 17, 34, 51, 4, 21, 38, 55, 8, 25, 42, 59, 12, 29, 46, 63, 16, 33, 50, 3, 20, 37, 54, 7, 24, 41, 58, 11, 28, 45, 62, 15, 32, 49, 2, 19, 36, 53, 6, 23, 40, 57, 10, 27, 44, 61, 14, 31, 48, 1, 18, 35, 52, 5, 22, 39, 56, 9, 26, 43, 60, 13, 30, 47]
},
"cases": [
{
"name": "dispatch_cliff_batch0_row_update",
"inputs": {
"data": { "dtype": "float32", "shape": [1, 16777219], "data": { "kind": "constant", "value": 1.0 } },
"indices": { "dtype": "int32", "shape": [1, 1], "data": { "kind": "values", "values": [0] } },
"updates": { "dtype": "float32", "shape": [1, 16777219], "data": { "kind": "constant", "value": 7.0 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 16777219], "tolerance": 0 } }
},
{
"name": "scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 20.0, 21.0, 22.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 2, 2, 1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [99.0, 77.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3] } }
},
{
"name": "row_updates_f16",
"inputs": {
"data": { "dtype": "float16", "shape": [3, 4] },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [2, 0] } },
"updates": {
"dtype": "float16",
"shape": [2, 4],
"data": { "kind": "values", "values": [9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4] } },
"tolerance": 0.001
},
{
"name": "rank5_indices_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0] }
},
"indices": { "dtype": "int32", "shape": [1, 1, 1, 1, 2], "data": { "kind": "values", "values": [1, 2] } },
"updates": { "dtype": "float32", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [99.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "rank6_indices_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 20.0, 21.0, 22.0] }
},
"indices": {
"dtype": "int32",
"shape": [1, 1, 1, 1, 2, 2],
"data": { "kind": "values", "values": [0, 2, 2, 0] }
},
"updates": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 2],
"data": { "kind": "values", "values": [99.0, 77.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "rank6_full_depth_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 2, 1, 2, 1, 3],
"data": {
"kind": "values",
"values": [0.0, 1.0, 2.0, 10.0, 11.0, 12.0, 100.0, 101.0, 102.0, 110.0, 111.0, 112.0]
}
},
"indices": {
"dtype": "int32",
"shape": [2, 6],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [900.0, 901.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 2, 1, 3], "tolerance": 0.000001 } }
},
{
"name": "reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 1, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, 3.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "reduction_add_subnormal_duplicate_indices_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, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate-index add reduction with finite subnormal scalar updates; valid tiny updates must accumulate to nonzero subnormal outputs."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [1, 1, 3, 3] } },
"updates": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1e-40, 1e-40, -1e-40, -1e-40] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 1e-44 } }
},
{
"name": "reduction_mul_normal_inputs_subnormal_product_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, so this reduction's subnormal sum/product result is flushed on GPU; permanent FTZ limitation."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul",
"notes": "Duplicate-index mul reduction where tiny normal updates produce a finite subnormal product."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 1.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [1, 1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1e-20, 1e-20] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 1e-44 } }
},
{
"name": "rank6_indices_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } },
"indices": { "dtype": "int32", "shape": [1, 1, 1, 1, 3, 1], "data": { "kind": "values", "values": [1, 1, 2] } },
"updates": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 3],
"data": { "kind": "values", "values": [2.0, 3.0, 4.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "rank6_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 1, 4],
"data": { "kind": "values", "values": [0.0, 10.0, 20.0, 30.0] }
},
"indices": {
"dtype": "int32",
"shape": [3, 6],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3] }
},
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, 3.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 4], "tolerance": 0.000001 } }
},
{
"name": "backend_row_slice_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4], "tolerance": 0.000001 } }
},
{
"name": "backend_row_slice_reduction_add_duplicate",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4], "tolerance": 0.000001 } }
},
{
"name": "ort_slice_float_rank2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_slice_float_int64_t"
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.0, 0.1, 0.1, 0.1] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [1, 0] } },
"updates": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.2, 0.3, 0.0, 0.1] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_3tensor_int16_slice_update",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64"
},
"inputs": {
"data": {
"dtype": "int16",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 2, 3, 0, 1, 2, 3] }
},
"indices": { "dtype": "int32", "shape": [1, 1], "data": { "kind": "values", "values": [1] } },
"updates": { "dtype": "int16", "shape": [1, 2, 2], "data": { "kind": "values", "values": [4, 5, 6, 7] } }
},
"outputs": { "output": { "dtype": "int16", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "ort_batched_index_float_adapted",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_index_int64",
"notes": "A float32 payload exercises the batched-index pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [2.0, 3.0, 2.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0, 0, 0, 1] } },
"updates": { "dtype": "float32", "shape": [2, 1], "data": { "kind": "values", "values": [0.0, 1.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_batched_index_bool",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_index_bool_int64"
},
"inputs": {
"data": { "dtype": "bool", "shape": [2, 2], "data": { "kind": "values", "values": [0, 1, 0, 1] } },
"indices": { "dtype": "int32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [0, 0, 0, 1] } },
"updates": { "dtype": "bool", "shape": [2, 1], "data": { "kind": "values", "values": [1, 0] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [2, 2],
"data": { "kind": "values", "values": [1, 0, 0, 1] },
"tolerance": 0
}
}
},
{
"name": "ort_sliced_index_float_adapted",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_sliced_index_int64",
"notes": "A float32 payload exercises the sliced-index update pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [2, 1, 1], "data": { "kind": "values", "values": [1, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 1, 2],
"data": { "kind": "values", "values": [2.0, 3.0, 0.0, 1.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_uint32_batched_index_depth2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_batched_3tensor_int64",
"notes": "A compact uint32 ScatterND case uses batched depth-2 indices."
},
"inputs": {
"data": {
"dtype": "uint32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 0, 0] }
},
"indices": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 1, 0, 0, 0, 1, 1] }
},
"updates": {
"dtype": "uint32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [2, 3, 4, 5, 0, 1, 6, 7] }
}
},
"outputs": { "output": { "dtype": "uint32", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "ort_int8_negative_indices_scalar_updates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "Compact signed-byte scalar-update fixture with negative indices and edge payload values."
},
"inputs": {
"data": {
"dtype": "int8",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 0, 2, 3, 4, 0, 6, 7] }
},
"indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [0, 0, 1, -1, 0, -1] } },
"updates": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-128, 127] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [2, 2, 2], "tolerance": 0 } }
},
{
"name": "empty_indices_zero_width_update_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_empty_indices",
"notes": "Valid empty-index ScatterND identity where both the data suffix and update suffix have zero width."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } },
"indices": { "dtype": "int32", "shape": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "empty_indices_zero_width_reduction_add_identity",
"provenance": {
"notes": "An empty index tensor with a zero-width data suffix leaves the input unchanged under add reduction. The slice path must return without dividing by the zero inner width."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [2, 0], "data": { "kind": "values", "values": [] } },
"indices": { "dtype": "int32", "shape": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "ort_empty_indices_identity",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_empty_indices"
},
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
},
"indices": { "dtype": "int32", "shape": [0, 1], "data": { "kind": "values", "values": [] } },
"updates": { "dtype": "float32", "shape": [0, 3], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0 } }
},
{
"name": "ort_reduction_add_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add"
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_mul_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul"
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_min_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_min"
},
"attrs": { "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_max"
},
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_negative_indices_matrix",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_matrice_int64_int64_neg_indices",
"notes": "A float32 payload and int32 indices exercise the negative-index pattern."
},
"inputs": {
"data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 1.0, 2.0, 2.0] } },
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 0, -1, -1] } },
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.0, 3.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_negative_indices_slice_update_rank3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "A float32 payload and int32 indices exercise a negative-index slice update."
},
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, -1, -1, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 2],
"data": { "kind": "values", "values": [20.0, 21.0, 30.0, 31.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_mul_rank6_slice_duplicates",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_mul_long_shape",
"notes": "A rank-6 tensor with duplicate indices exercises multiply reduction over long slices."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3, 1, 1, 1],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3, 1, 1, 1],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3, 1, 1, 1], "tolerance": 0.01 } }
},
{
"name": "ort_reduction_min_updates_win_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_min",
"notes": "Uses ORT's reduction=min semantics with values chosen so both data and duplicate updates affect the answer."
},
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [5.0, -1.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [2.0, -4.0, 10.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "ort_reduction_max_updates_win_duplicate_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_max",
"notes": "Uses ORT's reduction=max semantics with values chosen so both data and duplicate updates affect the answer."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-5.0, 1.0, 3.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-2.0, 4.0, 2.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_scatternd",
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 2] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_add",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_add",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_max",
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_max",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_min",
"attrs": { "reduction": "min" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_min",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "onnx_backend_scatternd_multiply",
"attrs": { "reduction": "mul" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scatter_nd_data_4x4x4" } }
},
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": {
"dtype": "float32",
"shape": [2, 4, 4],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/backend_row_slice_updates_input_updates" } }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [4, 4, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_scatternd_multiply",
"notes": "This WebGPU package stores representable ONNX int64 indices in int32 or uint32 slots."
}
},
{
"name": "ort_int32_slice_updates_negative_indices_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_3tensor_int64",
"notes": "Native int32 projection of ORT's integer slice-update case with negative indices and values above f32's exact integer range."
},
"inputs": {
"data": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [16777217, 1, 2, 3, 4, 5, -16777217, 7] }
},
"indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 1, -1, 0] } },
"updates": {
"dtype": "int32",
"shape": [2, 2],
"data": { "kind": "values", "values": [20000001, -20000001, 30000003, -30000003] }
}
},
"outputs": { "output": { "dtype": "int32", "shape": [2, 2, 2] } }
},
{
"name": "int32_reduction_add_exact_above_float24",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Integer projection of ORT's add-reduction coverage using values above f32's exact integer range."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [0, 0] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [16777217, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [2] } }
},
{
"name": "int32_reduction_min_duplicate_indices_negative",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, 4, 10] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, -7, 3] } } }
},
{
"name": "int32_reduction_max_duplicate_indices",
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-5, -7, 3] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-2, 4, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, -7, 3] } } }
},
{
"name": "int32_reduction_mul_duplicate_indices",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [2, 3, -1] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [3, 5, -4] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [30, 3, 4] } } }
},
{
"name": "uint32_reduction_add_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 2] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 0] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [10, 2] } } }
},
{
"name": "uint32_reduction_min_duplicate_indices",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [8, 1] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [5, 3, 9] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } }
},
{
"name": "uint32_reduction_max_duplicate_indices",
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 7] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [5, 9, 2] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [9, 7] } } }
},
{
"name": "uint32_reduction_mul_duplicate_indices",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 5] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 0] } },
"updates": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [72, 5] } } }
},
{
"name": "reduction_add_f32_high_contention_4096",
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, 0.0, 0.0, 0.0] } },
"indices": { "dtype": "int32", "shape": [4096, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [4096], "data": { "kind": "constant", "value": 0.25 } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1024.5, 0.0, 0.0, 0.0] },
"tolerance": 0.000001
}
}
},
{
"name": "reduction_min_f32_high_contention_2048",
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1000.0, -3.0] } },
"indices": { "dtype": "int32", "shape": [2048, 1], "data": { "kind": "constant", "value": 0 } },
"updates": {
"dtype": "float32",
"shape": [2048],
"data": { "kind": "cycle", "values": [9.0, 4.0, 7.0, 2.5, 8.0] }
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "values", "values": [2.5, -3.0] },
"tolerance": 0.000001
}
}
},
{
"name": "ort_reduction_add_slice_negative_indices",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate signed negative indices normalize to rows 0, 1, and 0 before slice-add reduction."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [2, 2, 3],
"data": { "kind": "values", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [-2, -1, -2] } },
"updates": {
"dtype": "float32",
"shape": [3, 2, 3],
"data": {
"kind": "values",
"values": { "$ref": "#/fixtureArrays/ort_reduction_add_slice_duplicates_input_updates" }
}
}
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2, 2, 3],
"tolerance": 0.01,
"data": {
"kind": "values",
"values": [8194.1, 16388.1, 32776.1, 65552.1, 131104.1, 262208.1, 128.1, 256.1, 512.1, 1024.1, 2048.1, 4096.1]
}
}
}
},
{
"name": "reduction_mul_f32_high_contention_1024",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [7.0, 2.0] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [1024], "data": { "kind": "constant", "value": 1.0 } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [2],
"data": { "kind": "values", "values": [7.0, 2.0] },
"tolerance": 0.000001
}
}
},
{
"name": "f16_reduction_add_row_slice_duplicate_indices",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [4, 4],
"data": {
"kind": "values",
"values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": {
"dtype": "float16",
"shape": [3, 4],
"data": {
"kind": "values",
"values": [0.5, 1.5, 2.5, 3.5, 10.0, 20.0, 30.0, 40.0, 100.0, 200.0, 300.0, 400.0]
}
}
},
"outputs": { "output": { "dtype": "float16", "shape": [4, 4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_mul_scalar_updates_duplicate_indices",
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [2.0, 1.0, 3.0, 1.0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.5, 2.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_max_row_slice_duplicate_indices",
"attrs": { "reduction": "max" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [1.0, -1.0, 0.5, 2.0, -3.0, -3.0, -3.0, -3.0, 0.0, 0.0, 0.0, 0.0] }
},
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 1] } },
"updates": {
"dtype": "float16",
"shape": [3, 4],
"data": { "kind": "values", "values": [0.0, -2.0, 1.5, 1.0, -0.5, 4.0, -1.0, 3.0, -1.0, -2.0, -1.0, -2.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4], "tolerance": 0.001 } }
},
{
"name": "int8_reduction_add_scalar_updates_duplicate_indices_in_range",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc",
"test": "ScatterNDOpTest.ScatterND_18_add",
"notes": "Duplicate int8 updates accumulate at indices 0 and 2, with every intermediate and final value remaining inside the int8 range."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [10, 0, -20, 0] } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 0, 2] } },
"updates": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [5, 7, -30] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [4], "tolerance": 0 } }
},
{
"name": "batch0_non_vec4_aligned_inner_row",
"inputs": {
"data": { "dtype": "float32", "shape": [6, 7], "data": { "kind": "linspace", "start": 0.0, "end": 41.0 } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 4, 5] } },
"updates": {
"dtype": "float32",
"shape": [3, 7],
"data": {
"kind": "values",
"values": [100.0, 101.0, 102.0, 103.0, 104.0, 105.0, 106.0, 200.0, 201.0, 202.0, 203.0, 204.0, 205.0, 206.0, 300.0, 301.0, 302.0, 303.0, 304.0, 305.0, 306.0]
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [6, 7] } }
},
{
"name": "reduction_slice_f16_multi_outer_batch_duplicate_depth2",
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [3, 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] }
},
"indices": {
"dtype": "int32",
"shape": [2, 2, 2],
"data": { "kind": "values", "values": [0, 1, 0, 2, 1, 0, 1, 3] }
},
"updates": {
"dtype": "float16",
"shape": [2, 2],
"data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 4], "tolerance": 0.1 } }
},
{
"name": "row_fast_vec4_last_row_edge_large_axis_dim",
"inputs": {
"data": { "dtype": "float32", "shape": [65537, 8], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 65536, 32768] } },
"updates": {
"dtype": "float32",
"shape": [3, 8],
"data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [65537, 8] } }
},
{
"name": "reduction_add_single_hot_slot_many_updates",
"provenance": {
"notes": "Many duplicate scalar updates target one output slot and must produce their exact accumulated sum."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0] }
},
"indices": {
"dtype": "int32",
"shape": [16, 1],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }
},
"updates": {
"dtype": "float32",
"shape": [16],
"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]
}
}
},
"outputs": { "output": { "dtype": "float32", "shape": [8], "tolerance": 0.000001 } }
},
{
"name": "scalar_output_add_many_updates_parallel_reduce",
"provenance": {
"notes": "Correctness lock for scalar accumulation with int32 indices, where every valid index targets the sole output element."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [3.5] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "constant", "value": 0 } },
"updates": {
"dtype": "float32",
"shape": [1024],
"data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, -0.125, 0.0625, 0.75, -0.25, 0.5] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "scalar_output_add_many_updates_parallel_reduce_i32_negative",
"provenance": {
"notes": "ONNX normalizes -1 and 0 to the sole output element. Alternating both spellings makes an omitted negative or nonnegative update change the exact sum."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [3.5] } },
"indices": { "dtype": "int32", "shape": [1024, 1], "data": { "kind": "cycle", "values": [0, -1] } },
"updates": {
"dtype": "float32",
"shape": [1024],
"data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, -0.125, 0.0625, 0.75, -0.25, 0.5] }
}
},
"outputs": { "output": { "dtype": "float32", "shape": [1], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "reduction_add_padding_hotspot_many_updates",
"provenance": {
"notes": "Many updates target one hot key in a much larger output table, as in sparse routing or padding-token accumulation."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float32", "shape": [128], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [2048, 1], "data": { "kind": "constant", "value": 0 } },
"updates": { "dtype": "float32", "shape": [2048], "data": { "kind": "constant", "value": 1.0 } }
},
"outputs": { "output": { "dtype": "float32", "shape": [128], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "f16_reduction_add_sparse_router_gradient",
"provenance": {
"notes": "Each of 64 slots receives 64 float16 updates offset around +0.02 through f32 atomic scratch. The nonzero mean makes lost or rescaled contributions observable; the tolerance allows one final f16 rounding after f32 accumulation."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [64], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [4096, 1],
"data": {
"kind": "cycle",
"values": { "$ref": "#/fixtureArrays/f16_reduction_add_sparse_router_gradient_input_indices" }
}
},
"updates": {
"dtype": "float16",
"shape": [4096],
"data": { "kind": "fillFloat32", "sinStep": 0.031, "cosStep": 0.047, "scale": 0.01, "offset": 0.02 }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [64], "tolerance": 0.012, "relTolerance": 0.004 } }
},
{
"name": "f16_reduction_add_row_slice_packed_atomic_route",
"provenance": {
"notes": "Duplicate rows and adjacent float16 columns contend on both halves of each packed output word during CAS slice accumulation; each column carries its own update value, so a write that lands in the neighbouring half is visible."
},
"requires": { "features": ["shader-f16"] },
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "float16", "shape": [16, 4], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [4096, 1],
"data": { "kind": "cycle", "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] }
},
"updates": {
"dtype": "float16",
"shape": [4096, 4],
"data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [16, 4], "tolerance": 0.01 } }
},
{
"name": "f16_reduction_add_rank3_batched_indices_packed_atomic",
"provenance": {
"notes": "Rank-3 batched indices through the direct packed-f16 CAS route, where indexDepth is less than rank(data). indices[2,8,1] pairs ascending rows in batch 0 with descending rows in batch 1, so dropping the interior index stride changes the update multiplicities. Data and updates are quarter-integers whose periods are coprime with both row and batch strides; every partial sum stays exactly representable in f16 regardless of atomic retirement order, allowing zero tolerance."
},
"requires": { "features": ["shader-f16"] },
"attrs": { "reduction": "add" },
"inputs": {
"data": {
"dtype": "float16",
"shape": [8, 256],
"data": { "kind": "cycle", "values": [-1.0, 0.5, -0.25, 2.0, 0.0, -1.5, 1.25] }
},
"indices": {
"dtype": "int32",
"shape": [2, 8, 1],
"data": { "kind": "values", "values": [0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] }
},
"updates": {
"dtype": "float16",
"shape": [2, 8, 256],
"data": { "kind": "cycle", "values": [0.25, 1.5, 0.75, 2.0, 1.25] }
}
},
"outputs": { "output": { "dtype": "float16", "shape": [8, 256], "tolerance": 0 } }
},
{
"name": "f16_reduction_max_full_depth_atomic_f32_route",
"provenance": {
"notes": "Four thousand duplicate float16 scalar updates contend on one full-index-depth destination; maximum reduction remains exact regardless of atomic order."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "float16", "shape": [16384], "data": { "kind": "constant", "value": 0.0 } },
"indices": { "dtype": "int32", "shape": [4096, 1], "data": { "kind": "constant", "value": 7 } },
"updates": { "dtype": "float16", "shape": [4096], "data": { "kind": "cycle", "values": [-3.0, 2.0, 1.0, 4.0] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [16384], "tolerance": 0 } }
},
{
"name": "rank7_scalar_updates",
"inputs": {
"data": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 2, 3], "data": { "kind": "constant", "value": 0.0 } },
"indices": {
"dtype": "int32",
"shape": [2, 7],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [9.0, 7.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 2, 3], "tolerance": 0 } }
},
{
"name": "rank8_scalar_updates",
"inputs": {
"data": {
"dtype": "float32",
"shape": [1, 1, 1, 1, 1, 1, 2, 3],
"data": { "kind": "linspace", "start": 1.0, "end": 6.0 }
},
"indices": {
"dtype": "int32",
"shape": [2, 8],
"data": { "kind": "values", "values": [0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1] }
},
"updates": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [9.0, 7.0] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [1, 1, 1, 1, 1, 1, 2, 3], "tolerance": 0 } }
},
{
"name": "ort_int8_reduction_mul_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "An int8 reduction must narrow each product to the logical eight-bit range instead of retaining the physical int32 product."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [100, -7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [20, 20] } }
},
"outputs": {
"output": { "dtype": "int8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [64, -7] } }
}
},
{
"name": "ort_uint8_reduction_add_wrap8",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Covers standard UINT8 payload support and modulo-256 add reduction."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [250, 7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "uint8", "shape": [2], "data": { "kind": "values", "values": [10, 10] } }
},
"outputs": {
"output": { "dtype": "uint8", "shape": [2], "tolerance": 0, "data": { "kind": "values", "values": [14, 7] } }
}
},
{
"name": "ort_int16_reduction_mul_wrap16",
"provenance": {
"source": "ONNX Runtime CPUExecutionProvider",
"notes": "Duplicate signed updates lock 16-bit two's-complement narrowing after multiplication."
},
"attrs": { "reduction": "mul" },
"inputs": {
"data": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [20000, -7] } },
"indices": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [0, 0] } },
"updates": { "dtype": "int16", "shape": [2], "data": { "kind": "values", "values": [2, 2] } }
},
"outputs": {
"output": {
"dtype": "int16",
"shape": [2],
"tolerance": 0,
"data": { "kind": "values", "values": [14464, -7] }
}
}
},
{
"name": "int8_reduction_add_high_contention_wrap",
"provenance": {
"notes": "Three thousand int8 updates wrap repeatedly across four slots. Reduction uses raw two's-complement bits and narrows once at the end; synchronized index and update cycles give each slot a distinct total and expose mispaired lanes."
},
"attrs": { "reduction": "add" },
"inputs": {
"data": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [7, -100, 0, 3] } },
"indices": { "dtype": "int32", "shape": [3000, 1], "data": { "kind": "cycle", "values": [0, 1, 2, 3] } },
"updates": { "dtype": "int8", "shape": [3000], "data": { "kind": "cycle", "values": [5, -3, 1, 2] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [4], "tolerance": 0 } }
},
{
"name": "int8_reduction_min_duplicate_indices",
"provenance": {
"notes": "Signed narrow min reduces through a native atomicMin on the i32-widened output. The update cycle length shares a factor with the index cycle so each slot sees a disjoint half of the values and the two slots reduce to different results, which a mispaired index/update lane would not reproduce; one slot is left untouched by any update."
},
"attrs": { "reduction": "min" },
"inputs": {
"data": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [100, -5, 42] } },
"indices": { "dtype": "int32", "shape": [512, 1], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "int8", "shape": [512], "data": { "kind": "cycle", "values": [9, -128, 7, 3] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [3], "tolerance": 0 } }
},
{
"name": "uint8_reduction_max_duplicate_indices",
"provenance": {
"notes": "Unsigned narrow max reduces through a native atomicMax on the u32-widened output. Each slot sees a disjoint half of the update cycle, so the two slots reduce to different results and one of them is decided by the data rather than by an update."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [0, 200, 17] } },
"indices": { "dtype": "int32", "shape": [512, 1], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "uint8", "shape": [512], "data": { "kind": "cycle", "values": [3, 255, 9, 1] } }
},
"outputs": { "output": { "dtype": "uint8", "shape": [3], "tolerance": 0 } }
},
{
"name": "int16_reduction_max_duplicate_indices",
"provenance": {
"notes": "Signed int16 maximum reduction uses i32-widened atomic storage at values outside the int8 range."
},
"attrs": { "reduction": "max" },
"inputs": {
"data": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [-30000, 1, -7] } },
"indices": { "dtype": "int32", "shape": [512, 1], "data": { "kind": "cycle", "values": [0, 1] } },
"updates": { "dtype": "int16", "shape": [512], "data": { "kind": "cycle", "values": [-20000, 32767, -1, 5] } }
},
"outputs": { "output": { "dtype": "int16", "shape": [3], "tolerance": 0 } }
},
{
"name": "rank1_index_tuple_updates_one_slice",
"provenance": {
"source": "ONNX ScatterND-18 specification",
"notes": "The minimal spelling of a single slice update: `indices` is rank 1, so the whole tensor is the one index tuple and `updates` carries just the slice. Row 2 is replaced and the other rows must be copied through unchanged."
},
"attrs": {},
"inputs": {
"data": {
"dtype": "float32",
"shape": [4, 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] }
},
"indices": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [2] } },
"updates": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1.0, -2.0, -3.0] } }
},
"outputs": {
"output": {
"dtype": "float32",
"shape": [4, 3],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, -1.0, -2.0, -3.0, 10.0, 11.0, 12.0] },
"tolerance": 0
}
}
}
]
}
|