From 383b3730c3963518fb7ff3f93239257d9891945f Mon Sep 17 00:00:00 2001 From: homuler Date: Tue, 19 Oct 2021 15:28:55 +0900 Subject: [PATCH] fix: enable OpenCL on Android --- third_party/mediapipe_workaround.diff | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/third_party/mediapipe_workaround.diff b/third_party/mediapipe_workaround.diff index 017b74018..e03a2fe0f 100644 --- a/third_party/mediapipe_workaround.diff +++ b/third_party/mediapipe_workaround.diff @@ -270,15 +270,18 @@ index 66150c5..b3a14a9 100644 ":annotation_cc_proto", ":belief_decoder_config_cc_proto", diff --git a/mediapipe/util/tflite/tflite_gpu_runner.cc b/mediapipe/util/tflite/tflite_gpu_runner.cc -index 5445f02..78af4f6 100644 +index 5445f02..0758efe 100644 --- a/mediapipe/util/tflite/tflite_gpu_runner.cc +++ b/mediapipe/util/tflite/tflite_gpu_runner.cc -@@ -214,7 +214,7 @@ absl::Status TFLiteGPURunner::InitializeOpenCL( +@@ -213,8 +213,10 @@ absl::Status TFLiteGPURunner::InitializeOpenCL( + cl::NewInferenceEnvironment(env_options, &cl_environment_, &properties)); MP_RETURN_IF_ERROR(cl_environment_->NewInferenceBuilder( cl_options, std::move(*graph_cl_), builder)); - #endif -- return absl::OkStatus(); +-#endif + return absl::OkStatus(); ++#else + return mediapipe::UnimplementedError("Currently only Android is supported"); ++#endif } } // namespace gpu