[Beignet] [PATCH] fix typo when check local size with work dim

Guo, Yejun yejun.guo at intel.com
Thu Apr 24 21:10:44 PDT 2014


oh, yes, you are right, it is not a typo.


Thanks
Yejun

-----Original Message-----
From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com] 
Sent: Friday, April 25, 2014 11:35 AM
To: Guo, Yejun; beignet at lists.freedesktop.org
Subject: RE: [Beignet] [PATCH] fix typo when check local size with work dim

This is not a typo error. Even if the user want to enqueue a 2D tasks, we still need to check all the 3 dimensions. Please check the cl_kernel_work_group_sz(), it need to get the required_sz for 3 dimensions. Please considering the following case,

one kernel specified the required_sz is 4*4*4 in the kernel function.
One application enqueue the kernel with 4*4 NDrange. If you only pass 2 to cl_kernel_work_group_sz(), it will pass the size check which is incorrect.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf 
> Of Guo Yejun
> Sent: Friday, April 25, 2014 3:22 AM
> To: beignet at lists.freedesktop.org
> Cc: Guo Yejun
> Subject: [Beignet] [PATCH] fix typo when check local size with work 
> dim
> 
> Signed-off-by: Guo Yejun <yejun.guo at intel.com>
> ---
>  src/cl_command_queue_gen7.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/cl_command_queue_gen7.c b/src/cl_command_queue_gen7.c 
> index 891d6f1..90e275d 100644
> --- a/src/cl_command_queue_gen7.c
> +++ b/src/cl_command_queue_gen7.c
> @@ -274,7 +274,7 @@
> cl_command_queue_ND_range_gen7(cl_command_queue queue,
>    kernel.use_slm = gbe_kernel_use_slm(ker->opaque);
> 
>    /* Compute the number of HW threads we need */
> -  TRY (cl_kernel_work_group_sz, ker, local_wk_sz, 3, &local_sz);
> +  TRY (cl_kernel_work_group_sz, ker, local_wk_sz, work_dim, 
> + &local_sz);
>    kernel.thread_n = thread_n = (local_sz + simd_sz - 1) / simd_sz;
>    kernel.curbe_sz = cst_sz;
> 
> --
> 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