| 1024 | } |
| 1025 | |
| 1026 | void SetUp() final { |
| 1027 | // Add two inputs and two outputs that don't depend on each other |
| 1028 | ASSERT_EQ(interpreter_.AddTensors(4), kTfLiteOk); |
| 1029 | interpreter_.SetInputs({0, 1}); |
| 1030 | interpreter_.SetOutputs({2, 3}); |
| 1031 | TfLiteQuantizationParams quantized; |
| 1032 | for (int tensor_index = 0; tensor_index < 4; tensor_index++) { |
| 1033 | ASSERT_EQ(interpreter_.SetTensorParametersReadWrite( |
| 1034 | tensor_index, kTfLiteFloat32, "", {3}, quantized), |
| 1035 | kTfLiteOk); |
| 1036 | } |
| 1037 | |
| 1038 | // Define two copy functions that also use the user_data to report that |
| 1039 | // they were called. |
| 1040 | // i.e. tensor[2] = copy(tensor[0]); tensor[3] = copy(tensor[1]); |
| 1041 | // thus we can reorder the two nodes arbitrary and still satisfy dependency |
| 1042 | // order. |
| 1043 | MakeCopyNode(0, 2); |
| 1044 | MakeCopyNode(1, 3); |
| 1045 | |
| 1046 | ASSERT_EQ(interpreter_.AllocateTensors(), kTfLiteOk); |
| 1047 | } |
| 1048 | |
| 1049 | protected: |
| 1050 | Interpreter interpreter_; |
nothing calls this directly
no test coverage detected