[Beignet] [PATCH] Don't use cl_buffer_get_subdata in clEnqueueReadBuffer.

Song, Ruiling ruiling.song at intel.com
Thu Sep 17 00:35:19 PDT 2015


LGTM

Thanks!
Ruiling

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Yang Rong
> Sent: Wednesday, September 16, 2015 5:19 PM
> To: beignet at lists.freedesktop.org
> Cc: Yang, Rong R
> Subject: [Beignet] [PATCH] 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 at intel.com>
> ---
>  src/cl_enqueue.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/cl_enqueue.c b/src/cl_enqueue.c index e858d5e..9e34bb8
> 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;
> --
> 1.8.3.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list