[Piglit] [PATCH 2/3] cl: Add 3-arg TTS kernel type
Tom Stellard
tom at stellard.net
Thu Jun 12 16:41:54 PDT 2014
On Wed, Jun 11, 2014 at 05:12:30PM -0500, Aaron Watry wrote:
> For built-ins with (vec, vec, scalar) arguments (such as mix)
>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> Signed-off-by: Aaron Watry <awatry at gmail.com>
> ---
> generated_tests/genclbuiltins.py | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/generated_tests/genclbuiltins.py b/generated_tests/genclbuiltins.py
> index 2a35375..2d2b322 100644
> --- a/generated_tests/genclbuiltins.py
> +++ b/generated_tests/genclbuiltins.py
> @@ -168,20 +168,16 @@ def gen_kernel_3_arg_same_type(f, fnName, inType, outType):
> [vecSize, vecSize, vecSize], ''
> )
>
> -
> -def gen_kernel_3_arg_mixed_size_vector(f, fnName, inType, outType, vecSize):
> - f.write('kernel void test_tss_' + vecSize + '_' + fnName + '_' + inType +
> - '(global ' + outType + '* out, global ' + inType + '* in1, global '
> - + inType+'* in2, global '+inType+'* in3){\n' + ' vstore' + vecSize
> - + '(' + fnName + '(vload' + vecSize +
> - '(0, in1), *in2, *in3), 0, out);\n' + '}\n\n')
> -
> -
> -def gen_kernel_3_arg_mixed_size(f, fnName, inType, outType):
> +def gen_kernel_3_arg_mixed_size_tss(f, fnName, inType, outType):
> for vecSize in VEC_WIDTHS:
> gen_kernel(f, fnName, [inType, inType, inType], outType,
> [vecSize, 1, 1], 'tss_')
>
> +def gen_kernel_3_arg_mixed_size_tts(f, fnName, inType, outType):
> + for vecSize in VEC_WIDTHS:
> + gen_kernel(f, fnName, [inType, inType, inType], outType,
> + [vecSize, vecSize, 1], 'tts_')
> +
>
> def generate_kernels(f, dataType, fnName, fnDef):
> argTypes = getArgTypes(dataType, fnDef['arg_types'])
> @@ -200,7 +196,9 @@ def generate_kernels(f, dataType, fnName, fnDef):
> if (len(argTypes) == 4):
> gen_kernel_3_arg_same_type(f, fnName, argTypes[1], argTypes[0])
> if (fnDef['function_type'] is 'tss'):
> - gen_kernel_3_arg_mixed_size(f, fnName, argTypes[1], argTypes[0])
> + gen_kernel_3_arg_mixed_size_tss(f, fnName, argTypes[1], argTypes[0])
> + if (fnDef['function_type'] is 'tts'):
> + gen_kernel_3_arg_mixed_size_tts(f, fnName, argTypes[1], argTypes[0])
> return
>
> if (fnName is 'upsample'):
> --
> 1.9.1
>
More information about the Piglit
mailing list