From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../webnn/resources/test_data/reduce_log_sum.json | 663 +++++++++++++++++++++ 1 file changed, 663 insertions(+) create mode 100644 testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum.json (limited to 'testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum.json') diff --git a/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum.json b/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum.json new file mode 100644 index 0000000000..250398d227 --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum.json @@ -0,0 +1,663 @@ +{ + "tests": [ + { + "name": "reduceLogSum float32 1D constant tensor all non-negative default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 1D tensor all non-negative default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 1D tensor all non-negative integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + 63, + 82, + 49, + 23, + 98, + 67, + 15, + 9, + 89, + 7, + 69, + 61, + 47, + 50, + 41, + 39, + 58, + 52, + 35, + 83, + 81, + 7, + 34, + 9 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.063048362731934, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 5.593751907348633, + 4.773046016693115, + 5.3115739822387695, + 5.2497639656066895, + 4.973392486572266, + 5.373587131500244 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 5.410027980804443, + 5.367736339569092, + 5.399682998657227, + 4.652334213256836, + 4.744638442993164, + 5.565346717834473 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1], + "data": [ + 7.039101600646973 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 7.039101600646973 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + 5.7273993492126465, + 5.64375114440918, + 5.453810214996338, + 5.758983135223389 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSum float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + 5.7273993492126465, + 5.64375114440918, + 5.453810214996338, + 5.758983135223389 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file -- cgit v1.2.3