| From ebbfd6b1101e74d15574c3f7b2c0914df92b940c Mon Sep 17 00:00:00 2001 |
| From: TFLite Patcher <tflite@localhost> |
| Date: Fri, 18 Oct 2024 18:00:33 +0800 |
| Subject: [PATCH] Fix NNAPI loading error |
| |
| PATCH_NAME=nnapi-loading-errors |
| --- |
| tensorflow/lite/nnapi/nnapi_implementation.cc | 2 -- |
| 1 file changed, 2 deletions(-) |
| |
| diff --git a/tensorflow/lite/nnapi/nnapi_implementation.cc b/tensorflow/lite/nnapi/nnapi_implementation.cc |
| index 64474a13..7a157e91 100644 |
| --- a/tensorflow/lite/nnapi/nnapi_implementation.cc |
| +++ b/tensorflow/lite/nnapi/nnapi_implementation.cc |
| @@ -198,7 +198,6 @@ const NnApi LoadNnApi() { |
| // instances of nn api RT |
| static const char nnapi_library_name[] = "libneuralnetworks.so"; |
| libneuralnetworks = dlopen(nnapi_library_name, RTLD_LAZY | RTLD_LOCAL); |
| -#ifdef __ANDROID__ |
| // Note: If there is an problem trying to open the NNAPI library on a |
| // non-Android system, the error message is suppressed. This is to avoid |
| // showing confusing errors when running in environments that do not support |
| @@ -211,7 +210,6 @@ const NnApi LoadNnApi() { |
| } |
| NNAPI_LOG("nnapi error: unable to open library %s", nnapi_library_name); |
| } |
| -#endif // __ANDROID__ |
| |
| nnapi.nnapi_exists = libneuralnetworks != nullptr; |
| |