[Beignet] [PATCH] avoid too many messages when the driver could not find good values for local_size
Yang, Rong R
rong.r.yang at intel.com
Wed Aug 31 07:59:09 UTC 2016
Yes, this message is just a hint, I think one time is enough, LGTM, thanks.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Guo Yejun
> Sent: Wednesday, August 31, 2016 7:20
> To: beignet at lists.freedesktop.org
> Cc: Guo, Yejun <yejun.guo at intel.com>
> Subject: [Beignet] [PATCH] avoid too many messages when the driver could
> not find good values for local_size
>
> Signed-off-by: Guo Yejun <yejun.guo at intel.com>
> ---
> src/cl_api.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/cl_api.c b/src/cl_api.c index d0d4dc5..a7c78f0 100644
> --- a/src/cl_api.c
> +++ b/src/cl_api.c
> @@ -3032,8 +3032,17 @@ clEnqueueNDRangeKernel(cl_command_queue
> command_queue,
> }
> realGroupSize *= fixed_local_sz[i];
> }
> - if (realGroupSize % 8 != 0)
> +
> + //in a loop of conformance test (such as test_api
> repeated_setup_cleanup), in each loop:
> + //create a new context, a new command queue, and uses
> 'globalsize[0]=1000, localsize=NULL' to enqueu kernel
> + //it triggers the following message for many times.
> + //to avoid too many messages, only print it for the first time of the
> process.
> + //just use static variable since it doesn't matter to print a few times at
> multi-thread case.
> + static int warn_no_good_localsize = 1;
> + if (realGroupSize % 8 != 0 && warn_no_good_localsize) {
> + warn_no_good_localsize = 0;
> DEBUGP(DL_WARNING, "unable to find good values for
> local_work_size[i], please provide local_work_size[] explicitly, you can find
> good values with trial-and-error method.");
> + }
> }
> }
>
> --
> 1.9.1
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list