From e926477175d04742f000925b4780d97e0c919e86 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 14 Dec 2022 12:16:05 +0000 Subject: Create MI tests for EW Binary: MINIMUM, MAXIMUM Signed-off-by: James Ward Change-Id: I59cc5c683e270dcea7ced52fc1d037a553ff544f --- .../desc.json | 23 +++ .../input-0.json | 159 +++++++++++++++++++++ .../input-1.json | 19 +++ .../test.json | 59 ++++++++ 4 files changed, 260 insertions(+) create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/desc.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-0.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-1.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/test.json (limited to 'operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32') diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/desc.json b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/desc.json new file mode 100644 index 000000000..200d6a41d --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/desc.json @@ -0,0 +1,23 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0", + "input-1" + ], + "ifm_file": [ + "input-0.npy", + "input-1.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "Op output list does not match expected output", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-0.json b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-0.json new file mode 100644 index 000000000..fcc5a8a79 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-0.json @@ -0,0 +1,159 @@ +{ + "type": "float32", + "data": [ + [ + 0.4215586483478546, + 0.6201281547546387, + 0.49150875210762024, + 0.5138480067253113, + 0.44222816824913025, + 0.04742709919810295, + 0.43393388390541077, + 0.9619197845458984, + 0.7720508575439453, + 0.6950482726097107, + 0.1191268339753151, + 0.42072606086730957 + ], + [ + 0.7601527571678162, + 0.04968877136707306, + 0.12034020572900772, + 0.3800376355648041, + 0.7368229627609253, + 0.21068687736988068, + 0.36746370792388916, + 0.3283153474330902, + 0.5428772568702698, + 0.523367166519165, + 0.7298113703727722, + 0.22177091240882874 + ], + [ + 0.7517144083976746, + 0.8745480179786682, + 0.04947143793106079, + 0.3914879858493805, + 0.18246440589427948, + 0.4738876223564148, + 0.77659010887146, + 0.5003355145454407, + 0.16651290655136108, + 0.12188053131103516, + 0.78010493516922, + 0.023446014150977135 + ], + [ + 0.9713237285614014, + 0.0455838106572628, + 0.22875705361366272, + 0.38614189624786377, + 0.7293384671211243, + 0.8397666811943054, + 0.14547660946846008, + 0.6415242552757263, + 0.29486241936683655, + 0.9087748527526855, + 0.5885240435600281, + 0.23798710107803345 + ], + [ + 0.16687312722206116, + 0.9640299677848816, + 0.8718036413192749, + 0.40497398376464844, + 0.1789577603340149, + 0.7741757035255432, + 0.2362271100282669, + 0.8608611822128296, + 0.9593065977096558, + 0.536631166934967, + 0.6068361401557922, + 0.08688518404960632 + ], + [ + 0.5677717328071594, + 0.5054644346237183, + 0.6037982106208801, + 0.7225528955459595, + 0.42791748046875, + 0.3493248522281647, + 0.20900118350982666, + 0.18416573107242584, + 0.8545138835906982, + 0.13542604446411133, + 0.09362102299928665, + 0.7126964330673218 + ], + [ + 0.6746366024017334, + 0.821549654006958, + 0.05847114697098732, + 0.3666146993637085, + 0.31430506706237793, + 0.17403742671012878, + 0.15717744827270508, + 0.9272134900093079, + 0.1288294792175293, + 0.5524010062217712, + 0.04098092019557953, + 0.9400730133056641 + ], + [ + 0.06620064377784729, + 0.0869760811328888, + 0.08833610266447067, + 0.818029522895813, + 0.6483786702156067, + 0.9484547972679138, + 0.16357897222042084, + 0.21232524514198303, + 0.4242457151412964, + 0.7558165788650513, + 0.6454342007637024, + 0.19887256622314453 + ], + [ + 0.7914591431617737, + 0.8621190786361694, + 0.9861845374107361, + 0.2716781795024872, + 0.5079125165939331, + 0.24716904759407043, + 0.22888799011707306, + 0.5459075570106506, + 0.033098917454481125, + 0.13904325664043427, + 0.47099751234054565, + 0.46415549516677856 + ], + [ + 0.6740214228630066, + 0.16571620106697083, + 0.8341509103775024, + 0.7200081944465637, + 0.1786181479692459, + 0.3639845848083496, + 0.975568413734436, + 0.8925203680992126, + 0.14267703890800476, + 0.8145883083343506, + 0.15670578181743622, + 0.5006085634231567 + ], + [ + 0.7703459858894348, + 0.8571029305458069, + 0.18713432550430298, + 0.18213045597076416, + 0.7021908760070801, + 0.836887001991272, + 0.7677581906318665, + 0.9767897725105286, + 0.03335808217525482, + 0.05327964201569557, + 0.9951416254043579, + 0.42563408613204956 + ] + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-1.json b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-1.json new file mode 100644 index 000000000..f7f6b8d19 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/input-1.json @@ -0,0 +1,19 @@ +{ + "type": "float32", + "data": [ + [ + 0.7266295552253723, + 0.14946091175079346, + 0.37304630875587463, + 0.99565589427948, + 0.7745139598846436, + 0.8245017528533936, + 0.4690799415111542, + 0.15839536488056183, + 0.9554899334907532, + 0.0005483710556291044, + 0.8955872058868408, + 0.21668820083141327 + ] + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/test.json b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/test.json new file mode 100644 index 000000000..23a712272 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_WrongOutputList_11x12_f32/test.json @@ -0,0 +1,59 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "MAXIMUM", + attribute_type: "NONE", + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 11, + 12 + ], + type: "FP32" + }, + { + name: "input-1", + shape: [ + 1, + 12 + ], + type: "FP32" + }, + { + name: "result-0", + shape: [ + 11, + 12 + ], + type: "FP32" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1