summaryrefslogtreecommitdiff
path: root/kernels
diff options
context:
space:
mode:
authorYongjia Zhang <Zhang_Yong_jia@126.com>2014-01-17 16:20:02 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-01-20 14:40:27 +0800
commitaceba68cb03fec686219e5c79f07362656f61128 (patch)
tree223fe9b9b1a7f66c9cb9d57592d8288fad465f81 /kernels
parentdf96397b9f8abdb682e658669de92a62b785ba38 (diff)
downloadbeignet-aceba68cb03fec686219e5c79f07362656f61128.tar.gz
Add utest compiler_private_data_overflow
utests: compiler_private_data_overflow is aimed to hit a larger than 1KB stack. It will fail with the old beignet which allocate 1KB stack size no matter the actual usage of stack in the kernel. Signed-off-by: Yongjia Zhang<zhang_yong_jia@126.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels')
-rw-r--r--kernels/compiler_private_data_overflow.cl10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernels/compiler_private_data_overflow.cl b/kernels/compiler_private_data_overflow.cl
new file mode 100644
index 00000000..d0f557dd
--- /dev/null
+++ b/kernels/compiler_private_data_overflow.cl
@@ -0,0 +1,10 @@
+kernel void compiler_private_data_overflow( __global int4 *output )
+{
+ int4 data[65];
+ for( int i=0; i<65; ++i )
+ {
+ data[i] = (int4)i;
+ }
+ if( get_global_id(0) == 1 )
+ *output = data[0];
+}