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

Method Finish

tensorflow/lite/delegates/gpu/cl/gl_interop.cc:231–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231Status GlInteropFabric::Finish() {
232 if (!is_enabled()) {
233 return OkStatus();
234 }
235 RETURN_IF_ERROR(gl_objects_.Release({}, &outbound_event_));
236
237 // if (is_egl_sync_supported_ && is_cl_to_egl_mapping_supported_) {
238 // EglSync egl_outbound_sync;
239 // RETURN_IF_ERROR(CreateEglSyncFromClEvent(outbound_event_.event(),
240 // egl_display_,
241 // &egl_outbound_sync));
242 // // Instruct GL pipeline to wait until corresponding CL event is signaled.
243 // RETURN_IF_ERROR(egl_outbound_sync.ServerWait());
244 // glFlush();
245 // } else {
246 // // Slower option if proper sync is not supported. It is equivalent to
247 // // clFinish, but, hopefully, faster.
248 // outbound_event_.Wait();
249 // }
250
251 // This slow sync is the only working solution right now. We have to debug why
252 // above version is not working fast and reliable.
253 outbound_event_.Wait();
254 return OkStatus();
255}
256
257} // namespace cl
258} // namespace gpu

Callers 9

AddTfOpMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
EncodeFunction · 0.45
AddProgramMethod · 0.45
FinalizeMethod · 0.45
GetSerializedCacheMethod · 0.45
RunMethod · 0.45

Calls 3

OkStatusFunction · 0.85
ReleaseMethod · 0.45
WaitMethod · 0.45

Tested by 1

AddTfOpMethod · 0.36