<div dir="ltr">opencl-1.2 branch HEAD is compiled fine, but when I ran utest I saw this warning :<br><br><div>libEGL warning: failed to create a pipe screen for i965</div><div><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">2014/1/9 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">
This is a pure llvm related issue. The error messages you gave should be simply from the<br>
following command:<br>
<br>
llvm-as -o ocl_barrier.ll.bc ocl_barrier.ll.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jan 09, 2014 at 10:21:45AM +0100, Robert Jobbagy wrote:<br>
> and you use this mesa version 92e6260c1960f78692417433206c38170ec1a625 for<br>
> compile ?<br>
><br>
><br>
> 2014/1/9 Yang, Rong R <<a href="mailto:rong.r.yang@intel.com">rong.r.yang@intel.com</a>><br>
><br>
> > I have tried the ubutun 13.10's released llvm & clang 3.3 package, don't<br>
> > have this error. The llvm-as --version is:<br>
> > LLVM (<a href="http://llvm.org/" target="_blank">http://llvm.org/</a>):<br>
> >   LLVM version 3.3<br>
> ><br>
> >   Optimized build.<br>
> >   Built Aug 29 2013 (08:00:45).<br>
> >   Default target: i386-pc-linux-gnu<br>
> >   Host CPU: core-avx-i<br>
> ><br>
> ><br>
> > -----Original Message-----<br>
> > From: <a href="mailto:beignet-bounces@lists.freedesktop.org">beignet-bounces@lists.freedesktop.org</a> [mailto:<br>
> > <a href="mailto:beignet-bounces@lists.freedesktop.org">beignet-bounces@lists.freedesktop.org</a>] On Behalf Of Zhigang Gong<br>
> > Sent: Thursday, January 09, 2014 1:43 PM<br>
> > To: Robert Jobbagy<br>
> > Cc: <a href="mailto:beignet@lists.freedesktop.org">beignet@lists.freedesktop.org</a><br>
> > Subject: Re: [Beignet] opencl-1.2 branch head compile error and warnings<br>
> ><br>
> > On Thu, Jan 09, 2014 at 06:56:13AM +0100, Robert Jobbagy wrote:<br>
> > > ~/workspace/cpp/beignet_opencl_1_2/build$ llvm-as --version LLVM<br>
> > > (<a href="http://llvm.org/" target="_blank">http://llvm.org/</a>):<br>
> > >   LLVM version 3.3<br>
> > ><br>
> > >   Optimized build.<br>
> > >   Built Aug 29 2013 (07:58:28).<br>
> > >   Default target: x86_64-pc-linux-gnu<br>
> > >   Host CPU: core-avx-i<br>
> > The version seems ok. I will try to find the same llvm version as yours to<br>
> > see is there anything wrong.<br>
> ><br>
> > ><br>
> > ><br>
> > > previous warnings still exists and without your patch compiles failed<br>
> > > with this :<br>
> > ><br>
> > > In file included from beignet_opencl_1_2/src/cl_khr_icd.c:18:0:<br>
> > > /usr/include/ocl_icd.h:744:5: error: unknown type name<br>
> > > ‘cl_device_partition_property’<br>
> > >      const cl_device_partition_property * /* properties */,<br>
> > >      ^<br>
> > > /usr/include/ocl_icd.h:748:5: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or<br>
> > > ‘__attribute__’ before ‘CL_API_SUFFIX__VERSION_1_2’<br>
> > >    ) CL_API_SUFFIX__VERSION_1_2;<br>
> > >      ^<br>
> > > make[2]: *** [src/CMakeFiles/cl.dir/cl_khr_icd.c.o] Error 1<br>
> > > make[2]: *** Waiting for unfinished jobs....<br>
> > > make[1]: *** [src/CMakeFiles/cl.dir/all] Error 2<br>
> > > make: *** [all] Error 2<br>
> > Could you show the top two commit on your working directory? Just copy<br>
> > paste the output of git log.<br>
> ><br>
> > BTW, did you make a clean build?<br>
> > #git clean -x -f -d<br>
> > #mkdir build<br>
> > #cd build<br>
> > #cmake ..<br>
> > #make<br>
> ><br>
> > ><br>
> > ><br>
> > ><br>
> > > 2014/1/9 Zhigang Gong <<a href="mailto:zhigang.gong@linux.intel.com">zhigang.gong@linux.intel.com</a>><br>
> > ><br>
> > > > On Wed, Jan 08, 2014 at 08:39:28PM +0100, Robert Jobbagy wrote:<br>
> > > > > Thanks your help.<br>
> > > > ><br>
> > > > > First of all I use this llvm version :<br>
> > > > > <a href="https://launchpad.net/ubuntu/saucy/+source/llvm-toolchain-3.3" target="_blank">https://launchpad.net/ubuntu/saucy/+source/llvm-toolchain-3.3</a><br>
> > > > ><br>
> > > > > I update to HEAD and I gave two errors :<br>
> > > > ><br>
> > > > > first :<br>
> > > > ><br>
> > > > > [  0%] Generating ocl_barrier.ll.bc<br>
> > > > > llvm-as:<br>
> > > > ><br>
> > > ><br>
> > /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/ocl_barrier.ll:13:43:<br>
> > > > > error: expected '{' in function body define void @barrier(i32<br>
> > > > > %flags) nounwind noduplicate alwaysinline {<br>
> > > ><br>
> > > > "noduplicate" can't be removed here. It's weird that llvm-as 3.3<br>
> > > > should support noduplicate attribute. Could you double check the<br>
> > > > llvm-as version by execute:<br>
> > > > llvm-as --version<br>
> > > > manually?<br>
> > > ><br>
> > > > >                                           ^<br>
> > > > > make[2]: *** [backend/src/ocl_barrier.ll.bc] Error 1<br>
> > > > > make[1]: *** [backend/src/CMakeFiles/beignet.bc.dir/all] Error 2<br>
> > > > ><br>
> > > > ><br>
> > > > > This modification is fixed it :<br>
> > > > ><br>
> > > > > --- a/backend/src/ocl_barrier.ll<br>
> > > > > +++ b/backend/src/ocl_barrier.ll<br>
> > > > > @@ -10,7 +10,7 @@ declare void @__gen_ocl_barrier_local() nounwind<br>
> > > > > alwaysinline  declare void @__gen_ocl_barrier_global() nounwind<br>
> > > > > alwaysinline  declare void @__gen_ocl_barrier_local_and_global()<br>
> > > > > nounwind alwaysinline<br>
> > > > ><br>
> > > > > -define void @barrier(i32 %flags) nounwind noduplicate<br>
> > > > > alwaysinline {<br>
> > > > > +define void @barrier(i32 %flags) nounwind alwaysinline {<br>
> > > > >    %1 = icmp eq i32 %flags, 3<br>
> > > > >    br i1 %1, label %barrier_local_global, label<br>
> > > > > %barrier_local_check<br>
> > > > ><br>
> > > > ><br>
> > > > > second :<br>
> > > > ><br>
> > > > > In file included from<br>
> > > > > /home/evil85/workspace/cpp/beignet_opencl_1_2/src/cl_khr_icd.c:18:0:<br>
> > > > > /usr/include/ocl_icd.h:744:5: error: unknown type name<br>
> > > > > ‘cl_device_partition_property’<br>
> > > > >      const cl_device_partition_property * /* properties */,<br>
> > > > >      ^<br>
> > > > > /usr/include/ocl_icd.h:748:5: error: expected ‘:’, ‘,’, ‘;’, ‘}’<br>
> > > > > or ‘__attribute__’ before ‘CL_API_SUFFIX__VERSION_1_2’<br>
> > > > >    ) CL_API_SUFFIX__VERSION_1_2;<br>
> > > > >      ^<br>
> > > > > make[2]: *** [src/CMakeFiles/cl.dir/cl_khr_icd.c.o] Error 1<br>
> > > > > make[1]: *** [src/CMakeFiles/cl.dir/all] Error 2<br>
> > > > > make: *** [all] Error 2<br>
> > > > ><br>
> > > > ><br>
> > > > > Solution:<br>
> > > > ><br>
> > > > > I applied your CL: back port ICD support to 1.1. branch patch on<br>
> > > > > my 1.2 branch and everything compiled fine :)<br>
> > > > This sympton means it is on the master branch rather the opencl-1.2<br>
> > branch.<br>
> > > ><br>
> > > > If it is opencl-1.2 branch, then it uses those opencl 1.2 header<br>
> > > > files which should not have this compilation problem. This<br>
> > > > compilation problem will only be triggerred with opencl 1.1 header<br>
> > > > file included. And my patch is to fix that with 1.1 header files.<br>
> > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > 2014/1/8 Zhigang Gong <<a href="mailto:zhigang.gong@linux.intel.com">zhigang.gong@linux.intel.com</a>><br>
> > > > ><br>
> > > > > > I'm using 3.3.1 which works fine on the 1.2 branch. From the<br>
> > > > > > warning messages you gave below, I doubt there maybe some<br>
> > > > > > conflict llvm/clang version problem on your system. You can see<br>
> > > > > > the first warning is totally triggerred by<br>
> > > > the<br>
> > > > > > llvm<br>
> > > > > > and clang's header files. If you have a clean 3.3 clang/llvm<br>
> > > > installation<br>
> > > > > > in your<br>
> > > > > > system, that should not happen.<br>
> > > > > ><br>
> > > > > > Another issue is that now we only support llvm/clang 3.3 but the<br>
> > > > > > cmake will find some earlier version of llvm. Simon already<br>
> > > > > > submitted a patch to fix<br>
> > > > that.<br>
> > > > > > I just<br>
> > > > > > modified it slightly and push it to both master branch and<br>
> > > > > > opencl-1.2 branch.<br>
> > > > > ><br>
> > > > > > My suggestion for you is to update to the latest opencl-1.2<br>
> > > > > > branch. And make sure you have a clean llvm/clang 3.3<br>
> > > > > > installation and try it again.<br>
> > > > > ><br>
> > > > > > Thanks for reporting this to us and good luck.<br>
> > > > > ><br>
> > > > > > On Tue, Jan 07, 2014 at 06:27:55PM +0100, Robert Jobbagy wrote:<br>
> > > > > > > Hi,<br>
> > > > > > ><br>
> > > > > > > After the update I gave this error :<br>
> > > > > > ><br>
> > > > > > > /beignet_opencl_1_2/backend/src/ocl_barrier.ll:9:50: error:<br>
> > > > > > > expected top-level entity declare void<br>
> > > > > > > @__gen_ocl_barrier_local() nounwind noduplicate<br>
> > > > alwaysinline<br>
> > > > > > >                                                  ^<br>
> > > > > > > make[2]: *** [backend/src/ocl_barrier.ll.bc] Error 1<br>
> > > > > > > make[1]: *** [backend/src/CMakeFiles/beignet.bc.dir/all] Error<br>
> > > > > > > 2<br>
> > > > > > > make[1]: *** Waiting for unfinished jobs....<br>
> > > > > > ><br>
> > > > > > > I used llvm 3.3-5ubuntu4<br>
> > > > > > ><br>
> > > > > > > workaround:<br>
> > > > > > > I removed all noduplicate marker from declares and defines<br>
> > > > > > ><br>
> > > > > > > I saw these warnings too:<br>
> > > > > > ><br>
> > > > > > > In file included from<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:19:0,<br>
> > > > > > >                  from<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/Basic/ObjCRuntime.h:18,<br>
> > > > > > >                  from<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/Basic/LangOptions.h:20,<br>
> > > > > > >                  from<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/Frontend/FrontendAction.h:22,<br>
> > > > > > >                  from<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/CodeGen/CodeGenAction.h:13,<br>
> > > > > > >                  from<br>
> > > > > > ><br>
> > > > > ><br>
> > > ><br>
> > /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/backend/program.cpp:56:<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In<br>
> > > > > > > instantiation of<br>
> > > > ‘T*<br>
> > > > > > > llvm::Optional<T>::getPointer() [with T = unsigned int]’:<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76:   required<br>
> > > > from ‘T&<br>
> > > > > > > llvm::Optional<T>::operator*() [with T = unsigned int]’<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:51:7:   required<br>
> > from<br>
> > > > > > > ‘llvm::Optional<T>::Optional(llvm::Optional<T>&&) [with T =<br>
> > > > > > > unsigned<br>
> > > > > > int]’<br>
> > > > > > > /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:60:14:<br>
> > > > required<br>
> > > > > > from<br>
> > > > > > > here<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning:<br>
> > > > > > > dereferencing type-punned pointer will break strict-aliasing<br>
> > > > > > > rules [-Wstrict-aliasing]<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In<br>
> > > > > > > instantiation of<br>
> > > > ‘T*<br>
> > > > > > > llvm::Optional<T>::getPointer() [with T = bool]’:<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76:   required<br>
> > > > from ‘T&<br>
> > > > > > > llvm::Optional<T>::operator*() [with T = bool]’<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:104:7:   required<br>
> > from<br>
> > > > > > ‘void<br>
> > > > > > > llvm::Optional<T>::reset() [with T = bool]’<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:110:5:   required<br>
> > from<br>
> > > > > > > ‘llvm::Optional<T>::~Optional() [with T = bool]’<br>
> > > > > > ><br>
> > > > > ><br>
> > > ><br>
> > /usr/lib/llvm-3.3/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:397:27:<br>
> > > > > > >   required from here<br>
> > > > > > > /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning:<br>
> > > > > > > dereferencing type-punned pointer will break strict-aliasing<br>
> > > > > > > rules [-Wstrict-aliasing]<br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > ><br>
> > > ><br>
> > /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/backend/program.cpp:652:<br>
> > > > > > > warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'<br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > > > I made something wrong ? Previous version (2013-12-05) compiled<br>
> > fine.<br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > > > --<br>
> > > > > > > Best Regards,<br>
> > > > > > ><br>
> > > > > > > Robert<br>
> > > > > ><br>
> > > > > > > _______________________________________________<br>
> > > > > > > Beignet mailing list<br>
> > > > > > > <a href="mailto:Beignet@lists.freedesktop.org">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>
> > > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > --<br>
> > > > > Best Regards,<br>
> > > > ><br>
> > > > > Robert<br>
> > > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Best Regards,<br>
> > ><br>
> > > Robert<br>
> ><br>
> > > _______________________________________________<br>
> > > Beignet mailing list<br>
> > > <a href="mailto:Beignet@lists.freedesktop.org">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>
> > _______________________________________________<br>
> > Beignet mailing list<br>
> > <a href="mailto:Beignet@lists.freedesktop.org">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>
> > Beignet mailing list<br>
> > <a href="mailto:Beignet@lists.freedesktop.org">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>
><br>
><br>
><br>
> --<br>
> Best Regards,<br>
><br>
> Robert<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert 
</div>