[Piglit] [PATCH 4/5] cl: Run vXi32-stack subtest in parallel

Tom Stellard tom at stellard.net
Wed Sep 17 07:47:41 PDT 2014


On Wed, Sep 03, 2014 at 08:51:39PM -0400, Jan Vesely wrote:
> Avoid duplicate subtest names
> 

For patches 4 and 5, I would rather just rename the tests than merge them
together.  This keeps the tests simple and easy to debug if they fail.

You should apply for commit access, so you can start committing some
of these on your own.

-Tom

> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
>  tests/cl/program/execute/v2i32-stack.cl | 17 ++++++-----------
>  tests/cl/program/execute/v3i32-stack.cl | 15 ++++++---------
>  tests/cl/program/execute/v4i32-stack.cl | 15 ++++++---------
>  3 files changed, 18 insertions(+), 29 deletions(-)
> 
> diff --git a/tests/cl/program/execute/v2i32-stack.cl b/tests/cl/program/execute/v2i32-stack.cl
> index e61e386..536e39c 100644
> --- a/tests/cl/program/execute/v2i32-stack.cl
> +++ b/tests/cl/program/execute/v2i32-stack.cl
> @@ -1,22 +1,17 @@
>  /*!
>  [config]
> +dimensions: 1
>  
>  [test]
>  kernel_name: direct_write_indirect_read
>  name: direct write - indirect read
> -arg_out: 0 buffer int2[1] 0 1
> -arg_in:  1 int 0
> -
> -[test]
> -kernel_name: direct_write_indirect_read
> -name: direct write - indirect read
> -arg_out: 0 buffer int2[1] 2 3
> -arg_in:  1 int 1
> -
> +arg_out: 0 buffer int2[2] 0 1 2 3
> +global_size: 2 0 0
>  !*/
>  
> -kernel void direct_write_indirect_read(global int2 *out, int index) {
> +kernel void direct_write_indirect_read(global int2 *out) {
>  
> +	int index = get_global_id(0);
>  	int2 stack[2];
>  	stack[0].s0 = 0;
>  	stack[0].s1 = 1;
> @@ -24,5 +19,5 @@ kernel void direct_write_indirect_read(global int2 *out, int index) {
>  	stack[1].s0 = 2;
>  	stack[1].s1 = 3;
>  
> -	out[0] = stack[index];
> +	out[index] = stack[index];
>  }
> diff --git a/tests/cl/program/execute/v3i32-stack.cl b/tests/cl/program/execute/v3i32-stack.cl
> index 7c88979..8b7b13c 100644
> --- a/tests/cl/program/execute/v3i32-stack.cl
> +++ b/tests/cl/program/execute/v3i32-stack.cl
> @@ -1,21 +1,18 @@
>  /*!
>  [config]
> +dimensions: 1
>  
>  [test]
>  kernel_name: direct_write_indirect_read
>  name: direct write - indirect read
> -arg_out: 0 buffer int3[1] 0 1 2
> -arg_in:  1 int 0
> +arg_out: 0 buffer int3[2] 0 1 2 3 4 5
> +global_size: 2 0 0
>  
> -[test]
> -kernel_name: direct_write_indirect_read
> -name: direct write - indirect read
> -arg_out: 0 buffer int3[1] 3 4 5
> -arg_in:  1 int 1
>  !*/
>  
> -kernel void direct_write_indirect_read(global int3 *out, int index) {
> +kernel void direct_write_indirect_read(global int3 *out) {
>  
> +	int index = get_global_id(0);
>  	int3 stack[2];
>  	stack[0].s0 = 0;
>  	stack[0].s1 = 1;
> @@ -25,5 +22,5 @@ kernel void direct_write_indirect_read(global int3 *out, int index) {
>  	stack[1].s1 = 4;
>  	stack[1].s2 = 5;
>  
> -	out[0] = stack[index];
> +	out[index] = stack[index];
>  }
> diff --git a/tests/cl/program/execute/v4i32-stack.cl b/tests/cl/program/execute/v4i32-stack.cl
> index 751a370..79a1584 100644
> --- a/tests/cl/program/execute/v4i32-stack.cl
> +++ b/tests/cl/program/execute/v4i32-stack.cl
> @@ -1,21 +1,18 @@
>  /*!
>  [config]
> +dimensions: 1
>  
>  [test]
>  kernel_name: direct_write_indirect_read
>  name: direct write - indirect read
> -arg_out: 0 buffer int4[1] 0 1 2 3
> -arg_in:  1 int 0
> +arg_out: 0 buffer int4[2] 0 1 2 3 4 5 6 7
> +global_size: 2 0 0
>  
> -[test]
> -kernel_name: direct_write_indirect_read
> -name: direct write - indirect read
> -arg_out: 0 buffer int4[1] 4 5 6 7
> -arg_in:  1 int 1
>  !*/
>  
> -kernel void direct_write_indirect_read(global int4 *out, int index) {
> +kernel void direct_write_indirect_read(global int4 *out) {
>  
> +	int index = get_global_id(0);
>  	int4 stack[2];
>  	stack[0].s0 = 0;
>  	stack[0].s1 = 1;
> @@ -27,5 +24,5 @@ kernel void direct_write_indirect_read(global int4 *out, int index) {
>  	stack[1].s2 = 6;
>  	stack[1].s3 = 7;
>  
> -	out[0] = stack[index];
> +	out[index] = stack[index];
>  }
> -- 
> 1.9.3
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list