MCPcopy Create free account
hub / github.com/ARM-software/armnn / TfLiteStatusToString

Function TfLiteStatusToString

tests/ExecuteNetwork/TfliteExecutor.cpp:20–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include <thread>
19
20std::string TfLiteStatusToString(const TfLiteStatus status)
21{
22 switch (status)
23 {
24 case kTfLiteOk:
25 return "Status: Ok.";
26 // Generally referring to an error in the runtime (i.e. interpreter)
27 case kTfLiteError:
28 return "Status: Tf runtime error.";
29 // Generally referring to an error from a TfLiteDelegate itself.
30 case kTfLiteDelegateError:
31 return "Status: The loaded delegate has returned an error.";
32 // Generally referring to an error in applying a delegate due to
33 // incompatibility between runtime and delegate, e.g., this error is returned
34 // when trying to apply a TF Lite delegate onto a model graph that's already
35 // immutable.
36 case kTfLiteApplicationError:
37 return "Status: Application error. An incompatibility between the Tf runtime and the loaded delegate.";
38 // Generally referring to serialized delegate data not being found.
39 // See tflite::delegates::Serialization.
40 case kTfLiteDelegateDataNotFound:
41 return "Status: data not found.";
42 // Generally referring to data-writing issues in delegate serialization.
43 // See tflite::delegates::Serialization.
44 case kTfLiteDelegateDataWriteError:
45 return "Status: Error writing serialization data.";
46 // Generally referring to data-reading issues in delegate serialization.
47 // See tflite::delegates::Serialization.
48 case kTfLiteDelegateDataReadError:
49 return "Status: Error reading serialization data.";
50 // Generally referring to issues when the TF Lite model has ops that cannot be
51 // resolved at runtime. This could happen when the specific op is not
52 // registered or built with the TF Lite framework.
53 case kTfLiteUnresolvedOps:
54 return "Status: Model contains an operation that is not recognised by the runtime.";
55 // Generally referring to invocation cancelled by the user.
56 case kTfLiteCancelled:
57 return "Status: invocation has been cancelled by the user.";
58 default:
59 break;
60 }
61 return "Unknown status result.";
62}
63
64TfLiteExecutor::TfLiteExecutor(const ExecuteNetworkParams& params, armnn::IRuntime::CreationOptions runtimeOptions)
65 : m_Params(params)

Callers 2

TfLiteExecutorMethod · 0.85
ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected