diff --git a/src/operators/kernel/cl/fetch_kernel.cpp b/src/operators/kernel/cl/fetch_kernel.cpp index ca94ae475e46aac463338d554d73c1baddd9c269..06646debd43b6cc4ecf9b33f9c96e70f2289258a 100644 --- a/src/operators/kernel/cl/fetch_kernel.cpp +++ b/src/operators/kernel/cl/fetch_kernel.cpp @@ -14,6 +14,8 @@ limitations under the License. */ #include "operators/kernel/fetch_kernel.h" #include "framework/cl/cl_tensor.h" +//#include "common/common.h" +//#include namespace paddle_mobile { namespace operators { @@ -77,11 +79,19 @@ void FetchKernel::Compute(const FetchParam ¶m) { clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 3, NULL, default_work_size.data(), NULL, 0, NULL, NULL); +// auto time1 = paddle_mobile::time(); + // printf(" before finish \n"); // clFlsh(this->cl_helper_.CLCommandQueue()); -// clFinish(this->cl_helper_.CLCommandQueue()); + clFinish(this->cl_helper_.CLCommandQueue()); // printf(" after finish \n"); +// auto time2 = paddle_mobile::time(); +// +// +// std::cout << " finish cost :" << paddle_mobile::time_diff(time1, time2) +// << "ms" << std::endl; + memcpy(out->data(), out_cl_tensor.Data(), out->memory_size()); }