From 6dad592daec2aeed4473a084f54e60f088597fe4 Mon Sep 17 00:00:00 2001 From: James Ward Date: Fri, 3 Feb 2023 13:02:00 +0000 Subject: Create MI tests for Tensors: AVG_POOL2D, FULLY_CONNECTED, MATMUL Signed-off-by: James Ward Change-Id: I3bf038baba78bd9a54b33e6c718e02ff5eae37ad --- .../desc.json | 21 + .../input-0.json | 987 +++++++++++++++++++++ .../test.json | 77 ++ 3 files changed, 1085 insertions(+) create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/desc.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/input-0.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/test.json (limited to 'operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000') diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/desc.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/desc.json new file mode 100644 index 000000000..23599279c --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/desc.json @@ -0,0 +1,21 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0" + ], + "ifm_file": [ + "input-0.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "Output DType not INT8 and zero point not 0", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/input-0.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/input-0.json new file mode 100644 index 000000000..c60e9a45d --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/input-0.json @@ -0,0 +1,987 @@ +{ + "type": "float32", + "data": [ + [ + [ + [ + 0.0167236328125, + 0.03466796875, + 0.73046875, + 0.2109375, + 0.2314453125, + 0.00775146484375, + 0.5078125, + 0.39453125, + 0.83203125, + 0.103515625 + ], + [ + 0.99609375, + 0.05517578125, + 0.2197265625, + 0.1396484375, + 0.7734375, + 0.283203125, + 0.023193359375, + 0.52734375, + 0.23828125, + 0.6171875 + ], + [ + 0.4453125, + 0.08544921875, + 0.8984375, + 0.2265625, + 0.00787353515625, + 0.58203125, + 0.82421875, + 0.4921875, + 0.84765625, + 0.0732421875 + ], + [ + 0.28515625, + 0.640625, + 0.76953125, + 0.078125, + 0.609375, + 0.76953125, + 0.1259765625, + 0.1474609375, + 0.50390625, + 0.431640625 + ], + [ + 0.423828125, + 0.8671875, + 0.0654296875, + 0.734375, + 0.81640625, + 0.3828125, + 0.69140625, + 0.5859375, + 0.263671875, + 0.51171875 + ], + [ + 0.0576171875, + 0.80859375, + 0.055908203125, + 0.291015625, + 0.408203125, + 0.498046875, + 0.53125, + 0.6015625, + 0.9140625, + 0.4765625 + ], + [ + 0.65234375, + 0.0888671875, + 0.83984375, + 0.337890625, + 0.58984375, + 0.98046875, + 0.75390625, + 0.404296875, + 0.451171875, + 0.1455078125 + ], + [ + 0.62890625, + 0.55078125, + 0.58984375, + 0.267578125, + 0.70703125, + 0.296875, + 0.4453125, + 0.1484375, + 0.71484375, + 0.1748046875 + ] + ], + [ + [ + 0.5859375, + 0.82421875, + 0.58984375, + 0.6015625, + 0.87890625, + 0.99609375, + 0.1943359375, + 0.474609375, + 0.361328125, + 0.0693359375 + ], + [ + 0.365234375, + 0.69921875, + 0.84765625, + 0.8203125, + 0.0201416015625, + 0.39453125, + 0.9453125, + 0.55078125, + 0.9765625, + 0.34375 + ], + [ + 0.3984375, + 0.455078125, + 0.8515625, + 0.2890625, + 0.435546875, + 0.78515625, + 0.330078125, + 0.40625, + 0.87890625, + 0.3515625 + ], + [ + 0.546875, + 0.0673828125, + 0.94921875, + 0.66015625, + 0.9609375, + 0.80859375, + 0.76171875, + 0.134765625, + 0.486328125, + 0.01531982421875 + ], + [ + 0.55859375, + 0.953125, + 0.384765625, + 0.34765625, + 0.28515625, + 0.57421875, + 0.90234375, + 0.5859375, + 0.75390625, + 0.3671875 + ], + [ + 0.369140625, + 0.236328125, + 0.0966796875, + 0.83203125, + 0.7265625, + 0.130859375, + 0.53515625, + 0.625, + 0.86328125, + 0.140625 + ], + [ + 0.11279296875, + 0.255859375, + 0.23828125, + 0.146484375, + 0.875, + 0.9921875, + 0.65234375, + 0.75390625, + 0.5234375, + 0.62109375 + ], + [ + 0.84765625, + 0.8828125, + 0.32421875, + 0.796875, + 0.0159912109375, + 0.12158203125, + 0.29296875, + 0.4921875, + 0.232421875, + 0.8671875 + ] + ], + [ + [ + 0.5390625, + 0.412109375, + 0.79296875, + 0.703125, + 0.75, + 0.322265625, + 0.3125, + 0.298828125, + 0.7890625, + 0.380859375 + ], + [ + 0.12255859375, + 0.5, + 0.2099609375, + 0.57421875, + 0.5234375, + 0.26953125, + 0.92578125, + 0.439453125, + 0.53125, + 0.7109375 + ], + [ + 0.63671875, + 0.039794921875, + 0.4921875, + 0.8984375, + 0.88671875, + 0.12890625, + 0.296875, + 0.2734375, + 0.9140625, + 0.96484375 + ], + [ + 0.4375, + 0.6953125, + 0.166015625, + 0.65625, + 0.0478515625, + 0.078125, + 0.392578125, + 0.85546875, + 0.0128173828125, + 0.330078125 + ], + [ + 0.6328125, + 0.3046875, + 0.007110595703125, + 0.52734375, + 0.123046875, + 0.314453125, + 0.8984375, + 0.58984375, + 0.73046875, + 0.158203125 + ], + [ + 0.74609375, + 0.1689453125, + 0.875, + 0.6875, + 0.66796875, + 0.2197265625, + 0.431640625, + 0.03955078125, + 0.345703125, + 0.022705078125 + ], + [ + 0.005859375, + 0.1806640625, + 0.67578125, + 0.232421875, + 0.8984375, + 0.55078125, + 0.447265625, + 0.421875, + 0.447265625, + 0.2099609375 + ], + [ + 0.41796875, + 0.0137939453125, + 0.4140625, + 0.380859375, + 0.04248046875, + 0.60546875, + 0.78515625, + 0.1904296875, + 0.4609375, + 0.91015625 + ] + ], + [ + [ + 0.8984375, + 0.2578125, + 0.2197265625, + 0.21875, + 0.5859375, + 0.8359375, + 0.2431640625, + 0.640625, + 0.70703125, + 0.1337890625 + ], + [ + 0.0888671875, + 0.08837890625, + 0.44921875, + 0.255859375, + 0.35546875, + 0.97265625, + 0.322265625, + 0.328125, + 0.73828125, + 0.94140625 + ], + [ + 0.64453125, + 0.765625, + 0.2275390625, + 0.1865234375, + 0.99609375, + 0.96484375, + 0.34375, + 0.80078125, + 0.28125, + 0.0537109375 + ], + [ + 0.69140625, + 0.53515625, + 0.052490234375, + 0.421875, + 0.58203125, + 0.39453125, + 0.04345703125, + 0.93359375, + 0.92578125, + 0.88671875 + ], + [ + 0.6953125, + 0.90234375, + 0.85546875, + 0.54296875, + 0.51171875, + 0.6171875, + 0.283203125, + 0.11865234375, + 0.92578125, + 0.490234375 + ], + [ + 0.08544921875, + 0.9453125, + 0.8046875, + 0.64453125, + 0.98828125, + 0.8203125, + 0.0791015625, + 0.71875, + 0.119140625, + 0.7734375 + ], + [ + 0.26953125, + 0.34765625, + 0.83203125, + 0.130859375, + 0.94140625, + 0.1259765625, + 0.0252685546875, + 0.0255126953125, + 0.80859375, + 0.478515625 + ], + [ + 0.5078125, + 0.83203125, + 0.51171875, + 0.953125, + 0.00396728515625, + 0.162109375, + 0.78515625, + 0.9140625, + 0.703125, + 0.296875 + ] + ], + [ + [ + 0.83984375, + 0.2197265625, + 0.4375, + 0.78125, + 0.40234375, + 0.82421875, + 0.6015625, + 0.859375, + 0.234375, + 0.6328125 + ], + [ + 0.66015625, + 0.4140625, + 0.431640625, + 0.9140625, + 0.220703125, + 0.09521484375, + 0.515625, + 0.87890625, + 0.9765625, + 0.89453125 + ], + [ + 0.76953125, + 0.1083984375, + 0.6171875, + 0.6484375, + 0.494140625, + 0.83984375, + 0.98046875, + 0.96875, + 0.0203857421875, + 0.035888671875 + ], + [ + 0.05322265625, + 0.310546875, + 0.7421875, + 0.57421875, + 0.484375, + 0.734375, + 0.255859375, + 0.98828125, + 0.2470703125, + 0.37109375 + ], + [ + 0.8515625, + 0.78515625, + 0.15234375, + 0.061767578125, + 0.65234375, + 0.6953125, + 0.890625, + 0.0299072265625, + 0.8671875, + 0.3359375 + ], + [ + 0.361328125, + 0.64453125, + 0.859375, + 0.412109375, + 0.006683349609375, + 0.64453125, + 0.55078125, + 0.96875, + 0.52734375, + 0.62890625 + ], + [ + 0.87109375, + 0.26953125, + 0.01422119140625, + 0.74609375, + 0.6796875, + 0.87890625, + 0.232421875, + 0.4296875, + 0.04833984375, + 0.7109375 + ], + [ + 0.1904296875, + 0.55078125, + 0.50390625, + 0.408203125, + 0.048583984375, + 0.60546875, + 0.5078125, + 0.2421875, + 0.66015625, + 0.96875 + ] + ], + [ + [ + 0.9296875, + 0.88671875, + 0.75, + 0.796875, + 0.7109375, + 0.408203125, + 0.1875, + 0.75390625, + 0.61328125, + 0.8046875 + ], + [ + 0.953125, + 0.392578125, + 0.90234375, + 0.06884765625, + 0.25390625, + 0.466796875, + 0.9375, + 0.96875, + 0.5078125, + 0.58203125 + ], + [ + 0.44921875, + 0.890625, + 0.8515625, + 0.251953125, + 0.06689453125, + 0.07275390625, + 0.8984375, + 0.7265625, + 0.171875, + 0.69921875 + ], + [ + 0.408203125, + 0.58203125, + 0.59765625, + 0.6796875, + 0.28125, + 0.921875, + 0.875, + 0.01220703125, + 0.68359375, + 0.5390625 + ], + [ + 0.50390625, + 0.1123046875, + 0.53515625, + 0.734375, + 0.0145263671875, + 0.423828125, + 0.6171875, + 0.1484375, + 0.98828125, + 0.6875 + ], + [ + 0.68359375, + 0.451171875, + 0.08447265625, + 0.90234375, + 0.05615234375, + 0.77734375, + 0.16796875, + 0.71484375, + 0.48828125, + 0.453125 + ], + [ + 0.99609375, + 0.99609375, + 0.054443359375, + 0.89453125, + 0.005615234375, + 0.59765625, + 0.81640625, + 0.3203125, + 0.69921875, + 0.6015625 + ], + [ + 0.458984375, + 0.84765625, + 0.6796875, + 0.79296875, + 0.076171875, + 0.20703125, + 0.59765625, + 0.82421875, + 0.76953125, + 0.466796875 + ] + ], + [ + [ + 0.8203125, + 0.8828125, + 0.58984375, + 0.1494140625, + 0.60546875, + 0.3125, + 0.357421875, + 0.890625, + 0.984375, + 0.70703125 + ], + [ + 0.3125, + 0.279296875, + 0.0419921875, + 0.0595703125, + 0.07421875, + 0.67578125, + 0.1904296875, + 0.08154296875, + 0.98828125, + 0.7109375 + ], + [ + 0.6015625, + 0.546875, + 0.95703125, + 0.61328125, + 0.0361328125, + 0.5859375, + 0.4296875, + 0.99609375, + 0.484375, + 0.78125 + ], + [ + 0.81640625, + 0.0517578125, + 0.9609375, + 0.51953125, + 0.828125, + 0.640625, + 0.44921875, + 0.2734375, + 0.1875, + 0.7109375 + ], + [ + 0.0771484375, + 0.2431640625, + 0.5234375, + 0.2197265625, + 0.546875, + 0.359375, + 0.267578125, + 0.71484375, + 0.2421875, + 0.1962890625 + ], + [ + 0.1689453125, + 0.2021484375, + 0.0125732421875, + 0.71484375, + 0.5625, + 0.047607421875, + 0.482421875, + 0.83203125, + 0.478515625, + 0.99609375 + ], + [ + 0.10205078125, + 0.61328125, + 0.5234375, + 0.58203125, + 0.515625, + 0.55859375, + 0.90625, + 0.36328125, + 0.65625, + 0.2216796875 + ], + [ + 0.353515625, + 0.53515625, + 0.70703125, + 0.91015625, + 0.703125, + 0.6875, + 0.42578125, + 0.236328125, + 0.70703125, + 0.373046875 + ] + ], + [ + [ + 0.87109375, + 0.859375, + 0.078125, + 0.038330078125, + 0.458984375, + 0.2236328125, + 0.2392578125, + 0.41015625, + 0.78125, + 0.1650390625 + ], + [ + 0.94921875, + 0.60546875, + 0.76171875, + 0.1572265625, + 0.1494140625, + 0.314453125, + 0.89453125, + 0.8359375, + 0.265625, + 0.416015625 + ], + [ + 0.498046875, + 0.32421875, + 0.94921875, + 0.67578125, + 0.4296875, + 0.0078125, + 0.0576171875, + 0.546875, + 0.75390625, + 0.61328125 + ], + [ + 0.80859375, + 0.7734375, + 0.80078125, + 0.60546875, + 0.859375, + 0.3359375, + 0.1533203125, + 0.796875, + 0.296875, + 0.2294921875 + ], + [ + 0.5546875, + 0.55859375, + 0.0751953125, + 0.62109375, + 0.2275390625, + 0.1328125, + 0.9609375, + 0.291015625, + 0.41015625, + 0.142578125 + ], + [ + 0.9453125, + 0.01556396484375, + 0.00933837890625, + 0.404296875, + 0.12060546875, + 0.1943359375, + 0.287109375, + 0.46875, + 0.88671875, + 0.421875 + ], + [ + 0.7890625, + 0.95703125, + 0.84375, + 0.8515625, + 0.796875, + 0.1142578125, + 0.169921875, + 0.2734375, + 0.671875, + 0.41796875 + ], + [ + 0.5, + 0.8125, + 0.032958984375, + 0.86328125, + 0.5625, + 0.58984375, + 0.279296875, + 0.1640625, + 0.5703125, + 0.83984375 + ] + ], + [ + [ + 0.75390625, + 0.796875, + 0.3359375, + 0.625, + 0.5625, + 0.08837890625, + 0.53515625, + 0.0016021728515625, + 0.734375, + 0.88671875 + ], + [ + 0.88671875, + 0.322265625, + 0.609375, + 0.74609375, + 0.63671875, + 0.013671875, + 0.5234375, + 0.51171875, + 0.80859375, + 0.80078125 + ], + [ + 0.65625, + 0.154296875, + 0.55859375, + 0.8828125, + 0.162109375, + 0.85546875, + 0.08251953125, + 0.9609375, + 0.96484375, + 0.98046875 + ], + [ + 0.33984375, + 0.8515625, + 0.341796875, + 0.1005859375, + 0.4296875, + 0.80078125, + 0.0244140625, + 0.439453125, + 0.6015625, + 0.8125 + ], + [ + 0.2490234375, + 0.109375, + 0.2021484375, + 0.609375, + 0.6171875, + 0.359375, + 0.515625, + 0.37109375, + 0.09033203125, + 0.08984375 + ], + [ + 0.5078125, + 0.92578125, + 0.4375, + 0.51953125, + 0.80859375, + 0.54296875, + 0.054443359375, + 0.375, + 0.022216796875, + 0.91796875 + ], + [ + 0.9765625, + 0.22265625, + 0.54296875, + 0.07568359375, + 0.220703125, + 0.08740234375, + 0.003936767578125, + 0.65234375, + 0.435546875, + 0.69140625 + ], + [ + 0.96875, + 0.89453125, + 0.035888671875, + 0.408203125, + 0.93359375, + 0.9609375, + 0.72265625, + 0.251953125, + 0.4296875, + 0.28125 + ] + ], + [ + [ + 0.251953125, + 0.2578125, + 0.6875, + 0.703125, + 0.56640625, + 0.9375, + 0.7578125, + 0.419921875, + 0.8203125, + 0.2421875 + ], + [ + 0.4140625, + 0.052734375, + 0.9140625, + 0.275390625, + 0.1025390625, + 0.76953125, + 0.94140625, + 0.8359375, + 0.322265625, + 0.99609375 + ], + [ + 0.275390625, + 0.2294921875, + 0.2001953125, + 0.014892578125, + 0.578125, + 0.734375, + 0.60546875, + 0.53125, + 0.640625, + 0.87109375 + ], + [ + 0.30859375, + 0.474609375, + 0.90234375, + 0.26953125, + 0.047119140625, + 0.33203125, + 0.66015625, + 0.06298828125, + 0.1962890625, + 0.4296875 + ], + [ + 0.375, + 0.921875, + 0.52734375, + 0.88671875, + 0.3984375, + 0.58203125, + 0.5625, + 0.16015625, + 0.01483154296875, + 0.267578125 + ], + [ + 0.051513671875, + 0.7421875, + 0.84375, + 0.33984375, + 0.1748046875, + 0.1494140625, + 0.5078125, + 0.44140625, + 0.94140625, + 0.90625 + ], + [ + 0.9453125, + 0.65234375, + 0.84765625, + 0.8046875, + 0.296875, + 0.61328125, + 0.50390625, + 0.56640625, + 0.4375, + 0.2490234375 + ], + [ + 0.79296875, + 0.1533203125, + 0.26953125, + 0.8125, + 0.89453125, + 0.93359375, + 0.953125, + 0.14453125, + 0.5390625, + 0.1787109375 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/test.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/test.json new file mode 100644 index 000000000..cf48d250c --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_OutputZeroPointNotZero_1x10x8x10_bf16_accf32_st11_kern22_pad0000/test.json @@ -0,0 +1,77 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + regions: [ + { + name: "main", + blocks: [ + { + name: "main", + operators: [ + { + op: "AVG_POOL2D", + attribute_type: "PoolAttribute", + attribute: { + pad: [ + 0, + 0, + 0, + 0 + ], + kernel: [ + 2, + 2 + ], + stride: [ + 1, + 1 + ], + input_zp: 0, + output_zp: 121, + accum_dtype: "FP32" + }, + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1, + 10, + 8, + 10 + ], + type: "BF16" + }, + { + name: "result-0", + shape: [ + 1, + 9, + 7, + 10 + ], + type: "BF16" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] + } + ] +} -- cgit v1.2.1