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

Jan Vesely jan.vesely at rutgers.edu
Fri Jan 27 03:57:48 UTC 2017


On Thu, 2017-01-26 at 15:11 -0800, Matt Arsenault wrote:
> > 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.

my motivation was to avoid duplicate tests.

> 
> 
> > 
> > > +
> > > !*/
> > > 
> > > 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

I was about to suggest merging the tests, but I see the new tests
already does that.

thanks,
Jan

> 
> -Matt

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170126/e5cc063d/attachment-0001.sig>


More information about the Piglit mailing list