summaryrefslogtreecommitdiff
path: root/kernels
AgeCommit message (Collapse)AuthorFilesLines
2017-07-06utests: add utest for fdiv to rcprander1-0/+8
for this case 1.0f/src, 2.0f/src can be converted, but 3.0f/src and i/src cant Signed-off-by: rander.wang <rander.wang@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-06-16Utset: Add test case for cl_intel_required_subgroup_size extensionPan Xiuli1-0/+5
Check the device supported subgroup sizes, and use intel_reqd_sub_group_size to build kernels in these size. Then check if there is spill for each kernel. V2: Fix memory leak Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-06-09utests: added for optimization negativeAddrander1-0/+4
the negative Add is like: exp -a llvm transfer it to: add x -a, 0 exp x Signed-off-by: rander.wang <rander.wang@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2017-06-09utests: add utest for sqrt-div optimizationrander1-0/+8
Signed-off-by: rander.wang <rander.wang@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-05-04utest: modify compiler_if_else to not rely on compiler behaviour.Ruiling Song1-2/+0
the test case modify src as well as dst. and it introduce cross workitem memory dependency in dst[id] = src[id+1]; The compiler may order 'then' and 'else' block not as written. If compiler order the else block first. src[3+1] will be modified in else part. And the utest will get wrong result. If user want to get the old behaviour, It should use two if-then and order them as required. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-04-13utest: fix image qualifier of compiler_fill_gl_image test.Yang Rong1-1/+1
After clang check the image qualifier, can't use default qualifier to write_image. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2017-03-23clang 3.9 will report error when use read_write in OpenCL-1.2.Luo Xionghu1-1/+1
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-03-13cl_intel_media_block_io WRITE related unit tests.Luo Xionghu1-0/+102
v2: remove printf code in kernel; disable DEBUG_OUTPUT. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2017-03-13cl_intel_media_block_io READ related unit tests.Luo Xionghu1-0/+115
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2017-03-13add utest for extension intel_planar_yuv.Luo Xionghu1-0/+24
v2: use read_only/write_only instead of read_write to run on OpenCL-1.2 platform; fix local size issue on IVB platform; Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2017-02-10Add example of using cl_khr_gl_sharing to do gl buffer sharing.Chuanbo Weng1-0/+15
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-12-30OCL20: add device enqueue test case.Yang, Rong R1-0/+18
Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-11-08GBE: handle ConstantExpr in program-scope variable handling.Ruiling Song1-1/+10
although we have eliminate ConstantExpr in llvm instructions, but in program scope variable, we still meet ConstantExpr. So, we handle it here. also enhance the test case to hit it. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-11-08libocl: Refine return type of workitem built-in functionsPan Xiuli1-0/+0
Add compiler_ceil64.spir for load_program_from_spir utest. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-08Utest: Add pipe related testPan Xiuli1-0/+117
Add test case for builtin with user struct type and int type and runtime tset for creatPipe and pipe query. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-08utest: add atomic opencl-2.0 case to test api.Yang Rong1-0/+53
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
2016-11-08utest: add generic atomic test.Luo Xionghu1-0/+33
only dword is supported so far. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
2016-11-08Utest: add a test case for built-in ctz functionPan Xiuli1-0/+16
Check all type of ctz function and 0 num bound case. V2: Fix type warning Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-08GBE: Implement new constant solution for ocl2Ruiling Song1-0/+68
Different from ocl 1.2, which gather all constant into one surface. ocl2 only gather program global/constant into one surface. But keep other constant passed through kernel argument in separate buffer. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-08utest: add generic pointer testRuiling Song1-0/+33
Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-03Utest: Add subgroup block read/write ushort test casePan Xiuli4-33/+153
Add ushort block read/write for buffer and image. Refine uint block read/write with suffix _ui. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-03Utest: Add test case for short type sub group shufflePan Xiuli4-4/+87
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-03Utest: Add test case for sub group short builtin functionsPan Xiuli3-0/+94
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-11-03Utest: Add test case for sub group broadcast shortPan Xiuli1-0/+10
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-09-28Utest: read/write_only qualifier should only used with image.Pan Xiuli1-1/+1
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
2016-09-12Utest: Change the kernel index to fit case indexPan Xiuli1-1/+1
Sub group broadcast case will fail in simd 16, for the kernel doesn't fit the test case. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-09-05Utest: Fix sub group broadcast for simd8Pan Xiuli1-1/+1
In simd8 mode, the sub group size is 8. We should use some index less than 8. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-08-31Utest: Add test for half type subgroup functionsPan Xiuli4-1/+72
Check if device support subgroup and half first, use build options to hide code for unsported device. V2: Fix half part test case for utest multithread. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-08-12Utest: Add half type mad test casePan Xiuli1-1/+16
Mad now can support half type, add a test. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-08-12Utest: Add test case for half type vload\storePan Xiuli1-3/+5
V2: Half program is different with normal program, reorder the test case order. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-08-03Benchmark: Evaluate math performance on intervalsGrigore Lupescu1-0/+272
Functions to benchmark math functions on intervals. Tests: sin, cos, exp2, exp, exp10, log2, log, log10 Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
2016-07-20Utest: Add test case for sub_group_shuffle_down/up/xorPan Xiuli3-0/+57
V2:Add subgroups extension check. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-30utests: add access qualifier for image in kernelGuo Yejun1-1/+1
the default access qualifier is __read_only, which is not correct for the image to be write in kernel, set the qualifer explictly. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-13Utest: Add tset case for block read/write imagePan Xiuli2-0/+58
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-13Utest: Add tset case for block read/write bufferPan Xiuli2-0/+58
V2: Rename test case to buffer block read/write test Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-13Utest: Add test case for sub_group functionsPan Xiuli4-0/+366
Long type need to be fixed before gen8, so hide them now. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-13Utest: Remove old sub_group_all/any utestPan Xiuli2-27/+0
This utest does not follow spec, so just remove them. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-06-13Utest: Add subgroup work item test casesPan Xiuli4-0/+28
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-05-23fix kernel build warnings.Luo Xionghu1-4/+4
^ has lower precedence than <, add parentheses. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-05-18Utest: Remove some unsuport work group testsPan Xiuli1-5/+6
HSW and IVB does not support long type, now hide these tests. V2: Remove some unsupport kernel. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-05-18Backend: Refine workgroup all with SIMD_ALL algorithmPan Xiuli1-1/+1
Fix the problem with AND implemention, use predicate simd width to get in-thread all and any result. V2: Fix a typo in utest. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-05-18Benchmark: Add performance tests for workgroup broadcastGrigore Lupescu1-0/+99
Added the following performance tests: benchmark_workgroup_broadcast_1D_int benchmark_workgroup_broadcast_1D_long benchmark_workgroup_broadcast_2D_int benchmark_workgroup_broadcast_2D_long Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-05-18Benchmark: Add performance tests for workgroup reduce/scan functionsGrigore Lupescu1-0/+140
Added the following performance tests: benchmark_workgroup_reduce_add_int benchmark_workgroup_reduce_add_long benchmark_workgroup_reduce_min_int benchmark_workgroup_reduce_min_long benchmark_workgroup_scan_inclusive_add_int benchmark_workgroup_scan_inclusive_add_long benchmark_workgroup_scan_inclusive_min_int benchmark_workgroup_scan_inclusive_min_long Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-05-18Utest: Add workgroup broadcast testsGrigore Lupescu1-8/+120
Added the following unit tests: compiler_workgroup_broadcast_1D_int compiler_workgroup_broadcast_1D_long compiler_workgroup_broadcast_2D_int compiler_workgroup_broadcast_2D_long compiler_workgroup_broadcast_3D_int compiler_workgroup_broadcast_3D_long Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-05-18Utest: Add workgroup scan inclusive testsGrigore Lupescu1-0/+98
Added the following unit tests: compiler_workgroup_scan_inclusive_add_int compiler_workgroup_scan_inclusive_add_uint compiler_workgroup_scan_inclusive_add_long compiler_workgroup_scan_inclusive_add_ulong compiler_workgroup_scan_inclusive_add_float compiler_workgroup_scan_inclusive_max_int compiler_workgroup_scan_inclusive_max_uint compiler_workgroup_scan_inclusive_max_long compiler_workgroup_scan_inclusive_max_ulong compiler_workgroup_scan_inclusive_max_float compiler_workgroup_scan_inclusive_min_int compiler_workgroup_scan_inclusive_min_uint compiler_workgroup_scan_inclusive_min_long compiler_workgroup_scan_inclusive_min_ulong compiler_workgroup_scan_inclusive_min_float Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-05-18Utest: Add workgroup scan exclusive testsGrigore Lupescu1-0/+98
Added the following unit tests: compiler_workgroup_scan_exclusive_add_int compiler_workgroup_scan_exclusive_add_uint compiler_workgroup_scan_exclusive_add_long compiler_workgroup_scan_exclusive_add_ulong compiler_workgroup_scan_exclusive_add_float compiler_workgroup_scan_exclusive_max_int compiler_workgroup_scan_exclusive_max_uint compiler_workgroup_scan_exclusive_max_long compiler_workgroup_scan_exclusive_max_ulong compiler_workgroup_scan_exclusive_max_float compiler_workgroup_scan_exclusive_min_int compiler_workgroup_scan_exclusive_min_uint compiler_workgroup_scan_exclusive_min_long compiler_workgroup_scan_exclusive_min_ulong compiler_workgroup_scan_exclusive_min_float Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-05-18Utest: Add workgroup reduce any/all testsGrigore Lupescu1-25/+122
Added the following unit tests: compiler_workgroup_any compiler_workgroup_all compiler_workgroup_reduce_add_int compiler_workgroup_reduce_add_uint compiler_workgroup_reduce_add_long compiler_workgroup_reduce_add_ulong compiler_workgroup_reduce_add_float compiler_workgroup_reduce_max_int compiler_workgroup_reduce_max_uint compiler_workgroup_reduce_max_long compiler_workgroup_reduce_max_ulong compiler_workgroup_reduce_max_float compiler_workgroup_reduce_min_int compiler_workgroup_reduce_min_uint compiler_workgroup_reduce_min_long compiler_workgroup_reduce_min_ulong compiler_workgroup_reduce_min_float Signed-off-by: Grigore Lupescu <grigore.lupescu at intel.com> Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
2016-04-29enable utest compiler_math_3op for mad test.Luo Xionghu1-1/+2
v2: add uniform dest test coverage. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2016-04-22fix failed cases for stand alone utest;Luo Xionghu2-2/+2
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>
2016-04-22Add several printf utest cases.Junyan He1-0/+46
Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Yan Wang <yan.wang@linux.intel.com> Reviewed-by: Junyan He <junyan.he@linux.intel.com>