From 9068396144131747a83383a641e52efedc28c34e Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 20 Apr 2020 09:37:54 -0700 Subject: [PATCH] Add newly added NNAPI error codes PiperOrigin-RevId: 307416344 Change-Id: I7504d0c53cc8004e4dc8d6100f93e1756e78b0d9 --- tensorflow/lite/delegates/nnapi/nnapi_delegate.cc | 10 ++++++++++ tensorflow/lite/nnapi/NeuralNetworksTypes.h | 5 +++++ 2 files changed, 15 insertions(+) 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)