tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

reduce_sum_square.https.any.js (45118B)


      1 // META: title=test WebNN API reduction operations
      2 // META: global=window
      3 // META: variant=?cpu
      4 // META: variant=?gpu
      5 // META: variant=?npu
      6 // META: script=../resources/utils.js
      7 // META: timeout=long
      8 
      9 'use strict';
     10 
     11 // https://www.w3.org/TR/webnn/#dom-mlgraphbuilder-reducesumsquare
     12 // Reduce the input tensor along all dimensions, or along the axes specified in
     13 // the axes array parameter.
     14 //
     15 // dictionary MLReduceOptions {
     16 //   sequence<[EnforceRange] unsigned long> axes;
     17 //   boolean keepDimensions = false;
     18 // };
     19 //
     20 // MLOperand reduceSumSquare(MLOperand input, optional MLReduceOptions options
     21 // = {});
     22 
     23 const reduceSumSquareTests = [
     24  {
     25    'name': 'reduceSumSquare float32 0D constant tensor default options',
     26    'graph': {
     27      'inputs': {
     28        'reduceSumSquareInput': {
     29          'data': [52.5615348815918],
     30          'descriptor': {shape: [], dataType: 'float32'},
     31          'constant': true
     32        }
     33      },
     34      'operators': [{
     35        'name': 'reduceSumSquare',
     36        'arguments': [{'input': 'reduceSumSquareInput'}],
     37        'outputs': 'reduceSumSquareOutput'
     38      }],
     39      'expectedOutputs': {
     40        'reduceSumSquareOutput': {
     41          'data': 2762.71484375,
     42          'descriptor': {shape: [], dataType: 'float32'}
     43        }
     44      }
     45    }
     46  },
     47  {
     48    'name': 'reduceSumSquare float32 0D tensor default options',
     49    'graph': {
     50      'inputs': {
     51        'reduceSumSquareInput': {
     52          'data': [52.5615348815918],
     53          'descriptor': {shape: [], dataType: 'float32'},
     54          'constant': false
     55        }
     56      },
     57      'operators': [{
     58        'name': 'reduceSumSquare',
     59        'arguments': [{'input': 'reduceSumSquareInput'}],
     60        'outputs': 'reduceSumSquareOutput'
     61      }],
     62      'expectedOutputs': {
     63        'reduceSumSquareOutput': {
     64          'data': 2762.71484375,
     65          'descriptor': {shape: [], dataType: 'float32'}
     66        }
     67      }
     68    }
     69  },
     70  {
     71    'name': 'reduceSumSquare float32 0D constant tensor empty axes',
     72    'graph': {
     73      'inputs': {
     74        'reduceSumSquareInput': {
     75          'data': [52.5615348815918],
     76          'descriptor': {shape: [], dataType: 'float32'},
     77          'constant': true
     78        }
     79      },
     80      'operators': [{
     81        'name': 'reduceSumSquare',
     82        'arguments':
     83            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
     84        'outputs': 'reduceSumSquareOutput'
     85      }],
     86      'expectedOutputs': {
     87        'reduceSumSquareOutput': {
     88          'data': 2762.71484375,
     89          'descriptor': {shape: [], dataType: 'float32'}
     90        }
     91      }
     92    }
     93  },
     94  {
     95    'name': 'reduceSumSquare float32 0D tensor empty axes',
     96    'graph': {
     97      'inputs': {
     98        'reduceSumSquareInput': {
     99          'data': [52.5615348815918],
    100          'descriptor': {shape: [], dataType: 'float32'},
    101          'constant': false
    102        }
    103      },
    104      'operators': [{
    105        'name': 'reduceSumSquare',
    106        'arguments':
    107            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
    108        'outputs': 'reduceSumSquareOutput'
    109      }],
    110      'expectedOutputs': {
    111        'reduceSumSquareOutput': {
    112          'data': 2762.71484375,
    113          'descriptor': {shape: [], dataType: 'float32'}
    114        }
    115      }
    116    }
    117  },
    118  {
    119    'name':
    120        'reduceSumSquare float32 1D constant tensor all positive default options',
    121    'graph': {
    122      'inputs': {
    123        'reduceSumSquareInput': {
    124          'data': [
    125            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    126            14.401411056518555, 33.96051788330078,  83.9383773803711,
    127            47.445045471191406, 19.177289962768555, 13.493006706237793,
    128            44.152381896972656, 86.53118133544922,  70.20919799804688,
    129            25.67262840270996,  79.73770141601562,  66.42284393310547,
    130            70.40363311767578,  13.503327369689941, 41.225399017333984,
    131            6.654552936553955,  85.79743957519531,  89.91349029541016,
    132            53.55647277832031,  39.48537063598633,  3.9460408687591553
    133          ],
    134          'descriptor': {shape: [24], dataType: 'float32'},
    135          'constant': true
    136        }
    137      },
    138      'operators': [{
    139        'name': 'reduceSumSquare',
    140        'arguments': [{'input': 'reduceSumSquareInput'}],
    141        'outputs': 'reduceSumSquareOutput'
    142      }],
    143      'expectedOutputs': {
    144        'reduceSumSquareOutput': {
    145          'data': 73275.859375,
    146          'descriptor': {shape: [], dataType: 'float32'}
    147        }
    148      }
    149    }
    150  },
    151  {
    152    'name': 'reduceSumSquare float32 1D tensor all positive default options',
    153    'graph': {
    154      'inputs': {
    155        'reduceSumSquareInput': {
    156          'data': [
    157            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    158            14.401411056518555, 33.96051788330078,  83.9383773803711,
    159            47.445045471191406, 19.177289962768555, 13.493006706237793,
    160            44.152381896972656, 86.53118133544922,  70.20919799804688,
    161            25.67262840270996,  79.73770141601562,  66.42284393310547,
    162            70.40363311767578,  13.503327369689941, 41.225399017333984,
    163            6.654552936553955,  85.79743957519531,  89.91349029541016,
    164            53.55647277832031,  39.48537063598633,  3.9460408687591553
    165          ],
    166          'descriptor': {shape: [24], dataType: 'float32'}
    167        }
    168      },
    169      'operators': [{
    170        'name': 'reduceSumSquare',
    171        'arguments': [{'input': 'reduceSumSquareInput'}],
    172        'outputs': 'reduceSumSquareOutput'
    173      }],
    174      'expectedOutputs': {
    175        'reduceSumSquareOutput': {
    176          'data': 73275.859375,
    177          'descriptor': {shape: [], dataType: 'float32'}
    178        }
    179      }
    180    }
    181  },
    182  {
    183    'name': 'reduceSumSquare float32 1D tensor all negative default options',
    184    'graph': {
    185      'inputs': {
    186        'reduceSumSquareInput': {
    187          'data': [
    188            -21.45201301574707,    -57.30725860595703,  -72.8390121459961,
    189            -0.059761520475149155, -71.73678588867188,  -44.61909103393555,
    190            -43.12002182006836,    -91.3373794555664,   -33.17243957519531,
    191            -48.555931091308594,   -95.6286392211914,   -20.876630783081055,
    192            -16.690837860107422,   -39.52110290527344,  -7.5107855796813965,
    193            -90.59027099609375,    -42.21683120727539,  -76.74274444580078,
    194            -98.22420501708984,    -60.272953033447266, -74.73202514648438,
    195            -8.543684005737305,    -59.888736724853516, -17.99894142150879
    196          ],
    197          'descriptor': {shape: [24], dataType: 'float32'}
    198        }
    199      },
    200      'operators': [{
    201        'name': 'reduceSumSquare',
    202        'arguments': [{'input': 'reduceSumSquareInput'}],
    203        'outputs': 'reduceSumSquareOutput'
    204      }],
    205      'expectedOutputs': {
    206        'reduceSumSquareOutput': {
    207          'data': 80052.015625,
    208          'descriptor': {shape: [], dataType: 'float32'}
    209        }
    210      }
    211    }
    212  },
    213  {
    214    'name':
    215        'reduceSumSquare float32 1D tensor all positive integers default options',
    216    'graph': {
    217      'inputs': {
    218        'reduceSumSquareInput': {
    219          'data': [
    220            52, 48, 2,  66, 30, 39, 14, 23, 81, 94, 78, 64,
    221            38, 16, 63, 11, 46, 95, 17, 47, 40, 53, 87, 43
    222          ],
    223          'descriptor': {shape: [24], dataType: 'float32'}
    224        }
    225      },
    226      'operators': [{
    227        'name': 'reduceSumSquare',
    228        'arguments': [{'input': 'reduceSumSquareInput'}],
    229        'outputs': 'reduceSumSquareOutput'
    230      }],
    231      'expectedOutputs': {
    232        'reduceSumSquareOutput':
    233            {'data': 71347, 'descriptor': {shape: [], dataType: 'float32'}}
    234      }
    235    }
    236  },
    237  {
    238    'name':
    239        'reduceSumSquare float32 1D tensor all negative integers default options',
    240    'graph': {
    241      'inputs': {
    242        'reduceSumSquareInput': {
    243          'data': [
    244            -10, -60, -69, -88, -35, -84, -74, -42, -93, -26, -40, -55,
    245            -92, -26, -39, -30, -61, -16, -16, -36, -9,  -89, -45, -29
    246          ],
    247          'descriptor': {shape: [24], dataType: 'float32'}
    248        }
    249      },
    250      'operators': [{
    251        'name': 'reduceSumSquare',
    252        'arguments': [{'input': 'reduceSumSquareInput'}],
    253        'outputs': 'reduceSumSquareOutput'
    254      }],
    255      'expectedOutputs': {
    256        'reduceSumSquareOutput':
    257            {'data': 73634, 'descriptor': {shape: [], dataType: 'float32'}}
    258      }
    259    }
    260  },
    261  {
    262    'name': 'reduceSumSquare float32 1D tensor with empty axes',
    263    'graph': {
    264      'inputs': {
    265        'reduceSumSquareInput':
    266            {'data': [2, 3], 'descriptor': {shape: [2], dataType: 'float32'}}
    267      },
    268      'operators': [{
    269        'name': 'reduceSumSquare',
    270        'arguments':
    271            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
    272        'outputs': 'reduceSumSquareOutput'
    273      }],
    274      'expectedOutputs': {
    275        'reduceSumSquareOutput':
    276            {'data': [4, 9], 'descriptor': {shape: [2], dataType: 'float32'}}
    277      }
    278    }
    279  },
    280  {
    281    'name': 'reduceSumSquare float32 2D tensor default options',
    282    'graph': {
    283      'inputs': {
    284        'reduceSumSquareInput': {
    285          'data': [
    286            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    287            14.401411056518555, 33.96051788330078,  83.9383773803711,
    288            47.445045471191406, 19.177289962768555, 13.493006706237793,
    289            44.152381896972656, 86.53118133544922,  70.20919799804688,
    290            25.67262840270996,  79.73770141601562,  66.42284393310547,
    291            70.40363311767578,  13.503327369689941, 41.225399017333984,
    292            6.654552936553955,  85.79743957519531,  89.91349029541016,
    293            53.55647277832031,  39.48537063598633,  3.9460408687591553
    294          ],
    295          'descriptor': {shape: [4, 6], dataType: 'float32'}
    296        }
    297      },
    298      'operators': [{
    299        'name': 'reduceSumSquare',
    300        'arguments': [{'input': 'reduceSumSquareInput'}],
    301        'outputs': 'reduceSumSquareOutput'
    302      }],
    303      'expectedOutputs': {
    304        'reduceSumSquareOutput': {
    305          'data': 73275.859375,
    306          'descriptor': {shape: [], dataType: 'float32'}
    307        }
    308      }
    309    }
    310  },
    311  {
    312    'name': 'reduceSumSquare float32 3D tensor default options',
    313    'graph': {
    314      'inputs': {
    315        'reduceSumSquareInput': {
    316          'data': [
    317            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    318            14.401411056518555, 33.96051788330078,  83.9383773803711,
    319            47.445045471191406, 19.177289962768555, 13.493006706237793,
    320            44.152381896972656, 86.53118133544922,  70.20919799804688,
    321            25.67262840270996,  79.73770141601562,  66.42284393310547,
    322            70.40363311767578,  13.503327369689941, 41.225399017333984,
    323            6.654552936553955,  85.79743957519531,  89.91349029541016,
    324            53.55647277832031,  39.48537063598633,  3.9460408687591553
    325          ],
    326          'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
    327        }
    328      },
    329      'operators': [{
    330        'name': 'reduceSumSquare',
    331        'arguments': [{'input': 'reduceSumSquareInput'}],
    332        'outputs': 'reduceSumSquareOutput'
    333      }],
    334      'expectedOutputs': {
    335        'reduceSumSquareOutput': {
    336          'data': 73275.859375,
    337          'descriptor': {shape: [], dataType: 'float32'}
    338        }
    339      }
    340    }
    341  },
    342  {
    343    'name': 'reduceSumSquare float32 4D tensor default options',
    344    'graph': {
    345      'inputs': {
    346        'reduceSumSquareInput': {
    347          'data': [
    348            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    349            14.401411056518555, 33.96051788330078,  83.9383773803711,
    350            47.445045471191406, 19.177289962768555, 13.493006706237793,
    351            44.152381896972656, 86.53118133544922,  70.20919799804688,
    352            25.67262840270996,  79.73770141601562,  66.42284393310547,
    353            70.40363311767578,  13.503327369689941, 41.225399017333984,
    354            6.654552936553955,  85.79743957519531,  89.91349029541016,
    355            53.55647277832031,  39.48537063598633,  3.9460408687591553
    356          ],
    357          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    358        }
    359      },
    360      'operators': [{
    361        'name': 'reduceSumSquare',
    362        'arguments': [{'input': 'reduceSumSquareInput'}],
    363        'outputs': 'reduceSumSquareOutput'
    364      }],
    365      'expectedOutputs': {
    366        'reduceSumSquareOutput': {
    367          'data': 73275.859375,
    368          'descriptor': {shape: [], dataType: 'float32'}
    369        }
    370      }
    371    }
    372  },
    373  {
    374    'name': 'reduceSumSquare float32 5D tensor default options',
    375    'graph': {
    376      'inputs': {
    377        'reduceSumSquareInput': {
    378          'data': [
    379            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    380            14.401411056518555, 33.96051788330078,  83.9383773803711,
    381            47.445045471191406, 19.177289962768555, 13.493006706237793,
    382            44.152381896972656, 86.53118133544922,  70.20919799804688,
    383            25.67262840270996,  79.73770141601562,  66.42284393310547,
    384            70.40363311767578,  13.503327369689941, 41.225399017333984,
    385            6.654552936553955,  85.79743957519531,  89.91349029541016,
    386            53.55647277832031,  39.48537063598633,  3.9460408687591553
    387          ],
    388          'descriptor': {shape: [2, 1, 4, 1, 3], dataType: 'float32'}
    389        }
    390      },
    391      'operators': [{
    392        'name': 'reduceSumSquare',
    393        'arguments': [{'input': 'reduceSumSquareInput'}],
    394        'outputs': 'reduceSumSquareOutput'
    395      }],
    396      'expectedOutputs': {
    397        'reduceSumSquareOutput': {
    398          'data': 73275.859375,
    399          'descriptor': {shape: [], dataType: 'float32'}
    400        }
    401      }
    402    }
    403  },
    404  {
    405    'name': 'reduceSumSquare float32 3D tensor options.axes',
    406    'graph': {
    407      'inputs': {
    408        'reduceSumSquareInput': {
    409          'data': [
    410            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    411            14.401411056518555, 33.96051788330078,  83.9383773803711,
    412            47.445045471191406, 19.177289962768555, 13.493006706237793,
    413            44.152381896972656, 86.53118133544922,  70.20919799804688,
    414            25.67262840270996,  79.73770141601562,  66.42284393310547,
    415            70.40363311767578,  13.503327369689941, 41.225399017333984,
    416            6.654552936553955,  85.79743957519531,  89.91349029541016,
    417            53.55647277832031,  39.48537063598633,  3.9460408687591553
    418          ],
    419          'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
    420        }
    421      },
    422      'operators': [{
    423        'name': 'reduceSumSquare',
    424        'arguments':
    425            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': [2]}}],
    426        'outputs': 'reduceSumSquareOutput'
    427      }],
    428      'expectedOutputs': {
    429        'reduceSumSquareOutput': {
    430          'data': [
    431            9709.013671875, 10817.7685546875, 14548.470703125, 16385.8515625,
    432            9287.357421875, 12527.3974609375
    433          ],
    434          'descriptor': {shape: [2, 3], dataType: 'float32'}
    435        }
    436      }
    437    }
    438  },
    439  {
    440    'name': 'reduceSumSquare float32 4D tensor options.axes',
    441    'graph': {
    442      'inputs': {
    443        'reduceSumSquareInput': {
    444          'data': [
    445            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    446            14.401411056518555, 33.96051788330078,  83.9383773803711,
    447            47.445045471191406, 19.177289962768555, 13.493006706237793,
    448            44.152381896972656, 86.53118133544922,  70.20919799804688,
    449            25.67262840270996,  79.73770141601562,  66.42284393310547,
    450            70.40363311767578,  13.503327369689941, 41.225399017333984,
    451            6.654552936553955,  85.79743957519531,  89.91349029541016,
    452            53.55647277832031,  39.48537063598633,  3.9460408687591553
    453          ],
    454          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    455        }
    456      },
    457      'operators': [{
    458        'name': 'reduceSumSquare',
    459        'arguments':
    460            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': [0, 2]}}],
    461        'outputs': 'reduceSumSquareOutput'
    462      }],
    463      'expectedOutputs': {
    464        'reduceSumSquareOutput': {
    465          'data': [
    466            8585.87109375, 7700.654296875, 19889.1796875, 7113.0439453125,
    467            16775.708984375, 13211.3994140625
    468          ],
    469          'descriptor': {shape: [2, 3], dataType: 'float32'}
    470        }
    471      }
    472    }
    473  },
    474  {
    475    'name': 'reduceSumSquare float32 3D tensor options.keepDimensions=false',
    476    'graph': {
    477      'inputs': {
    478        'reduceSumSquareInput': {
    479          'data': [
    480            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    481            14.401411056518555, 33.96051788330078,  83.9383773803711,
    482            47.445045471191406, 19.177289962768555, 13.493006706237793,
    483            44.152381896972656, 86.53118133544922,  70.20919799804688,
    484            25.67262840270996,  79.73770141601562,  66.42284393310547,
    485            70.40363311767578,  13.503327369689941, 41.225399017333984,
    486            6.654552936553955,  85.79743957519531,  89.91349029541016,
    487            53.55647277832031,  39.48537063598633,  3.9460408687591553
    488          ],
    489          'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
    490        }
    491      },
    492      'operators': [{
    493        'name': 'reduceSumSquare',
    494        'arguments': [
    495          {'input': 'reduceSumSquareInput'},
    496          {'options': {'keepDimensions': false}}
    497        ],
    498        'outputs': 'reduceSumSquareOutput'
    499      }],
    500      'expectedOutputs': {
    501        'reduceSumSquareOutput': {
    502          'data': 73275.859375,
    503          'descriptor': {shape: [], dataType: 'float32'}
    504        }
    505      }
    506    }
    507  },
    508  {
    509    'name': 'reduceSumSquare float32 3D tensor options.keepDimensions=true',
    510    'graph': {
    511      'inputs': {
    512        'reduceSumSquareInput': {
    513          'data': [
    514            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    515            14.401411056518555, 33.96051788330078,  83.9383773803711,
    516            47.445045471191406, 19.177289962768555, 13.493006706237793,
    517            44.152381896972656, 86.53118133544922,  70.20919799804688,
    518            25.67262840270996,  79.73770141601562,  66.42284393310547,
    519            70.40363311767578,  13.503327369689941, 41.225399017333984,
    520            6.654552936553955,  85.79743957519531,  89.91349029541016,
    521            53.55647277832031,  39.48537063598633,  3.9460408687591553
    522          ],
    523          'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
    524        }
    525      },
    526      'operators': [{
    527        'name': 'reduceSumSquare',
    528        'arguments': [
    529          {'input': 'reduceSumSquareInput'},
    530          {'options': {'keepDimensions': true}}
    531        ],
    532        'outputs': 'reduceSumSquareOutput'
    533      }],
    534      'expectedOutputs': {
    535        'reduceSumSquareOutput': {
    536          'data': [73275.859375],
    537          'descriptor': {shape: [1, 1, 1], dataType: 'float32'}
    538        }
    539      }
    540    }
    541  },
    542  {
    543    'name': 'reduceSumSquare float32 4D tensor options.keepDimensions=false',
    544    'graph': {
    545      'inputs': {
    546        'reduceSumSquareInput': {
    547          'data': [
    548            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    549            14.401411056518555, 33.96051788330078,  83.9383773803711,
    550            47.445045471191406, 19.177289962768555, 13.493006706237793,
    551            44.152381896972656, 86.53118133544922,  70.20919799804688,
    552            25.67262840270996,  79.73770141601562,  66.42284393310547,
    553            70.40363311767578,  13.503327369689941, 41.225399017333984,
    554            6.654552936553955,  85.79743957519531,  89.91349029541016,
    555            53.55647277832031,  39.48537063598633,  3.9460408687591553
    556          ],
    557          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    558        }
    559      },
    560      'operators': [{
    561        'name': 'reduceSumSquare',
    562        'arguments': [
    563          {'input': 'reduceSumSquareInput'},
    564          {'options': {'keepDimensions': false}}
    565        ],
    566        'outputs': 'reduceSumSquareOutput'
    567      }],
    568      'expectedOutputs': {
    569        'reduceSumSquareOutput': {
    570          'data': 73275.859375,
    571          'descriptor': {shape: [], dataType: 'float32'}
    572        }
    573      }
    574    }
    575  },
    576  {
    577    'name': 'reduceSumSquare float32 4D tensor options.keepDimensions=true',
    578    'graph': {
    579      'inputs': {
    580        'reduceSumSquareInput': {
    581          'data': [
    582            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    583            14.401411056518555, 33.96051788330078,  83.9383773803711,
    584            47.445045471191406, 19.177289962768555, 13.493006706237793,
    585            44.152381896972656, 86.53118133544922,  70.20919799804688,
    586            25.67262840270996,  79.73770141601562,  66.42284393310547,
    587            70.40363311767578,  13.503327369689941, 41.225399017333984,
    588            6.654552936553955,  85.79743957519531,  89.91349029541016,
    589            53.55647277832031,  39.48537063598633,  3.9460408687591553
    590          ],
    591          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    592        }
    593      },
    594      'operators': [{
    595        'name': 'reduceSumSquare',
    596        'arguments': [
    597          {'input': 'reduceSumSquareInput'},
    598          {'options': {'keepDimensions': true}}
    599        ],
    600        'outputs': 'reduceSumSquareOutput'
    601      }],
    602      'expectedOutputs': {
    603        'reduceSumSquareOutput': {
    604          'data': [73275.859375],
    605          'descriptor': {shape: [1, 1, 1, 1], dataType: 'float32'}
    606        }
    607      }
    608    }
    609  },
    610  {
    611    'name':
    612        'reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=false',
    613    'graph': {
    614      'inputs': {
    615        'reduceSumSquareInput': {
    616          'data': [
    617            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    618            14.401411056518555, 33.96051788330078,  83.9383773803711,
    619            47.445045471191406, 19.177289962768555, 13.493006706237793,
    620            44.152381896972656, 86.53118133544922,  70.20919799804688,
    621            25.67262840270996,  79.73770141601562,  66.42284393310547,
    622            70.40363311767578,  13.503327369689941, 41.225399017333984,
    623            6.654552936553955,  85.79743957519531,  89.91349029541016,
    624            53.55647277832031,  39.48537063598633,  3.9460408687591553
    625          ],
    626          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    627        }
    628      },
    629      'operators': [{
    630        'name': 'reduceSumSquare',
    631        'arguments': [
    632          {'input': 'reduceSumSquareInput'},
    633          {'options': {'axes': [1, 3], 'keepDimensions': false}}
    634        ],
    635        'outputs': 'reduceSumSquareOutput'
    636      }],
    637      'expectedOutputs': {
    638        'reduceSumSquareOutput': {
    639          'data': [
    640            12302.474609375, 22772.77734375, 26919.09765625, 11281.5068359375
    641          ],
    642          'descriptor': {shape: [2, 2], dataType: 'float32'}
    643        }
    644      }
    645    }
    646  },
    647  {
    648    'name':
    649        'reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=true',
    650    'graph': {
    651      'inputs': {
    652        'reduceSumSquareInput': {
    653          'data': [
    654            52.5615348815918,   2.6261062622070312, 82.04877471923828,
    655            14.401411056518555, 33.96051788330078,  83.9383773803711,
    656            47.445045471191406, 19.177289962768555, 13.493006706237793,
    657            44.152381896972656, 86.53118133544922,  70.20919799804688,
    658            25.67262840270996,  79.73770141601562,  66.42284393310547,
    659            70.40363311767578,  13.503327369689941, 41.225399017333984,
    660            6.654552936553955,  85.79743957519531,  89.91349029541016,
    661            53.55647277832031,  39.48537063598633,  3.9460408687591553
    662          ],
    663          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
    664        }
    665      },
    666      'operators': [{
    667        'name': 'reduceSumSquare',
    668        'arguments': [
    669          {'input': 'reduceSumSquareInput'},
    670          {'options': {'axes': [1, 3], 'keepDimensions': true}}
    671        ],
    672        'outputs': 'reduceSumSquareOutput'
    673      }],
    674      'expectedOutputs': {
    675        'reduceSumSquareOutput': {
    676          'data': [
    677            12302.474609375, 22772.77734375, 26919.09765625, 11281.5068359375
    678          ],
    679          'descriptor': {shape: [2, 1, 2, 1], dataType: 'float32'}
    680        }
    681      }
    682    }
    683  },
    684 
    685  // float16 tests
    686  {
    687    'name': 'reduceSumSquare float16 0D constant tensor default options',
    688    'graph': {
    689      'inputs': {
    690        'reduceSumSquareInput': {
    691          'data': [52.5625],
    692          'descriptor': {shape: [], dataType: 'float16'},
    693          'constant': true
    694        }
    695      },
    696      'operators': [{
    697        'name': 'reduceSumSquare',
    698        'arguments': [{'input': 'reduceSumSquareInput'}],
    699        'outputs': 'reduceSumSquareOutput'
    700      }],
    701      'expectedOutputs': {
    702        'reduceSumSquareOutput':
    703            {'data': [2762], 'descriptor': {shape: [], dataType: 'float16'}}
    704      }
    705    }
    706  },
    707  {
    708    'name': 'reduceSumSquare float16 0D tensor default options',
    709    'graph': {
    710      'inputs': {
    711        'reduceSumSquareInput': {
    712          'data': [52.5625],
    713          'descriptor': {shape: [], dataType: 'float16'},
    714          'constant': false
    715        }
    716      },
    717      'operators': [{
    718        'name': 'reduceSumSquare',
    719        'arguments': [{'input': 'reduceSumSquareInput'}],
    720        'outputs': 'reduceSumSquareOutput'
    721      }],
    722      'expectedOutputs': {
    723        'reduceSumSquareOutput':
    724            {'data': [2762], 'descriptor': {shape: [], dataType: 'float16'}}
    725      }
    726    }
    727  },
    728  {
    729    'name': 'reduceSumSquare float16 0D constant tensor empty axes',
    730    'graph': {
    731      'inputs': {
    732        'reduceSumSquareInput': {
    733          'data': [52.5625],
    734          'descriptor': {shape: [], dataType: 'float16'},
    735          'constant': true
    736        }
    737      },
    738      'operators': [{
    739        'name': 'reduceSumSquare',
    740        'arguments':
    741            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
    742        'outputs': 'reduceSumSquareOutput'
    743      }],
    744      'expectedOutputs': {
    745        'reduceSumSquareOutput':
    746            {'data': [2762], 'descriptor': {shape: [], dataType: 'float16'}}
    747      }
    748    }
    749  },
    750  {
    751    'name': 'reduceSumSquare float16 0D tensor empty axes',
    752    'graph': {
    753      'inputs': {
    754        'reduceSumSquareInput': {
    755          'data': [52.5625],
    756          'descriptor': {shape: [], dataType: 'float16'},
    757          'constant': false
    758        }
    759      },
    760      'operators': [{
    761        'name': 'reduceSumSquare',
    762        'arguments':
    763            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
    764        'outputs': 'reduceSumSquareOutput'
    765      }],
    766      'expectedOutputs': {
    767        'reduceSumSquareOutput':
    768            {'data': [2762], 'descriptor': {shape: [], dataType: 'float16'}}
    769      }
    770    }
    771  },
    772  {
    773    'name':
    774        'reduceSumSquare float16 1D constant tensor all positive default options',
    775    'graph': {
    776      'inputs': {
    777        'reduceSumSquareInput': {
    778          'data': [
    779            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
    780            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
    781            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
    782            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
    783            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
    784            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
    785          ],
    786          'descriptor': {shape: [24], dataType: 'float16'},
    787          'constant': true
    788        }
    789      },
    790      'operators': [{
    791        'name': 'reduceSumSquare',
    792        'arguments': [{'input': 'reduceSumSquareInput'}],
    793        'outputs': 'reduceSumSquareOutput'
    794      }],
    795      'expectedOutputs': {
    796        'reduceSumSquareOutput': {
    797          'data': [30.515625],
    798          'descriptor': {shape: [], dataType: 'float16'}
    799        }
    800      }
    801    }
    802  },
    803  {
    804    'name': 'reduceSumSquare float16 1D tensor all positive default options',
    805    'graph': {
    806      'inputs': {
    807        'reduceSumSquareInput': {
    808          'data': [
    809            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
    810            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
    811            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
    812            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
    813            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
    814            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
    815          ],
    816          'descriptor': {shape: [24], dataType: 'float16'}
    817        }
    818      },
    819      'operators': [{
    820        'name': 'reduceSumSquare',
    821        'arguments': [{'input': 'reduceSumSquareInput'}],
    822        'outputs': 'reduceSumSquareOutput'
    823      }],
    824      'expectedOutputs': {
    825        'reduceSumSquareOutput': {
    826          'data': [30.515625],
    827          'descriptor': {shape: [], dataType: 'float16'}
    828        }
    829      }
    830    }
    831  },
    832  {
    833    'name': 'reduceSumSquare float16 1D tensor all negative default options',
    834    'graph': {
    835      'inputs': {
    836        'reduceSumSquareInput': {
    837          'data': [
    838            -1.646484375,    -1.2998046875,    -0.57763671875,
    839            -0.5869140625,   -1.740234375,     -0.2020263671875,
    840            -1.28125,        -1.92578125,      -0.63671875,
    841            -0.5068359375,   -1.9462890625,    -1.5078125,
    842            -1.212890625,    -0.6669921875,    -1.1337890625,
    843            -0.450439453125, -0.7978515625,    -0.2196044921875,
    844            -0.221923828125, -0.1463623046875, -0.75537109375,
    845            -1.0830078125,   -1.3740234375,    -0.059600830078125
    846          ],
    847          'descriptor': {shape: [24], dataType: 'float16'}
    848        }
    849      },
    850      'operators': [{
    851        'name': 'reduceSumSquare',
    852        'arguments': [{'input': 'reduceSumSquareInput'}],
    853        'outputs': 'reduceSumSquareOutput'
    854      }],
    855      'expectedOutputs': {
    856        'reduceSumSquareOutput': {
    857          'data': [28.015625],
    858          'descriptor': {shape: [], dataType: 'float16'}
    859        }
    860      }
    861    }
    862  },
    863  {
    864    'name':
    865        'reduceSumSquare float16 1D tensor all positive integers default options',
    866    'graph': {
    867      'inputs': {
    868        'reduceSumSquareInput': {
    869          'data': [
    870            2, 4, 2, 6, 3, 9, 1, 2, 1, 4, 7, 6,
    871            3, 1, 3, 1, 6, 5, 1, 4, 4, 3, 8, 3
    872          ],
    873          'descriptor': {shape: [24], dataType: 'float16'}
    874        }
    875      },
    876      'operators': [{
    877        'name': 'reduceSumSquare',
    878        'arguments': [{'input': 'reduceSumSquareInput'}],
    879        'outputs': 'reduceSumSquareOutput'
    880      }],
    881      'expectedOutputs': {
    882        'reduceSumSquareOutput':
    883            {'data': [453], 'descriptor': {shape: [], dataType: 'float16'}}
    884      }
    885    }
    886  },
    887  {
    888    'name':
    889        'reduceSumSquare float16 1D tensor all negative integers default options',
    890    'graph': {
    891      'inputs': {
    892        'reduceSumSquareInput': {
    893          'data': [
    894            -10, -6, -9, -8, -3, -4, -4, -2, -3, -2, -4, -5,
    895            -2,  -2, -3, -3, -1, -6, -1, -3, -9, -8, -5, -2
    896          ],
    897          'descriptor': {shape: [24], dataType: 'float16'}
    898        }
    899      },
    900      'operators': [{
    901        'name': 'reduceSumSquare',
    902        'arguments': [{'input': 'reduceSumSquareInput'}],
    903        'outputs': 'reduceSumSquareOutput'
    904      }],
    905      'expectedOutputs': {
    906        'reduceSumSquareOutput':
    907            {'data': [627], 'descriptor': {shape: [], dataType: 'float16'}}
    908      }
    909    }
    910  },
    911  {
    912    'name': 'reduceSumSquare float16 1D tensor with empty axes',
    913    'graph': {
    914      'inputs': {
    915        'reduceSumSquareInput':
    916            {'data': [2, 3], 'descriptor': {shape: [2], dataType: 'float16'}}
    917      },
    918      'operators': [{
    919        'name': 'reduceSumSquare',
    920        'arguments':
    921            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': []}}],
    922        'outputs': 'reduceSumSquareOutput'
    923      }],
    924      'expectedOutputs': {
    925        'reduceSumSquareOutput':
    926            {'data': [4, 9], 'descriptor': {shape: [2], dataType: 'float16'}}
    927      }
    928    }
    929  },
    930  {
    931    'name': 'reduceSumSquare float16 2D tensor default options',
    932    'graph': {
    933      'inputs': {
    934        'reduceSumSquareInput': {
    935          'data': [
    936            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
    937            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
    938            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
    939            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
    940            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
    941            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
    942          ],
    943          'descriptor': {shape: [4, 6], dataType: 'float16'}
    944        }
    945      },
    946      'operators': [{
    947        'name': 'reduceSumSquare',
    948        'arguments': [{'input': 'reduceSumSquareInput'}],
    949        'outputs': 'reduceSumSquareOutput'
    950      }],
    951      'expectedOutputs': {
    952        'reduceSumSquareOutput': {
    953          'data': [30.515625],
    954          'descriptor': {shape: [], dataType: 'float16'}
    955        }
    956      }
    957    }
    958  },
    959  {
    960    'name': 'reduceSumSquare float16 3D tensor default options',
    961    'graph': {
    962      'inputs': {
    963        'reduceSumSquareInput': {
    964          'data': [
    965            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
    966            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
    967            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
    968            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
    969            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
    970            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
    971          ],
    972          'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
    973        }
    974      },
    975      'operators': [{
    976        'name': 'reduceSumSquare',
    977        'arguments': [{'input': 'reduceSumSquareInput'}],
    978        'outputs': 'reduceSumSquareOutput'
    979      }],
    980      'expectedOutputs': {
    981        'reduceSumSquareOutput': {
    982          'data': [30.515625],
    983          'descriptor': {shape: [], dataType: 'float16'}
    984        }
    985      }
    986    }
    987  },
    988  {
    989    'name': 'reduceSumSquare float16 4D tensor default options',
    990    'graph': {
    991      'inputs': {
    992        'reduceSumSquareInput': {
    993          'data': [
    994            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
    995            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
    996            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
    997            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
    998            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
    999            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1000          ],
   1001          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1002        }
   1003      },
   1004      'operators': [{
   1005        'name': 'reduceSumSquare',
   1006        'arguments': [{'input': 'reduceSumSquareInput'}],
   1007        'outputs': 'reduceSumSquareOutput'
   1008      }],
   1009      'expectedOutputs': {
   1010        'reduceSumSquareOutput': {
   1011          'data': [30.515625],
   1012          'descriptor': {shape: [], dataType: 'float16'}
   1013        }
   1014      }
   1015    }
   1016  },
   1017  {
   1018    'name': 'reduceSumSquare float16 5D tensor default options',
   1019    'graph': {
   1020      'inputs': {
   1021        'reduceSumSquareInput': {
   1022          'data': [
   1023            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1024            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1025            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1026            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1027            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1028            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1029          ],
   1030          'descriptor': {shape: [2, 1, 4, 1, 3], dataType: 'float16'}
   1031        }
   1032      },
   1033      'operators': [{
   1034        'name': 'reduceSumSquare',
   1035        'arguments': [{'input': 'reduceSumSquareInput'}],
   1036        'outputs': 'reduceSumSquareOutput'
   1037      }],
   1038      'expectedOutputs': {
   1039        'reduceSumSquareOutput': {
   1040          'data': [30.515625],
   1041          'descriptor': {shape: [], dataType: 'float16'}
   1042        }
   1043      }
   1044    }
   1045  },
   1046  {
   1047    'name': 'reduceSumSquare float16 3D tensor options.axes',
   1048    'graph': {
   1049      'inputs': {
   1050        'reduceSumSquareInput': {
   1051          'data': [
   1052            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1053            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1054            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1055            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1056            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1057            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1058          ],
   1059          'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
   1060        }
   1061      },
   1062      'operators': [{
   1063        'name': 'reduceSumSquare',
   1064        'arguments':
   1065            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': [2]}}],
   1066        'outputs': 'reduceSumSquareOutput'
   1067      }],
   1068      'expectedOutputs': {
   1069        'reduceSumSquareOutput': {
   1070          'data': [
   1071            4.94140625, 4.30859375, 1.4765625, 3.458984375, 11.359375,
   1072            4.97265625
   1073          ],
   1074          'descriptor': {shape: [2, 3], dataType: 'float16'}
   1075        }
   1076      }
   1077    }
   1078  },
   1079  {
   1080    'name': 'reduceSumSquare float16 4D tensor options.axes',
   1081    'graph': {
   1082      'inputs': {
   1083        'reduceSumSquareInput': {
   1084          'data': [
   1085            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1086            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1087            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1088            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1089            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1090            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1091          ],
   1092          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1093        }
   1094      },
   1095      'operators': [{
   1096        'name': 'reduceSumSquare',
   1097        'arguments':
   1098            [{'input': 'reduceSumSquareInput'}, {'options': {'axes': [0, 2]}}],
   1099        'outputs': 'reduceSumSquareOutput'
   1100      }],
   1101      'expectedOutputs': {
   1102        'reduceSumSquareOutput': {
   1103          'data': [
   1104            3.72265625, 5.4453125, 5.75, 5.00390625, 8.6796875, 1.9130859375
   1105          ],
   1106          'descriptor': {shape: [2, 3], dataType: 'float16'}
   1107        }
   1108      }
   1109    }
   1110  },
   1111  {
   1112    'name': 'reduceSumSquare float16 3D tensor options.keepDimensions=false',
   1113    'graph': {
   1114      'inputs': {
   1115        'reduceSumSquareInput': {
   1116          'data': [
   1117            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1118            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1119            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1120            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1121            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1122            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1123          ],
   1124          'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
   1125        }
   1126      },
   1127      'operators': [{
   1128        'name': 'reduceSumSquare',
   1129        'arguments': [
   1130          {'input': 'reduceSumSquareInput'},
   1131          {'options': {'keepDimensions': false}}
   1132        ],
   1133        'outputs': 'reduceSumSquareOutput'
   1134      }],
   1135      'expectedOutputs': {
   1136        'reduceSumSquareOutput': {
   1137          'data': [30.515625],
   1138          'descriptor': {shape: [], dataType: 'float16'}
   1139        }
   1140      }
   1141    }
   1142  },
   1143  {
   1144    'name': 'reduceSumSquare float16 3D tensor options.keepDimensions=true',
   1145    'graph': {
   1146      'inputs': {
   1147        'reduceSumSquareInput': {
   1148          'data': [
   1149            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1150            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1151            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1152            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1153            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1154            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1155          ],
   1156          'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
   1157        }
   1158      },
   1159      'operators': [{
   1160        'name': 'reduceSumSquare',
   1161        'arguments': [
   1162          {'input': 'reduceSumSquareInput'},
   1163          {'options': {'keepDimensions': true}}
   1164        ],
   1165        'outputs': 'reduceSumSquareOutput'
   1166      }],
   1167      'expectedOutputs': {
   1168        'reduceSumSquareOutput': {
   1169          'data': [30.515625],
   1170          'descriptor': {shape: [1, 1, 1], dataType: 'float16'}
   1171        }
   1172      }
   1173    }
   1174  },
   1175  {
   1176    'name': 'reduceSumSquare float16 4D tensor options.keepDimensions=false',
   1177    'graph': {
   1178      'inputs': {
   1179        'reduceSumSquareInput': {
   1180          'data': [
   1181            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1182            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1183            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1184            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1185            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1186            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1187          ],
   1188          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1189        }
   1190      },
   1191      'operators': [{
   1192        'name': 'reduceSumSquare',
   1193        'arguments': [
   1194          {'input': 'reduceSumSquareInput'},
   1195          {'options': {'keepDimensions': false}}
   1196        ],
   1197        'outputs': 'reduceSumSquareOutput'
   1198      }],
   1199      'expectedOutputs': {
   1200        'reduceSumSquareOutput': {
   1201          'data': [30.515625],
   1202          'descriptor': {shape: [], dataType: 'float16'}
   1203        }
   1204      }
   1205    }
   1206  },
   1207  {
   1208    'name': 'reduceSumSquare float16 4D tensor options.keepDimensions=true',
   1209    'graph': {
   1210      'inputs': {
   1211        'reduceSumSquareInput': {
   1212          'data': [
   1213            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1214            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1215            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1216            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1217            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1218            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1219          ],
   1220          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1221        }
   1222      },
   1223      'operators': [{
   1224        'name': 'reduceSumSquare',
   1225        'arguments': [
   1226          {'input': 'reduceSumSquareInput'},
   1227          {'options': {'keepDimensions': true}}
   1228        ],
   1229        'outputs': 'reduceSumSquareOutput'
   1230      }],
   1231      'expectedOutputs': {
   1232        'reduceSumSquareOutput': {
   1233          'data': [30.515625],
   1234          'descriptor': {shape: [1, 1, 1, 1], dataType: 'float16'}
   1235        }
   1236      }
   1237    }
   1238  },
   1239  {
   1240    'name':
   1241        'reduceSumSquare float16 4D tensor options.axes with options.keepDimensions=false',
   1242    'graph': {
   1243      'inputs': {
   1244        'reduceSumSquareInput': {
   1245          'data': [
   1246            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1247            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1248            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1249            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1250            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1251            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1252          ],
   1253          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1254        }
   1255      },
   1256      'operators': [{
   1257        'name': 'reduceSumSquare',
   1258        'arguments': [
   1259          {'input': 'reduceSumSquareInput'},
   1260          {'options': {'axes': [1, 3], 'keepDimensions': false}}
   1261        ],
   1262        'outputs': 'reduceSumSquareOutput'
   1263      }],
   1264      'expectedOutputs': {
   1265        'reduceSumSquareOutput': {
   1266          'data': [8.828125, 1.8974609375, 9.625, 10.1640625],
   1267          'descriptor': {shape: [2, 2], dataType: 'float16'}
   1268        }
   1269      }
   1270    }
   1271  },
   1272  {
   1273    'name':
   1274        'reduceSumSquare float16 4D tensor options.axes with options.keepDimensions=true',
   1275    'graph': {
   1276      'inputs': {
   1277        'reduceSumSquareInput': {
   1278          'data': [
   1279            1.3935546875,  1.20703125,      1.18359375,   0.3759765625,
   1280            0.69677734375, 0.75244140625,   1.068359375,  1.455078125,
   1281            0.87890625,    0.2149658203125, 0.7998046875, 0.135986328125,
   1282            1.099609375,   0.77685546875,   1.1025390625, 0.65625,
   1283            1.703125,      1.6025390625,    1.5185546875, 1.892578125,
   1284            0.8408203125,  1.2294921875,    1.529296875,  0.64404296875
   1285          ],
   1286          'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
   1287        }
   1288      },
   1289      'operators': [{
   1290        'name': 'reduceSumSquare',
   1291        'arguments': [
   1292          {'input': 'reduceSumSquareInput'},
   1293          {'options': {'axes': [1, 3], 'keepDimensions': true}}
   1294        ],
   1295        'outputs': 'reduceSumSquareOutput'
   1296      }],
   1297      'expectedOutputs': {
   1298        'reduceSumSquareOutput': {
   1299          'data': [8.828125, 1.8974609375, 9.625, 10.1640625],
   1300          'descriptor': {shape: [2, 1, 2, 1], dataType: 'float16'}
   1301        }
   1302      }
   1303    }
   1304  }
   1305 ];
   1306 
   1307 webnn_conformance_test(
   1308    reduceSumSquareTests, buildAndExecuteGraph, getPrecisionTolerance);