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

Method EnqueueReadBuffer

tensorflow/lite/delegates/gpu/cl/cl_command_queue.cc:149–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149Status CLCommandQueue::EnqueueReadBuffer(cl_mem memory, size_t size_in_bytes,
150 void* data) {
151 auto error_code = clEnqueueReadBuffer(
152 queue_, memory, CL_TRUE, 0, size_in_bytes, data, 0, nullptr, nullptr);
153 if (error_code != CL_SUCCESS) {
154 return UnknownError(
155 absl::StrCat("Failed to read data from GPU (clEnqueueReadBuffer) - ",
156 CLErrorCodeToString(error_code)));
157 }
158 return OkStatus();
159}
160
161Status CLCommandQueue::WaitForCompletion() {
162 auto error_code = clFinish(queue_);

Callers 4

ReadDataBHWCMethod · 0.80
ReadDataMethod · 0.80
ReadDataMethod · 0.80
ConvertMethod · 0.80

Calls 4

CLErrorCodeToStringFunction · 0.85
OkStatusFunction · 0.85
UnknownErrorFunction · 0.50
StrCatFunction · 0.50

Tested by

no test coverage detected