diff options
author | Luo Xionghu <xionghu.luo@intel.com> | 2016-04-21 18:50:40 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-04-22 18:13:12 +0800 |
commit | 830d3c32d00669f7eec5d80a083b3a0a88b39d11 (patch) | |
tree | 7e5ae3183877cb3e404ee9cc9ba08305b78726cd /utests/utest_generator.py | |
parent | 0eebe2536c8e76cd20867d1ca00ba4735736f629 (diff) | |
download | beignet-830d3c32d00669f7eec5d80a083b3a0a88b39d11.tar.gz |
fix failed cases for stand alone utest;
1. use clEnqueueMapBuffer/Image instead of clEnqueueReadBuffer/Image;
2. add sanity check for clEnqueueMapImage;
v2: disable OpenCL 2.0 specific builtin cases for stand alone utest.
v3: don't hide failed cases. fix utest build warnings.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/utest_generator.py')
-rw-r--r-- | utests/utest_generator.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utests/utest_generator.py b/utests/utest_generator.py index 25f18c75..84029da7 100644 --- a/utests/utest_generator.py +++ b/utests/utest_generator.py @@ -361,11 +361,15 @@ static void %s_%s(void) funcrun=''' // Run the kernel: + //int errRead = clEnqueueReadBuffer( queue, buf[0], CL_TRUE, 0, sizeof(%s) * count_input, gpu_data, 0, NULL, NULL); OCL_NDRANGE( 1 ); - clEnqueueReadBuffer( queue, buf[0], CL_TRUE, 0, sizeof(%s) * count_input, gpu_data, 0, NULL, NULL); -'''%(self.inputtype.__len__()+1) + OCL_MAP_BUFFER(0); +'''%(self.argtype(0,index)) funcline += [ funcrun ] + text = ''' memcpy(gpu_data, buf_data[0], sizeof(gpu_data)); ''' + funcline += [ text ] + funcsprintfa=' sprintf(log, \"' funcsprintfb='' if (self.returnVector(index) == 1 and self.argvector(0,index) != 1): |