<div dir="ltr">Earlier I made an issue in opencv track here : <a href="http://code.opencv.org/issues/3412">http://code.opencv.org/issues/3412</a><br><br>Thanks your patch.<br><br>I will try compile with llvm 3.3 </div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/12/4 Robert Jobbagy <span dir="ltr"><<a href="mailto:jobbagy.robert@gmail.com" target="_blank">jobbagy.robert@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I use Ubuntu 13.10 default 3.2 llvm </div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">2013/12/4 Zhigang Gong <span dir="ltr"><<a href="mailto:zhigang.gong@linux.intel.com" target="_blank">zhigang.gong@linux.intel.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just tried the same way as you. But the sympton is not the same, I met a<br>
region check bug which I just sent a patch to fix.<br>
<br>
After that fix, the squares example could run to complete but the result<br>
is incorrect, the acuracy check is also failed. I will continue to investigate<br>
this issue.<br>
<br>
The llvm/clang I am using is 3.3.1. What's yours?<br>
<div><div><br>
On Wed, Dec 04, 2013 at 09:32:06AM +0100, Robert Jobbagy wrote:<br>
> I attached my output log.<br>
><br>
><br>
> 2013/12/4 zhigang gong <<a href="mailto:zhigang.gong@gmail.com" target="_blank">zhigang.gong@gmail.com</a>><br>
><br>
> ><br>
> ><br>
> > On Wed, Dec 4, 2013 at 3:23 AM, Robert Jobbagy <<a href="mailto:jobbagy.robert@gmail.com" target="_blank">jobbagy.robert@gmail.com</a>>wrote:<br>
> ><br>
> >> Thanks your help, it works.<br>
> >><br>
> >> I tried this opencl example :<br>
> >><br>
> >> <a href="http://wiki.tiker.net/OpenCLHowTo#Testing" target="_blank">http://wiki.tiker.net/OpenCLHowTo#Testing</a><br>
> >><br>
> >> and it shows these supported extensions by IVB:<br>
> >><br>
> >> NAME: Intel HD Graphics Family<br>
> >> VENDOR: Intel<br>
> >> PROFILE: FULL_PROFILE<br>
> >> VERSION: OpenCL 1.2 beignet 0.3<br>
> >> EXTENSIONS: cl_khr_global_int32_base_atomics<br>
> >> cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics<br>
> >> cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store<br>
> >> cl_khr_icd cl_khr_gl_sharing<br>
> >> DRIVER_VERSION: 0.3<br>
> >><br>
> >><br>
> >> but when I use opencv with opencl I gave CL_BUILD_PROGRAM_FAILURE error.<br>
> >> I think the problem is opencv want to use cl_khr_fp64 extension and<br>
> >> beignet doesnt support yet or not ?<br>
> >><br>
> >  Could you provide more details about the failure? The complete error<br>
> > information, and the specific procedure to reproduce this failure.<br>
> ><br>
> >  Thanks,<br>
> >  Zhigang<br>
> ><br>
> >><br>
> >> What can I do ?<br>
> >><br>
> >> Thanks again.<br>
> >><br>
> >><br>
> >> 2013/12/2 Zhigang Gong <<a href="mailto:zhigang.gong@linux.intel.com" target="_blank">zhigang.gong@linux.intel.com</a>><br>
> >><br>
> >>> On Sat, Nov 30, 2013 at 10:57:00PM +0100, Robert Jobbagy wrote:<br>
> >>> > Thanks your help,<br>
> >>> ><br>
> >>> > I used mesa 9.2.1 and it's contains this patch.<br>
> >>> You need to use the eaxct version specified by that commit log, not just<br>
> >>> includes that patch.<br>
> >>> So you may need to use git checkout 92e62...<br>
> >>> ><br>
> >>> > I set mesa source and gone previous errors but I gave these compile<br>
> >>> errors.<br>
> >>> > I used opencl 1.2 branch:<br>
> >>> ><br>
> >>> ><br>
> >>> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:<br>
> >>> > In function ‘intel_get_gl_obj_from_texture’:<br>
> >>> ><br>
> >>> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:103:38:<br>
> >>> > error: dereferencing pointer to incomplete type<br>
> >>> >     obj = __mesa_lookup_texture(&intel->ctx, texture);<br>
> >>> >                                       ^<br>
> >>> ><br>
> >>> /home/evil85/Development/beignet_opencl_1_2/src/intel/intel_dri_resource_sharing.c:109:42:<br>
> >>> > error: dereferencing pointer to incomplete type<br>
> >>> >     __mesa_test_texobj_completeness(&intel->ctx, obj);<br>
> >>><br>
> >>><br>
> >>><br>
> ><br>
><br>
><br>
> --<br>
> Best Regards,<br>
><br>
> Robert<br>
<br>
</div></div>> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> VIDIOC_QUERYMENU: Invalid argument<br>
> platinfo size: 1<br>
> Vendor:Intel<br>
> Name: Experiment Intel Gen OCL Driver<br>
> PlatformProfile: FULL_PROFILE<br>
> Version: OpenCL 1.2 beignet 0.3<br>
> Major version: 1 Minor ver: 2<br>
> How many devices: 1<br>
> Device Name:Intel HD Graphics Family<br>
> DriverVer: 0.3<br>
> Intel: 1 Integraded? 0<br>
> Device profile: FULL_PROFILE<br>
> Device Type: 4<br>
> Device Vendor: Intel<br>
> Device Version: OpenCL 1.2 beignet 0.3<br>
> warming up ...<br>
> Devinfo compilationExtra:  -D INTEL_DEVICE build options: -D GENTYPE4=uchar4<br>
> all build options:  -D INTEL_DEVICE -D GENTYPE4=uchar4<br>
> source: convertC3C4 programSTR: #if defined (DOUBLE_SUPPORT)<br>
> #pragma OPENCL EXTENSION cl_khr_fp64:enable<br>
> #endif<br>
> __kernel void convertC3C4(__global const GENTYPE4 * restrict src, __global GENTYPE4 *dst, int cols, int rows,<br>
> int dstStep_in_piexl,int pixel_end)<br>
> {<br>
> int id = get_global_id(0);<br>
> int3 pixelid = (int3)(mul24(id,3),mad24(id,3,1),mad24(id,3,2));<br>
> pixelid = clamp(pixelid,0,pixel_end);<br>
> GENTYPE4 pixel0, pixel1, pixel2, outpix0,outpix1,outpix2,outpix3;<br>
> pixel0 = src[pixelid.x];<br>
> pixel1 = src[pixelid.y];<br>
> pixel2 = src[pixelid.z];<br>
> outpix0 = (GENTYPE4)(pixel0.x,pixel0.y,pixel0.z,0);<br>
> outpix1 = (GENTYPE4)(pixel0.w,pixel1.x,pixel1.y,0);<br>
> outpix2 = (GENTYPE4)(pixel1.z,pixel1.w,pixel2.x,0);<br>
> outpix3 = (GENTYPE4)(pixel2.y,pixel2.z,pixel2.w,0);<br>
> int4 outy = (id<<2)/cols;<br>
> int4 outx = (id<<2)%cols;<br>
> outx += (int4)(0, 1, 2, 3);<br>
> outy = select(outy, outy+1, outx>=cols);<br>
> outx = select(outx, outx-cols, outx>=cols);<br>
> outy = select(outy, outy + 1, outx >= cols);<br>
> outx = select(outx, outx-cols, outx >= cols);<br>
> outy = select(outy, outy + 1, outx >= cols);<br>
> outx = select(outx, outx-cols, outx >= cols);<br>
> int4 addr = mad24(outy,(int4)dstStep_in_piexl,outx);<br>
> if(outx.w<cols && outy.w<rows)<br>
> {<br>
> dst[addr.x] = outpix0;<br>
> dst[addr.y] = outpix1;<br>
> dst[addr.z] = outpix2;<br>
> dst[addr.w] = outpix3;<br>
> }<br>
> else if(outx.z<cols && outy.z<rows)<br>
> {<br>
> dst[addr.x] = outpix0;<br>
> dst[addr.y] = outpix1;<br>
> dst[addr.z] = outpix2;<br>
> }<br>
> else if(outx.y<cols && outy.y<rows)<br>
> {<br>
> dst[addr.x] = outpix0;<br>
> dst[addr.y] = outpix1;<br>
> }<br>
> else if(outx.x<cols && outy.x<rows)<br>
> {<br>
> dst[addr.x] = outpix0;<br>
> }<br>
> }<br>
> __kernel void convertC4C3(__global const GENTYPE4 * restrict src, __global GENTYPE4 *dst, int cols, int rows,<br>
> int srcStep_in_pixel,int pixel_end)<br>
> {<br>
> int id = get_global_id(0)<<2;<br>
> int y = id / cols;<br>
> int x = id % cols;<br>
> int4 x4 = (int4)(x,x+1,x+2,x+3);<br>
> int4 y4 = select((int4)y,(int4)(y+1),x4>=(int4)cols);<br>
> x4 = select(x4,x4-(int4)cols,x4>=(int4)cols);<br>
> y4 = select(y4, y4 + 1,x4>=(int4)cols);<br>
> x4 = select(x4, x4 - (int4)cols,x4>=(int4)cols);<br>
> y4 = select(y4, y4 + 1,x4>=(int4)cols);<br>
> x4 = select(x4, x4-(int4)cols,x4>=(int4)cols);<br>
> y4=clamp(y4,(int4)0,(int4)(rows-1));<br>
> int4 addr = mad24(y4, (int4)srcStep_in_pixel, x4);<br>
> GENTYPE4 pixel0,pixel1,pixel2,pixel3, outpixel1, outpixel2;<br>
> pixel0 = src[addr.x];<br>
> pixel1 = src[addr.y];<br>
> pixel2 = src[addr.z];<br>
> pixel3 = src[addr.w];<br>
> pixel0.w = pixel1.x;<br>
> outpixel1.x = pixel1.y;<br>
> outpixel1.y = pixel1.z;<br>
> outpixel1.z = pixel2.x;<br>
> outpixel1.w = pixel2.y;<br>
> outpixel2.x = pixel2.z;<br>
> outpixel2.y = pixel3.x;<br>
> outpixel2.z = pixel3.y;<br>
> outpixel2.w = pixel3.z;<br>
> int4 outaddr = mul24(id>>2 , 3);<br>
> outaddr.y++;<br>
> outaddr.z+=2;<br>
> if(outaddr.z <= pixel_end)<br>
> {<br>
> dst[outaddr.x] = pixel0;<br>
> dst[outaddr.y] = outpixel1;<br>
> dst[outaddr.z] = outpixel2;<br>
> }<br>
> else if(outaddr.y <= pixel_end)<br>
> {<br>
> dst[outaddr.x] = pixel0;<br>
> dst[outaddr.y] = outpixel1;<br>
> }<br>
> else if(outaddr.x <= pixel_end)<br>
> {<br>
> dst[outaddr.x] = pixel0;<br>
> }<br>
> }<br>
>  hash: 63881381b364c3374626fe67e3b07e05<br>
> options from params:  -D INTEL_DEVICE -D GENTYPE4=uchar4<br>
> foptions:   entry datasize: 15296<br>
> #2 device: 0x7f68ddebd760 createBinaryStatus: 0 options:  -D INTEL_DEVICE -D GENTYPE4=uchar4<br>
> binary size: 15296 binary[0]:<br>
> Device info: Intel HD Graphics Family Profile: FULL_PROFILE<br>
> Dev Version: OpenCL 1.2 beignet 0.3 Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd<br>


