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 | 27 ++++++++ .../input-1.json | 27 ++++++++ .../test.json | 81 ++++++++++++++++++++++ 4 files changed, 160 insertions(+) create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/desc.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-0.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-1.json create mode 100644 operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/test.json (limited to 'operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse') diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/desc.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/desc.json new file mode 100644 index 000000000..2f9bde3c9 --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_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": "Input data type not supported for this operator", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-0.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-0.json new file mode 100644 index 000000000..25e5f3b00 --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-0.json @@ -0,0 +1,27 @@ +{ + "type": "float32", + "data": [ + [ + [ + 0.00921630859375, + 0.1875, + 0.03125, + 0.1103515625, + 0.6171875, + 0.2412109375, + 0.56640625, + 0.58984375 + ], + [ + 0.84765625, + 0.004730224609375, + 0.8515625, + 0.6171875, + 0.162109375, + 0.76953125, + 0.85546875, + 0.25390625 + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-1.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-1.json new file mode 100644 index 000000000..67b14dd55 --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/input-1.json @@ -0,0 +1,27 @@ +{ + "type": "float32", + "data": [ + [ + [ + 0.91796875, + 0.453125, + 0.6015625, + 0.984375, + 0.361328125, + 0.8125, + 0.318359375, + 0.796875 + ], + [ + 0.59765625, + 0.2158203125, + 0.412109375, + 0.31640625, + 0.07763671875, + 0.02978515625, + 0.345703125, + 0.0189208984375 + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/test.json b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/test.json new file mode 100644 index 000000000..6c30df55f --- /dev/null +++ b/operators/tensor/fft2d/fft2d_ERRORIF_WrongInputType_1x2x8_bf16_inverseFalse/test.json @@ -0,0 +1,81 @@ +{ + 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" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1, + 2, + 8 + ], + type: "BF16" + }, + { + name: "input-1", + shape: [ + 1, + 2, + 8 + ], + type: "BF16" + }, + { + name: "result-0", + shape: [ + 1, + 2, + 8 + ], + type: "BF16" + }, + { + name: "result-1", + shape: [ + 1, + 2, + 8 + ], + type: "BF16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0", + "result-1" + ] + } + ] + } + ] +} -- cgit v1.2.1