[lite] Delete the '--old_accelerated' flag from the label_image example.

The flag does not appear to be used anywhere, and the implementation
of the flag is using a deprecated method tflite::Interpreter::UseNNAPI
(which in turn also uses the NnApiDelegate function under the hood,
which is also deprecated).

PiperOrigin-RevId: 333563488
Change-Id: Ia2c9aff3597c7629f8118eba9096a5bf55f056b2
This commit is contained in:
Fergus Henderson 2020-09-24 11:48:41 -07:00 committed by TensorFlower Gardener
parent e6e8407ebc
commit a0bb008488
2 changed files with 0 additions and 8 deletions

View File

@ -186,7 +186,6 @@ void RunInference(Settings* s) {
exit(-1);
}
interpreter->UseNNAPI(s->old_accel);
interpreter->SetAllowFp16PrecisionForFp32(s->allow_fp16);
if (s->verbose) {
@ -359,7 +358,6 @@ void display_usage() {
LOG(INFO)
<< "label_image\n"
<< "--accelerated, -a: [0|1], use Android NNAPI or not\n"
<< "--old_accelerated, -d: [0|1], use old Android NNAPI delegate or not\n"
<< "--allow_fp16, -f: [0|1], allow running fp32 models with fp16 or not\n"
<< "--count, -c: loop interpreter->Invoke() for certain times\n"
<< "--gl_backend, -g: [0|1]: use GL GPU Delegate on Android\n"
@ -385,7 +383,6 @@ int Main(int argc, char** argv) {
while (true) {
static struct option long_options[] = {
{"accelerated", required_argument, nullptr, 'a'},
{"old_accelerated", required_argument, nullptr, 'd'},
{"allow_fp16", required_argument, nullptr, 'f'},
{"count", required_argument, nullptr, 'c'},
{"verbose", required_argument, nullptr, 'v'},
@ -425,10 +422,6 @@ int Main(int argc, char** argv) {
s.loop_count =
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
break;
case 'd':
s.old_accel =
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
break;
case 'e':
s.max_profiling_buffer_entries =
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)

View File

@ -25,7 +25,6 @@ namespace label_image {
struct Settings {
bool verbose = false;
bool accel = false;
bool old_accel = false;
TfLiteType input_type = kTfLiteFloat32;
bool profiling = false;
bool allow_fp16 = false;