diff options
author | Yang Rong <rong.r.yang@intel.com> | 2015-09-16 17:19:29 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-09-18 16:21:18 +0800 |
commit | ff5bb6aa39792799d6396062bb088d72c85fbce8 (patch) | |
tree | c640bcae5b1c3fc65d65c04dbf4664bd4c1528e1 | |
parent | f8bbc679292916e417bdd430a0a6b24df438d3c8 (diff) |
Don't use cl_buffer_get_subdata in clEnqueueReadBuffer.
cl_buffer_get_subdata sometime is very very very slow in linux kernel, in skl and chv,
and it is random. So temporary disable it, use map/copy/unmap to read.
Should re-enable it after find root cause.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Luo, Xionghu <xionghu.luo@intel.com>
-rw-r--r-- | src/cl_enqueue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cl_enqueue.c b/src/cl_enqueue.c index e858d5e3..9e34bb89 100644 --- a/src/cl_enqueue.c +++ b/src/cl_enqueue.c @@ -36,7 +36,10 @@ cl_int cl_enqueue_read_buffer(enqueue_data* data) assert(mem->type == CL_MEM_BUFFER_TYPE || mem->type == CL_MEM_SUBBUFFER_TYPE); struct _cl_mem_buffer* buffer = (struct _cl_mem_buffer*)mem; - if (!mem->is_userptr) { + //cl_buffer_get_subdata sometime is very very very slow in linux kernel, in skl and chv, + //and it is randomly. So temporary disable it, use map/copy/unmap to read. + //Should re-enable it after find root cause. + if (0 && !mem->is_userptr) { if (cl_buffer_get_subdata(mem->bo, data->offset + buffer->sub_offset, data->size, data->ptr) != 0) err = CL_MAP_FAILURE; |