> DeviceType: 4<br>
> Platform Info: Experiment Intel Gen OCL Driver profile: FULL_PROFILE<br>
> Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd Vendor: Intel Version: OpenCL 1.2 beignet 0.3<br>


> #2 status: -11<br>
><br>
> BUILD LOG: convertC3C4:  -D INTEL_DEVICE -D GENTYPE4=uchar4<br>
><br>
>   status: -11<br>
> OpenCV Error: Gpu API call (CL_BUILD_PROGRAM_FAILURE) in getOrBuildProgram, file /home/evil85/workspace/cpp/opencv-2.4.7/modules/ocl/src/cl_programcache.cpp, line 460<br>
> terminate called after throwing an instance of 'cv::Exception'<br>
>   what():  /home/evil85/workspace/cpp/opencv-2.4.7/modules/ocl/src/cl_programcache.cpp:460: error: (-217) CL_BUILD_PROGRAM_FAILURE in function getOrBuildProgram<br>
><br>
> Aborted (core dumped)<br>
<div><div><br>
> _______________________________________________<br>
> Beignet mailing list<br>
> <a href="mailto:Beignet@lists.freedesktop.org" target="_blank">Beignet@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/beignet" target="_blank">http://lists.freedesktop.org/mailman/listinfo/beignet</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Best Regards,<br><br>Robert 
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert 
</div>