| 415 | |
| 416 | #ifndef TFLITE_GPU_BINARY_RELEASE |
| 417 | Status ReadSerializedModel(const std::vector<uint8_t>& serialized_model, |
| 418 | std::unique_ptr<CompiledModel>* compiled_model) { |
| 419 | GpuInfo gpu_info; |
| 420 | RETURN_IF_ERROR(RequestGpuInfo(&gpu_info)); |
| 421 | if (!IsOpenGl31OrAbove(gpu_info)) { |
| 422 | return InternalError( |
| 423 | "OpenGL ES 3.1 or above is required to use OpenGL inference."); |
| 424 | } |
| 425 | auto compiled_model_impl = absl::make_unique<CompiledModelImpl>(gpu_info); |
| 426 | RETURN_IF_ERROR(DeserializeCompiledModel( |
| 427 | absl::MakeConstSpan(serialized_model), compiled_model_impl.get())); |
| 428 | *compiled_model = std::move(compiled_model_impl); |
| 429 | return OkStatus(); |
| 430 | } |
| 431 | #endif // TFLITE_GPU_BINARY_RELEASE |
| 432 | |
| 433 | } // namespace gl |
nothing calls this directly
no test coverage detected