[Piglit] [PATCH 07/10] cl: Add test for negative index + small offset for private

Jan Vesely jan.vesely at rutgers.edu
Tue Dec 6 19:04:21 UTC 2016


On Tue, 2016-12-06 at 10:52 -0800, Matt Arsenault wrote:
> > On Dec 5, 2016, at 12:42, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > 
> > On Mon, 2016-12-05 at 09:48 -0800, arsenm2 at gmail.com <mailto:arsenm2 at gmail.com> wrote:
> > > From: Matt Arsenault <arsenm2 at gmail.com>
> > > 
> > > ---
> > > .../execute/negative-private-base-pointer.cl       | 120 +++++++++++++++++++++
> > > 1 file changed, 120 insertions(+)
> > > create mode 100644 tests/cl/program/execute/negative-private-base-pointer.cl
> > > 
> > > diff --git a/tests/cl/program/execute/negative-private-base-pointer.cl b/tests/cl/program/execute/negative-private-base-pointer.cl
> > > new file mode 100644
> > > index 0000000..7ee528b
> > > --- /dev/null
> > > +++ b/tests/cl/program/execute/negative-private-base-pointer.cl
> > > @@ -0,0 +1,120 @@
> > > +/*!
> > > +[config]
> > > +name: negative private buffer base index
> > > +clc_version_min: 10
> > > +dimensions: 1
> > > +
> > > +[test]
> > > +kernel_name: read_write_private_base_plus_offset
> > > +name: negative base private index
> > > +global_size: 1 0 0
> > > +
> > > +arg_out: 0 buffer int[16]  \
> > > +  0xab       \
> > > +  0xbc       \
> > > +  0xabcd     \
> > > +  0xdead     \
> > > +             \
> > > +  0xcafe     \
> > > +  0xf00d     \
> > > +  0xababfeed \
> > > +  0xca00fe   \
> > > +             \
> > > +  0xb00feed  \
> > > +  0xca00fe   \
> > > +  0xfeedbeef \
> > > +  0xfe       \
> > > +             \
> > > +  0xbe00fe   \
> > > +  0xabcdef   \
> > > +  0xbeef     \
> > > +  0xde
> > > +
> > > +
> > > +arg_in: 1 buffer int[16] \
> > > +    -1 \
> > > +    -1 \
> > > +    -4 \
> > > +    -4 \
> > > +       \
> > > +    -3 \
> > > +    -4 \
> > > +    -2 \
> > > +  -115 \
> > > +       \
> > > +  -109 \
> > > + -1015 \
> > > + -1011 \
> > > + -1020 \
> > > +       \
> > > + -1014 \
> > > +  -137 \
> > > +  -151 \
> > > +   -40
> > > +
> > > +!*/
> > > +
> > > +#if 0
> > > +  0xab   \
> > > +  0xbc   \
> > > +  0xf00d \
> > > +  0xdead \
> > > +  0xcafe \
> > > +  0xabcd \
> > > +  0xababfeed \
> > > +  0xca00fe   \
> > > +  0xb00feed  \
> > > +  0xca00fe   \
> > > +  0xfeedbeef \
> > > +  0xfe       \
> > > +  0xbe00fe   \
> > > +  0xabcdef   \
> > > +  0xbeef     \
> > > +  0xde
> > > +#endif
> > > +
> > > +kernel void read_write_private_base_plus_offset(global int* out, global int* in)
> > > +{
> > > +    volatile int alloca[16];
> > 
> > does this need to be volatile?
> > 
> > other than that:
> > Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu <mailto:jan.vesely at rutgers.edu>>
> > 
> > Jan
> 
> Yes, otherwise the private memory access will be trivially optimized
> out defeating the point of the test

I don't get the trivial part. what would that be optimized to? the
indices are using values from input buffer (therefore unknown), so it
cannot directly match the constants to corresponding position in out
buffer.

Jan
> 
> -Matt
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161206/954e24a6/attachment.sig>


More information about the Piglit mailing list