diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/gemm.json')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/gemm.json | 1953 |
1 files changed, 1953 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/gemm.json b/testing/web-platform/tests/webnn/resources/test_data/gemm.json new file mode 100644 index 0000000000..23a18b316c --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/gemm.json @@ -0,0 +1,1953 @@ +{ + "tests": [ + { + "name": "gemm two float32 2D tensors (b is non-constant) default options", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors default options", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + // options.c + { + "name": "gemm two float32 2D constant tensors options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8243.9189453125, + 14117.208984375, + 14620.15234375, + 14068.654296875, + 18825.609375, + 11927.712890625, + 14673.310546875, + 19176.533203125, + 15122.8896484375, + 18303.658203125, + 5586.16064453125, + 9266.43359375, + 9195.7294921875, + 6438.0244140625, + 10939.8330078125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8243.9189453125, + 14117.208984375, + 14620.15234375, + 14068.654296875, + 18825.609375, + 11927.712890625, + 14673.310546875, + 19176.533203125, + 15122.8896484375, + 18303.658203125, + 5586.16064453125, + 9266.43359375, + 9195.7294921875, + 6438.0244140625, + 10939.8330078125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1, 5] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [1, 5], + "data": [ + 85.90813142403118, + 39.375354775876346, + 50.94260262706696, + 31.87430758223413, + 31.210525151769097 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8247.0546875, + 14065.19921875, + 14658.443359375, + 14080.40625, + 18788.30859375, + 11978.4189453125, + 14699.3505859375, + 19176.689453125, + 15066.1513671875, + 18304.291015625, + 5602.5986328125, + 9298.642578125, + 9218.3349609375, + 6379.20458984375, + 10899.8125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [3, 1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 1], + "data": [ + 6.2025197606838445, + 81.40642123187278, + 73.00516839070796 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8167.349609375, + 14032.0263671875, + 14613.703125, + 14054.734375, + 18763.30078125, + 11973.9169921875, + 14741.3818359375, + 19207.154296875, + 15115.68359375, + 18354.486328125, + 5589.6953125, + 9332.2724609375, + 9240.3974609375, + 6420.33544921875, + 10941.607421875 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1, 1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [1, 1], + "data": [18.78192846614879], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8179.9287109375, + 14044.6064453125, + 14626.2822265625, + 14067.314453125, + 18775.87890625, + 11911.29296875, + 14678.7578125, + 19144.529296875, + 15053.0595703125, + 18291.86328125, + 5535.47216796875, + 9278.048828125, + 9186.173828125, + 6366.1123046875, + 10887.384765625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [5] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [5], + "data": [ + 85.90813142403118, + 39.375354775876346, + 50.94260262706696, + 31.87430758223413, + 31.210525151769097 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8247.0546875, + 14065.19921875, + 14658.443359375, + 14080.40625, + 18788.30859375, + 11978.4189453125, + 14699.3505859375, + 19176.689453125, + 15066.1513671875, + 18304.291015625, + 5602.5986328125, + 9298.642578125, + 9218.3349609375, + 6379.20458984375, + 10899.8125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [1], + "data": [18.78192846614879], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8179.9287109375, + 14044.6064453125, + 14626.2822265625, + 14067.314453125, + 18775.87890625, + 11911.29296875, + 14678.7578125, + 19144.529296875, + 15053.0595703125, + 18291.86328125, + 5535.47216796875, + 9278.048828125, + 9186.173828125, + 6366.1123046875, + 10887.384765625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors scalar options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": 18.78192846614879 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8179.9287109375, + 14044.6064453125, + 14626.2822265625, + 14067.314453125, + 18775.87890625, + 11911.29296875, + 14678.7578125, + 19144.529296875, + 15053.0595703125, + 18291.86328125, + 5535.47216796875, + 9278.048828125, + 9186.173828125, + 6366.1123046875, + 10887.384765625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.alpha", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "alpha": 74.43204170482103 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 607450.875, + 1043970.75, + 1087266.125, + 1045661, + 1396129.125, + 885183.875, + 1091172, + 1423568.5, + 1119032, + 1360102.75, + 410618.53125, + 689186.1875, + 682347.75, + 472444.78125, + 808972.3125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.beta", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "beta": 62.01828598608989 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.c and options.beta", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + }, + "beta": 62.01828598608989 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 13294.525390625, + 19693.37890625, + 15392.1494140625, + 15296.4638671875, + 23006.109375, + 14075.7041015625, + 15486.96875, + 22275.375, + 20529.83984375, + 20169.443359375, + 9825.138671875, + 9703.7041015625, + 10924.810546875, + 11972.0244140625, + 15286.1806640625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.aTranspose being true", + "inputs": { + "a": { + "shape": [4, 3], + "data": [ + 82.98884511142329, + 18.96485038946509, + 50.51683887619669, + 90.51641254722982, + 43.89479290862091, + 40.45679629199866, + 59.6385201162642, + 98.89487912764056, + 50.76741460760452, + 36.27187180381433, + 91.46013741088626, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "aTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.aTranspose being explicit false", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "aTranspose": false + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.bTranspose being true", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [5, 4], + "data": [ + 25.14739246484985, + 0.003725653326558387, + 75.74880854000601, + 42.90679144336773, + 66.69238549579231, + 16.499146388625483, + 96.6068806977233, + 34.08055187293266, + 63.29909902139696, + 3.0366680571384252, + 99.10042039275365, + 87.37654561544477, + 10.629964783998469, + 93.14021782678614, + 23.243775283337477, + 92.34209530787089, + 61.32737573972831, + 70.08265680040718, + 86.1185682132947, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "bTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.bTranspose being explicit false", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "bTranspose": false + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8161.14697265625, + 14025.82421875, + 14607.5009765625, + 14048.5322265625, + 18757.09765625, + 11892.5107421875, + 14659.9755859375, + 19125.74609375, + 15034.27734375, + 18273.080078125, + 5516.6904296875, + 9259.267578125, + 9167.3916015625, + 6347.330078125, + 10868.6025390625 + ], + "type": "float32" + } + }, + // alpha * A x B + beta * C + { + "name": "gemm two float32 2D tensors all options", // All alpha, A, B, beta and C are positive + "inputs": { + "a": { + "shape": [4, 3], + "data": [ + 82.98884511142329, + 18.96485038946509, + 50.51683887619669, + 90.51641254722982, + 43.89479290862091, + 40.45679629199866, + 59.6385201162642, + 98.89487912764056, + 50.76741460760452, + 36.27187180381433, + 91.46013741088626, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [5, 4], + "data": [ + 25.14739246484985, + 0.003725653326558387, + 75.74880854000601, + 42.90679144336773, + 66.69238549579231, + 16.499146388625483, + 96.6068806977233, + 34.08055187293266, + 63.29909902139696, + 3.0366680571384252, + 99.10042039275365, + 87.37654561544477, + 10.629964783998469, + 93.14021782678614, + 23.243775283337477, + 92.34209530787089, + 61.32737573972831, + 70.08265680040718, + 86.1185682132947, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + }, + "alpha": 74.43204170482103, + "beta": 62.01828598608989, + "aTranspose": true, + "bTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 612584.25, + 1049638.375, + 1088050.75, + 1046908.875, + 1400378.125, + 887367.0625, + 1091999, + 1426718.125, + 1124527.625, + 1361999.125, + 414927, + 689630.625, + 684105.1875, + 478069.46875, + 813389.875 + ], + "type": "float32" + } + }, + { + "name": "gemm both negative options.alpha and 1st float32 input tensor", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -87.94973451710236, + -14.765121645895519, + -80.86310680534218, + -59.27638399609938, + -28.748250806066665, + -9.038779559502402, + -76.04662906780386, + -83.94807592959552, + -95.02689722012639, + -47.897331378960686, + -69.01161938187514, + -86.66899315604435 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + }, + "alpha": -22.611149749186296 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 246101.234375, + 360542.34375, + 425213.25, + 218520.65625, + 383734.40625, + 228076.8125, + 277543.625, + 378076, + 241282.15625, + 316800.71875, + 256391.5625, + 378711.34375, + 465195.8125, + 341034.875, + 460338.3125 + ], + "type": "float32" + } + }, + { + "name": "gemm both negative options.alpha and 2nd float32 input tensor", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + -64.35197380859643, + -87.64981186480712, + -96.04495397065658, + -31.07155980709375, + -6.548066933465876, + -64.64146348646094, + -14.020616857474465, + -88.93306726614543, + -24.17941082566574, + -97.31866304932058, + -93.46081221136554, + -39.49039520100528, + -94.37982420323672, + -75.8333604154835, + -11.403324388031308, + -26.28259194817595, + -56.237981538646295, + -46.474048229320665, + -89.20683997562287, + -53.49532488423292 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + }, + "alpha": -22.611149749186296 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 400725.03125, + 292635.75, + 527642.375, + 283236.40625, + 270787.40625, + 355130.96875, + 256121.421875, + 436658.0625, + 391465.40625, + 235557.03125, + 245540.5625, + 170154.125, + 309239.4375, + 163583.015625, + 120958.7578125 + ], + "type": "float32" + } + }, + { + "name": "gemm both negative options.beta and 3rd float32 input tensor (options.c)", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + -42.66268253622787, + -93.66379731044412, + -40.7084931979834, + -45.060979792171786, + -87.90339205403255, + -71.16189172949525, + -85.56422647952868, + -10.049133962829984, + -46.105405162474256, + -66.76168168609703, + -25.392492019110875, + -65.6298788225413, + -40.50155350367264, + -81.5303936185148, + -41.396294482178405 + ], + "type": "float32" + }, + "beta": -11.68521964935509 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8659.669921875, + 15120.3056640625, + 15083.1884765625, + 14575.0791015625, + 19784.267578125, + 12724.052734375, + 15659.8125, + 19243.173828125, + 15573.029296875, + 19053.205078125, + 5813.4072265625, + 10026.1669921875, + 9640.6611328125, + 7300.03076171875, + 11352.3271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm both negative options.alpha and options.beta", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32" + }, + "alpha": -22.611149749186296, + "beta": -11.68521964935509 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -185500.109375, + -318207.84375, + -330440.21875, + -317888.59375, + -424920.125, + -269314.6875, + -331634.71875, + -433048.5625, + -340977.71875, + -413532.65625, + -125550.484375, + -209446.40625, + -207616.390625, + -144580.21875, + -246583.921875 + ], + "type": "float32" + } + }, + { + "name": "gemm both negative options.alpha and 3rd float32 input tensor (options.c)", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + -42.66268253622787, + -93.66379731044412, + -40.7084931979834, + -45.060979792171786, + -87.90339205403255, + -71.16189172949525, + -85.56422647952868, + -10.049133962829984, + -46.105405162474256, + -66.76168168609703, + -25.392492019110875, + -65.6298788225413, + -40.50155350367264, + -81.5303936185148, + -41.396294482178405 + ], + "type": "float32" + }, + "alpha": -22.611149749186296 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -184575.5625, + -317233.65625, + -330333.09375, + -317698.5, + -424207.4375, + -268974.5, + -331564.4375, + -432465.15625, + -339988.375, + -413242.09375, + -124764.09375, + -209428.296875, + -207325.765625, + -143601.96875, + -245792.984375 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file |