| 12 | #include <armnn/Logging.hpp> |
| 13 | |
| 14 | std::unique_ptr<IExecutor> BuildExecutor(ProgramOptions& programOptions) |
| 15 | { |
| 16 | if (programOptions.m_ExNetParams.m_TfLiteExecutor == |
| 17 | ExecuteNetworkParams::TfLiteExecutor::ArmNNTfLiteOpaqueDelegate || |
| 18 | programOptions.m_ExNetParams.m_TfLiteExecutor == ExecuteNetworkParams::TfLiteExecutor::ArmNNTfLiteDelegate || |
| 19 | programOptions.m_ExNetParams.m_TfLiteExecutor == ExecuteNetworkParams::TfLiteExecutor::TfliteInterpreter) |
| 20 | { |
| 21 | #if defined(ARMNN_TFLITE_DELEGATE) || defined(ARMNN_TFLITE_OPAQUE_DELEGATE) |
| 22 | return std::make_unique<TfLiteExecutor>(programOptions.m_ExNetParams, programOptions.m_RuntimeOptions); |
| 23 | #else |
| 24 | ARMNN_LOG(fatal) << "Not built with Arm NN Tensorflow-Lite delegate support."; |
| 25 | return nullptr; |
| 26 | #endif |
| 27 | } |
| 28 | else |
| 29 | { |
| 30 | return std::make_unique<ArmNNExecutor>(programOptions.m_ExNetParams, programOptions.m_RuntimeOptions); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // MAIN |
| 35 | int main(int argc, const char* argv[]) |