MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReadSerializedModel

Function ReadSerializedModel

tensorflow/lite/delegates/gpu/gl/api.cc:417–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415
416#ifndef TFLITE_GPU_BINARY_RELEASE
417Status 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

Callers

nothing calls this directly

Calls 6

RequestGpuInfoFunction · 0.85
IsOpenGl31OrAboveFunction · 0.85
DeserializeCompiledModelFunction · 0.85
OkStatusFunction · 0.85
InternalErrorFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected