From f42c430ce7d8c7c3fa412ba48c5e602def6f639c Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Tue, 14 Feb 2023 11:47:19 +0000 Subject: Create MI tests for Tensor: FFT2D & RFFT2D Signed-off-by: Jeremy Johnson Change-Id: Ieca8d91a9294f5cb23feb1fcf155349e08d45bf0 --- .../desc.json | 25 +++++++ .../input-0.json | 23 ++++++ .../input-1.json | 23 ++++++ .../test.json | 82 ++++++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/desc.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-0.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-1.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/test.json (limited to 'operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse') diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/desc.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/desc.json new file mode 100644 index 000000000..155c621ff --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/desc.json @@ -0,0 +1,25 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0", + "input-1" + ], + "ifm_file": [ + "input-0.npy", + "input-1.npy" + ], + "ofm_name": [ + "result-0", + "result-1" + ], + "ofm_file": [ + "result-0.npy", + "result-1.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/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-0.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-0.json new file mode 100644 index 000000000..213a0bf24 --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-0.json @@ -0,0 +1,23 @@ +{ + "type": "float32", + "data": [ + [ + [ + 0.6102274656295776, + 0.4439428746700287 + ], + [ + 0.9359375238418579, + 0.8539843559265137 + ], + [ + 0.3222156763076782, + 0.5445483922958374 + ], + [ + 0.4898242652416229, + 0.6322025060653687 + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-1.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-1.json new file mode 100644 index 000000000..725f02046 --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/input-1.json @@ -0,0 +1,23 @@ +{ + "type": "float32", + "data": [ + [ + [ + 0.3341112732887268, + 0.24420499801635742 + ], + [ + 0.9126718640327454, + 0.9238744974136353 + ], + [ + 0.8433228731155396, + 0.9782044291496277 + ], + [ + 0.7449915409088135, + 0.7646672129631042 + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/test.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/test.json new file mode 100644 index 000000000..292bed62a --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongOutputList_1x4x2_f32_inverseFalse/test.json @@ -0,0 +1,82 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + regions: [ + { + name: "main", + blocks: [ + { + name: "main", + operators: [ + { + op: "FFT2D", + attribute_type: "FFTAttribute", + attribute: { + inverse: false + }, + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0", + "result-1", + "eiDummyOutput" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1, + 4, + 2 + ], + type: "FP32" + }, + { + name: "input-1", + shape: [ + 1, + 4, + 2 + ], + type: "FP32" + }, + { + name: "result-0", + shape: [ + 1, + 4, + 2 + ], + type: "FP32" + }, + { + name: "result-1", + shape: [ + 1, + 4, + 2 + ], + type: "FP32" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0", + "result-1" + ] + } + ] + } + ] +} -- cgit v1.2.1