summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/resources/test_data/mul.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/mul.json')
-rw-r--r--testing/web-platform/tests/webnn/resources/test_data/mul.json882
1 files changed, 882 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/mul.json b/testing/web-platform/tests/webnn/resources/test_data/mul.json
new file mode 100644
index 0000000000..3de9018427
--- /dev/null
+++ b/testing/web-platform/tests/webnn/resources/test_data/mul.json
@@ -0,0 +1,882 @@
+{
+ "tests": [
+ {
+ "name": "mul float32 1D constant tensors",
+ "inputs": {
+ "a": {
+ "shape": [24],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32",
+ "constant": true
+ },
+ "b": {
+ "shape": [24],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 1D tensors",
+ "inputs": {
+ "a": {
+ "shape": [24],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [24],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 2D tensors",
+ "inputs": {
+ "a": {
+ "shape": [4, 6],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [4, 6],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [4, 6],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 3D tensors",
+ "inputs": {
+ "a": {
+ "shape": [2, 3, 4],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 3, 4],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 3, 4],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 4D tensors",
+ "inputs": {
+ "a": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 5D tensors",
+ "inputs": {
+ "a": {
+ "shape": [2, 2, 1, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 2, 1, 2, 3],
+ "data": [
+ 74.96137241031886,
+ -34.53953260336324,
+ -33.316162844150114,
+ 53.92023954353448,
+ -83.69075015721262,
+ 19.78522024290173,
+ 36.2811360289287,
+ -34.31147605027482,
+ 49.10429164239241,
+ -54.538850393716665,
+ 70.77384875070422,
+ -55.18768187759977,
+ -93.96233815307488,
+ 60.0829826673602,
+ -92.73415188611666,
+ 87.60998747867865,
+ -8.881865647983787,
+ 71.79511481665139,
+ -26.158620254037416,
+ -18.935444705499236,
+ 34.64671570053736,
+ -60.95826678087097,
+ -11.11965362061676,
+ 77.50324337143496
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 1, 2, 3],
+ "data": [
+ 3681.4443359375,
+ -411.278076171875,
+ 703.4972534179688,
+ 3814.802978515625,
+ 7910.138671875,
+ -1855.63720703125,
+ 405.582763671875,
+ 1125.6197509765625,
+ 4091.3193359375,
+ -4969.61962890625,
+ -7.951977252960205,
+ -849.7775268554688,
+ 1264.6595458984375,
+ -3041.78955078125,
+ 2891.103759765625,
+ -579.6376342773438,
+ -192.98143005371094,
+ 1581.7545166015625,
+ 2197.89208984375,
+ 1781.2109375,
+ 2037.47900390625,
+ 3844.01513671875,
+ -36.79807662963867,
+ 766.0423583984375
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 broadcast 1D to 4D",
+ "inputs": {
+ "a": {
+ "shape": [1],
+ "data": [
+ 67.50372094970106
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 3315.18994140625,
+ 803.7978515625,
+ -1425.394775390625,
+ 4775.82080078125,
+ -6380.20068359375,
+ -6331.1103515625,
+ 754.6165771484375,
+ -2214.52197265625,
+ 5624.34130859375,
+ 6150.98828125,
+ -7.5845537185668945,
+ 1039.4193115234375,
+ -908.5472412109375,
+ -3417.4755859375,
+ -2104.513427734375,
+ -446.6123352050781,
+ 1466.6925048828125,
+ 1487.208740234375,
+ -5671.7783203125,
+ -6349.91064453125,
+ 3969.7099609375,
+ -4256.77001953125,
+ 223.388916015625,
+ 667.20703125
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 broadcast 2D to 4D",
+ "inputs": {
+ "a": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 3],
+ "data": [
+ -97.2933957218157,
+ -81.70872307646576,
+ -63.85933809294562,
+ -25.192203473799253,
+ 94.61556753087658,
+ -20.3817901013323
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ -4778.197265625,
+ -972.9432983398438,
+ 1348.440673828125,
+ -1782.3232421875,
+ -8942.7119140625,
+ 1911.5888671875,
+ -1087.6319580078125,
+ 2680.5302734375,
+ -5320.69482421875,
+ -2295.531982421875,
+ -10.630775451660156,
+ -313.8379211425781,
+ 1309.492919921875,
+ 4136.625,
+ 1990.89501953125,
+ 166.67449951171875,
+ 2055.767333984375,
+ -449.04156494140625,
+ 8174.7578125,
+ 7686.14013671875,
+ -3755.3935546875,
+ 1588.6148681640625,
+ 313.10968017578125,
+ -201.4536895751953
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 broadcast 3D to 4D",
+ "inputs": {
+ "a": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 2, 1],
+ "data": [
+ 8.696772886979204,
+ 48.377688521793914,
+ 97.75158873035582,
+ 62.215746875745594
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 427.1091003417969,
+ 103.55646514892578,
+ -183.63926696777344,
+ 3422.673095703125,
+ -4572.4794921875,
+ -4537.2978515625,
+ 1092.7540283203125,
+ -3206.8310546875,
+ 8144.5625,
+ 5669.14404296875,
+ -6.990409851074219,
+ 957.995361328125,
+ -117.05175018310547,
+ -440.2869567871094,
+ -271.1328125,
+ -320.07232666015625,
+ 1051.130126953125,
+ 1065.8333740234375,
+ -8213.255859375,
+ -9195.2529296875,
+ 5748.50439453125,
+ -3923.3115234375,
+ 205.88949584960938,
+ 614.940673828125
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "mul float32 broadcast 4D to 4D",
+ "inputs": {
+ "a": {
+ "shape": [1, 1, 1, 1],
+ "data": [
+ 67.50372094970106
+ ],
+ "type": "float32"
+ },
+ "b": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 49.11121736270019,
+ 11.907459336794048,
+ -21.11579579294029,
+ 70.74900132517587,
+ -94.51628388361728,
+ -93.78905645837338,
+ 11.178888261493995,
+ -32.80592265135466,
+ 83.31897732883382,
+ 91.12072661737204,
+ -0.11235756222869497,
+ 15.397956296694915,
+ -13.45921729974026,
+ -50.62647440827837,
+ -31.176256208308388,
+ -6.616114020780813,
+ 21.727578749239072,
+ 22.03150842852844,
+ -84.02170952786258,
+ -94.06756015115154,
+ 58.807274013013654,
+ -63.0597856263404,
+ 3.3092826784791214,
+ 9.88400353323415
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 3315.18994140625,
+ 803.7978515625,
+ -1425.394775390625,
+ 4775.82080078125,
+ -6380.20068359375,
+ -6331.1103515625,
+ 754.6165771484375,
+ -2214.52197265625,
+ 5624.34130859375,
+ 6150.98828125,
+ -7.5845537185668945,
+ 1039.4193115234375,
+ -908.5472412109375,
+ -3417.4755859375,
+ -2104.513427734375,
+ -446.6123352050781,
+ 1466.6925048828125,
+ 1487.208740234375,
+ -5671.7783203125,
+ -6349.91064453125,
+ 3969.7099609375,
+ -4256.77001953125,
+ 223.388916015625,
+ 667.20703125
+ ],
+ "type": "float32"
+ }
+ }
+ ]
+} \ No newline at end of file