[Piglit] [PATCH] cl: Add tests for stored fneg

Matt Arsenault arsenm2 at gmail.com
Thu Jan 26 23:11:24 UTC 2017


> On Jan 20, 2017, at 11:56, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> nly one config section per test file.
> 
>> +
>> +[test]
>> +name: fneg
>> +kernel_name: fneg_f32
>> +global_size: 15 0 0
>> +
>> +arg_out: 0 buffer float[15]   \
>> +  -0.0  0.0  -0.5  0.5  \
>> +  -1.0  1.0  -2.0  2.0  \
>> +  -4.0  4.0 -10.0  10.0 \
>> +  -inf  inf  nan
>> +
>> +arg_in: 1 buffer float[15]   \
>> +  0.0  -0.0   0.5  -0.5       \
>> +  1.0  -1.0   2.0  -2.0       \
>> +  4.0  -4.0  10.0  -10.0      \
>> +  inf  -inf  nan
> 
> can you split the values between -pos and -neg tests?
> sorry, I should have been more explicit the first time.

I don’t see the point of doing this and it will increase the execution cost of the test, plus I find more tests of the same kernel more annoying to update


> 
>> +
>> !*/
>> 
>> kernel void add(global float* out, float a, float b) {
>> @@ -341,3 +365,9 @@ kernel void plus(global float* out, float in) {
>> kernel void minus(global float* out, float in) {
>> 	out[0] = -in;
>> }
>> +
>> +kernel void fneg_f32(global float* out, global float* in)
>> +{
>> +    int id = get_global_id(0);
>> +    out[id] = -in[id];
>> +}
> 
> this should replace the "minus" kernel.
> 

I was debating this, although the scalar input argument is a difference. The new version removes this

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170126/5e7b8b8a/attachment.html>


More information about the Piglit mailing list