summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/resources/test_data/slice.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/webnn/resources/test_data/slice.json
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/slice.json')
-rw-r--r--testing/web-platform/tests/webnn/resources/test_data/slice.json311
1 files changed, 311 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/slice.json b/testing/web-platform/tests/webnn/resources/test_data/slice.json
new file mode 100644
index 0000000000..28cfd2c0e2
--- /dev/null
+++ b/testing/web-platform/tests/webnn/resources/test_data/slice.json
@@ -0,0 +1,311 @@
+{
+ "tests": [
+ {
+ "name": "slice float32 1D constant tensor",
+ "inputs": {
+ "input": {
+ "shape": [24],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ "starts": [12],
+ "sizes": [12],
+ "expected": {
+ "name": "output",
+ "shape": [12],
+ "data": [
+ 0.5424534678459167,
+ 80.44634246826172,
+ 28.32765007019043,
+ 74.02619171142578,
+ -74.54559326171875,
+ -27.306041717529297,
+ -70.42774200439453,
+ 59.82632064819336,
+ -58.46095275878906,
+ 79.80570983886719,
+ -9.857853889465332,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "slice float32 1D tensor",
+ "inputs": {
+ "input": {
+ "shape": [24],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32"
+ }
+ },
+ "starts": [12],
+ "sizes": [12],
+ "expected": {
+ "name": "output",
+ "shape": [12],
+ "data": [
+ 0.5424534678459167,
+ 80.44634246826172,
+ 28.32765007019043,
+ 74.02619171142578,
+ -74.54559326171875,
+ -27.306041717529297,
+ -70.42774200439453,
+ 59.82632064819336,
+ -58.46095275878906,
+ 79.80570983886719,
+ -9.857853889465332,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "slice float32 2D tensor",
+ "inputs": {
+ "input": {
+ "shape": [4, 6],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32"
+ }
+ },
+ "starts": [2, 2],
+ "sizes": [2, 4],
+ "expected": {
+ "name": "output",
+ "shape": [2, 4],
+ "data": [
+ 28.32765007019043,
+ 74.02619171142578,
+ -74.54559326171875,
+ -27.306041717529297,
+ -58.46095275878906,
+ 79.80570983886719,
+ -9.857853889465332,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "slice float32 3D tensor",
+ "inputs": {
+ "input": {
+ "shape": [4, 3, 2],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32"
+ }
+ },
+ "starts": [1, 1, 1],
+ "sizes": [3, 2, 1],
+ "expected": {
+ "name": "output",
+ "shape": [3, 2, 1],
+ "data": [
+ 57.4397087097168,
+ -4.513182163238525,
+ 74.02619171142578,
+ -27.306041717529297,
+ 79.80570983886719,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "slice float32 4D tensor",
+ "inputs": {
+ "input": {
+ "shape": [2, 2, 3, 2],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32"
+ }
+ },
+ "starts": [1, 0, 2, 1],
+ "sizes": [1, 2, 1, 1],
+ "expected": {
+ "name": "output",
+ "shape": [1, 2, 1, 1],
+ "data": [
+ -27.306041717529297,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "slice float32 5D tensor",
+ "inputs": {
+ "input": {
+ "shape": [2, 2, 3, 2, 1],
+ "data": [
+ 28.846251144212147,
+ 97.9541470229301,
+ -68.15961736262523,
+ 14.978987588557175,
+ 90.23090084798065,
+ 76.59095547712559,
+ -24.556316258204532,
+ 79.58749302462488,
+ 65.21375982234204,
+ 57.43970862960305,
+ 74.41775256222849,
+ -4.513182026141791,
+ 0.5424534704526991,
+ 80.44634130202977,
+ 28.327650022124686,
+ 74.0261938866893,
+ -74.54558964005362,
+ -27.30604081001799,
+ -70.4277433212161,
+ 59.82631931755259,
+ -58.46095416849133,
+ 79.80571087632629,
+ -9.857854207596304,
+ 42.66519880465225
+ ],
+ "type": "float32"
+ }
+ },
+ "starts": [1, 0, 2, 1, 0],
+ "sizes": [1, 2, 1, 1, 1],
+ "expected": {
+ "name": "output",
+ "shape": [1, 2, 1, 1, 1],
+ "data": [
+ -27.306041717529297,
+ 42.665199279785156
+ ],
+ "type": "float32"
+ }
+ }
+ ]
+} \ No newline at end of file