diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/triangular.json')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/triangular.json | 1101 |
1 files changed, 1101 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/triangular.json b/testing/web-platform/tests/webnn/resources/test_data/triangular.json new file mode 100644 index 0000000000..652f780d58 --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/triangular.json @@ -0,0 +1,1101 @@ +{ + "tests": [ + { + "name": "triangular float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 0, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 0, + 0, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 0, + 0, + 0, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + 0, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + 0, + 0, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 0, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + 0, + 0, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + 0, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 0, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 0, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + 0, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor explict options.upper=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": true + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + 0, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 0, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 0, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + 0, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.upper=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": false + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + 0, + 0, + -98.47772216796875, + -94.51172637939453, + 0, + 24.678754806518555, + 0, + 0, + 97.25071716308594, + 73.36241149902344, + 0, + 41.64348602294922, + 0, + 0, + 67.48285675048828, + 42.132598876953125, + 0, + 20.88446617126465, + 0, + 0, + -88.97057342529297, + 77.58269500732422, + 0 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor explict options.diagonal=0", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "diagonal": 0 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + 0, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 0, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 0, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + 0, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.diagonal=1", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "diagonal": 1 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + -86.21631622314453, + 50.38116455078125, + 0, + 0, + -21.42218589782715, + 0, + -50.355342864990234, + -37.015724182128906, + 0, + 0, + -75.12358856201172, + 0, + 58.862911224365234, + -29.916187286376953, + 0, + 0, + -70.27587127685547, + 0, + 71.37139892578125, + -84.96932220458984, + 0, + 0, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.diagonal=-1", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "diagonal": -1 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor fully zero options.diagonal=3", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "diagonal": 3 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor fully copied options.diagonal=-2", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "diagonal": -2 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.upper=true options.diagonal=1", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": true, + "diagonal": 1 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + -86.21631622314453, + 50.38116455078125, + 0, + 0, + -21.42218589782715, + 0, + -50.355342864990234, + -37.015724182128906, + 0, + 0, + -75.12358856201172, + 0, + 58.862911224365234, + -29.916187286376953, + 0, + 0, + -70.27587127685547, + 0, + 71.37139892578125, + -84.96932220458984, + 0, + 0, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.upper=false options.diagonal=1", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": false, + "diagonal": 1 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 0, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + 0, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + 0, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + 0, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor options.upper=false options.diagonal=-1", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": false, + "diagonal": -1 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + -98.47772216796875, + 0, + 0, + 0, + 0, + 0, + 97.25071716308594, + 0, + 0, + 0, + 0, + 0, + 67.48285675048828, + 0, + 0, + 0, + 0, + 0, + -88.97057342529297, + 0, + 0 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor fully copied options.upper=false options.diagonal=3", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": false, + "diagonal": 3 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + { + "name": "triangular float32 4D tensor fully zero options.upper=false options.diagonal=-2", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 84.9194564819336, + -86.21631622314453, + 50.38116455078125, + -98.47772216796875, + -94.51172637939453, + -21.42218589782715, + 24.678754806518555, + -50.355342864990234, + -37.015724182128906, + 97.25071716308594, + 73.36241149902344, + -75.12358856201172, + 41.64348602294922, + 58.862911224365234, + -29.916187286376953, + 67.48285675048828, + 42.132598876953125, + -70.27587127685547, + 20.88446617126465, + 71.37139892578125, + -84.96932220458984, + -88.97057342529297, + 77.58269500732422, + 91.03327178955078 + ], + "type": "float32" + } + }, + "options": { + "upper": false, + "diagonal": -2 + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file |