diff --git a/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc b/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc index 36d9da1f557..0cb4d9efcc5 100644 --- a/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc +++ b/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc @@ -87,6 +87,16 @@ std::string NnApiErrorDescription(int error_code) { return "ANEURALNETWORKS_OUTPUT_INSUFFICIENT_SIZE"; case ANEURALNETWORKS_UNAVAILABLE_DEVICE: return "ANEURALNETWORKS_UNAVAILABLE_DEVICE"; + case ANEURALNETWORKS_MISSED_DEADLINE_TRANSIENT: + return "ANEURALNETWORKS_MISSED_DEADLINE_TRANSIENT"; + case ANEURALNETWORKS_MISSED_DEADLINE_PERSISTENT: + return "ANEURALNETWORKS_MISSED_DEADLINE_PERSISTENT"; + case ANEURALNETWORKS_RESOURCE_EXHAUSTED_TRANSIENT: + return "ANEURALNETWORKS_RESOURCE_EXHAUSTED_TRANSIENT"; + case ANEURALNETWORKS_RESOURCE_EXHAUSTED_PERSISTENT: + return "ANEURALNETWORKS_RESOURCE_EXHAUSTED_PERSISTENT"; + case ANEURALNETWORKS_DEAD_OBJECT: + return "ANEURALNETWORKS_DEAD_OBJECT"; default: return "Unknown NNAPI error code: " + std::to_string(error_code); } diff --git a/tensorflow/lite/nnapi/NeuralNetworksTypes.h b/tensorflow/lite/nnapi/NeuralNetworksTypes.h index a5c1a7c98ac..851c1718e0a 100644 --- a/tensorflow/lite/nnapi/NeuralNetworksTypes.h +++ b/tensorflow/lite/nnapi/NeuralNetworksTypes.h @@ -173,6 +173,11 @@ enum { ANEURALNETWORKS_UNMAPPABLE = 7, ANEURALNETWORKS_OUTPUT_INSUFFICIENT_SIZE = 8, ANEURALNETWORKS_UNAVAILABLE_DEVICE = 9, + ANEURALNETWORKS_MISSED_DEADLINE_TRANSIENT = 10, + ANEURALNETWORKS_MISSED_DEADLINE_PERSISTENT = 11, + ANEURALNETWORKS_RESOURCE_EXHAUSTED_TRANSIENT = 12, + ANEURALNETWORKS_RESOURCE_EXHAUSTED_PERSISTENT = 13, + ANEURALNETWORKS_DEAD_OBJECT = 14, }; // LINT.ThenChange(//tensorflow/lite/delegates/nnapi/nnapi_delegate.cc:NnApiErrorDescription)