mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Crash during model serialization if OpenCL not initialized (InferenceCalculator)

Open vertify-mldev1 opened this issue 3 years ago • 0 comments

The inference calculator crashes if model caching is activated (via serialized_model_dir and model_token options) and TFLiteGPURunner falls back to OpenGL api (i.e. when OpenCL initialization fails). The crash occurs during model serialization on this line since cl_environment_ is a null pointer. I tested it on a Google Pixel 2 which doesn't have the OpenCL library. Alternatively you can set targetSdkVersion in app/build.gradle to 31 or above and OpenCL won't be linked by default.

System information (Please provide as much relevant information as possible)

  • OS / used build tools Android 12 NDK: 21.3.6528147 SDK: 30 Build tools: 30.0.3
  • Installed using virtualenv? pip? Conda? (if python): no
  • MediaPipe version: 0.8.11
  • Bazel version: 5.3.0

vertify-mldev1 avatar Sep 21 '22 11:09 vertify-mldev1