[Beignet] [PATCH 2/2] Add a forgot break when calc local_sz.
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Dec 4 02:45:57 PST 2013
On Mon, Dec 02, 2013 at 05:10:27PM +0800, Yang Rong wrote:
>
> Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> ---
> src/cl_api.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/cl_api.c b/src/cl_api.c
> index 54701aa..bc8ee1d 100644
> --- a/src/cl_api.c
> +++ b/src/cl_api.c
> @@ -2467,8 +2467,10 @@ clEnqueueNDRangeKernel(cl_command_queue command_queue,
> } else {
> for (i = 0; i< work_dim; i++)
> for (j = 64; j > 1; j--) { //check from 64?
> - if (global_work_size[i] % j == 0) //global_work_size always non null
> + if (global_work_size[i] % j == 0) { //global_work_size always non null
> fixed_local_sz[i] = j;
> + break;
You may need to consider the max_group_size here. As our current max_group_size is
1024. Here the possible maximum group size here is 64*64*64 which is much larger than
1024. We should not assign an invalid group size here.
Any thoughts here?
> + }
> }
> }
> if (global_work_size != NULL)
> --
> 1.8.1.2
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list