[Piglit] [PATCH 07/10] cl: Add test for negative index + small offset for private
Matt Arsenault
arsenm2 at gmail.com
Tue Dec 6 18:52:38 UTC 2016
> 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
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161206/4cbc6788/attachment.html>
More information about the Piglit
mailing list