Ensures that a model with TensorFlow ops can be imported as long as the appropriate delegate is linked into the client.
| 23 | // Ensures that a model with TensorFlow ops can be imported as long as the |
| 24 | // appropriate delegate is linked into the client. |
| 25 | TEST(FlexModel, WithFlexDelegate) { |
| 26 | auto model = FlatBufferModel::BuildFromFile( |
| 27 | "tensorflow/lite/testdata/multi_add_flex.bin"); |
| 28 | ASSERT_TRUE(model); |
| 29 | |
| 30 | std::unique_ptr<Interpreter> interpreter; |
| 31 | ASSERT_EQ(InterpreterBuilder(*model, |
| 32 | ops::builtin::BuiltinOpResolver{})(&interpreter), |
| 33 | kTfLiteOk); |
| 34 | ASSERT_TRUE(interpreter); |
| 35 | |
| 36 | ASSERT_EQ(interpreter->AllocateTensors(), kTfLiteOk); |
| 37 | } |
| 38 | |
| 39 | } // namespace tflite |
| 40 |
nothing calls this directly
no test coverage detected