Add newly added NNAPI error codes

PiperOrigin-RevId: 307416344
Change-Id: I7504d0c53cc8004e4dc8d6100f93e1756e78b0d9
This commit is contained in:
A. Unique TensorFlower 2020-04-20 09:37:54 -07:00 committed by TensorFlower Gardener
parent 684bd994a9
commit 9068396144
2 changed files with 15 additions and 0 deletions

View File

@ -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);
}

View File

@ -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)