[Beignet] [PATCH] Check for exhaustion of local memory

Zhigang Gong zhigang.gong at linux.intel.com
Wed Jun 5 20:24:34 PDT 2013


LGTM, pushed, thanks.

On Wed, Jun 05, 2013 at 07:57:26PM +0200, Dag Lem wrote:
> 
> Signed-off-by: Dag Lem <dag at nimrod.no>
> ---
>  src/cl_command_queue_gen7.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/cl_command_queue_gen7.c b/src/cl_command_queue_gen7.c
> index 5950334..cf6bd31 100644
> --- a/src/cl_command_queue_gen7.c
> +++ b/src/cl_command_queue_gen7.c
> @@ -216,8 +216,11 @@ cl_command_queue_ND_range_gen7(cl_command_queue queue,
>    kernel.cst_sz = cst_sz;
>  
>    /* Curbe step 1: fill the constant buffer data shared by all threads */
> -  if (ker->curbe)
> +  if (ker->curbe) {
>      kernel.slm_sz = cl_curbe_fill(ker, work_dim, global_wk_off, global_wk_sz, local_wk_sz, thread_n);
> +    if (kernel.slm_sz > ker->program->ctx->device->local_mem_size)
> +      return CL_OUT_OF_RESOURCES;
> +  }
>  
>    /* Setup the kernel */
>    cl_gpgpu_state_init(gpgpu, ctx->device->max_compute_unit, cst_sz / 32);
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list