[PATCH i-g-t v2 1/4] opencl/compute_increment_kernel: Add opencl increment kernel

Nirmoy Das nirmoy.das at linux.intel.com
Wed Jan 17 09:20:04 UTC 2024


On 1/16/2024 10:27 PM, janga.rahul.kumar at intel.com wrote:
> From: Janga Rahul Kumar<janga.rahul.kumar at intel.com>
>
> Compute opencl increment kernel provided here is used in
> xe_compute_preempt test.
>
> Cc: Nirmoy Das<nirmoy.das at intel.com>
> Signed-off-by: Janga Rahul Kumar<janga.rahul.kumar at intel.com>
> ---
>   opencl/compute_increment_kernel.cl | 6 ++++++
>   1 file changed, 6 insertions(+)
>   create mode 100644 opencl/compute_increment_kernel.cl
>
> diff --git a/opencl/compute_increment_kernel.cl b/opencl/compute_increment_kernel.cl
> new file mode 100644
> index 000000000..976c5a338
> --- /dev/null
> +++ b/opencl/compute_increment_kernel.cl
> @@ -0,0 +1,6 @@
> +__kernel void square(__global float* input,

input is not used. With that removed,

Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>

>   __global float* output, const unsigned int count) {
> +  int i = get_global_id(0);
> +  for (int j = 0; j < count ; j++) {
> +    output[i] = output[i] + 1;
> +   }
> +}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20240117/a2fbeac5/attachment.htm>


More information about the igt-dev mailing list