[PATCH i-g-t] lib/intel_compute: Fix incorrect check for opencl kernel support

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Jan 10 16:28:43 UTC 2024


On Wed, Jan 10, 2024 at 12:23:53PM +0530, janga.rahul.kumar at intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> 
> Skip compute tests on platforms which doesn't have a opencl
> kernel defined in the library.
> 
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> ---
>  lib/intel_compute.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/intel_compute.c b/lib/intel_compute.c
> index 1f1c79fd3..b092e5d85 100644
> --- a/lib/intel_compute.c
> +++ b/lib/intel_compute.c
> @@ -1430,7 +1430,7 @@ static bool __run_intel_compute_kernel(int fd,
>  		kernels++;
>  	}
>  	if (!kernels->kernel)
> -		return 1;
> +		return 0;

As function returns bool, may you switch this to false? With this:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew

>  
>  	intel_compute_batches[batch].compute_exec(fd, kernels->kernel,
>  						  kernels->size, eci);
> -- 
> 2.25.1
> 



More information about the igt-dev mailing list