<div dir="ltr">Thanks your help.<div><br></div><div>First of all I use this llvm version : <a href="https://launchpad.net/ubuntu/saucy/+source/llvm-toolchain-3.3">https://launchpad.net/ubuntu/saucy/+source/llvm-toolchain-3.3</a></div>
<div><br></div><div>I update to HEAD and I gave two errors :</div><div><br></div><div>first : <br><br><div>[ 0%] Generating ocl_barrier.ll.bc</div><div>llvm-as: /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/ocl_barrier.ll:13:43: error: expected '{' in function body</div>
<div>define void @barrier(i32 %flags) nounwind noduplicate alwaysinline {</div><div> ^</div><div>make[2]: *** [backend/src/ocl_barrier.ll.bc] Error 1</div><div>make[1]: *** [backend/src/CMakeFiles/beignet.bc.dir/all] Error 2</div>
</div><div><br></div><div><br></div><div>This modification is fixed it : <br><br><div>--- a/backend/src/ocl_barrier.ll</div><div>+++ b/backend/src/ocl_barrier.ll</div><div>@@ -10,7 +10,7 @@ declare void @__gen_ocl_barrier_local() nounwind alwaysinline</div>
<div> declare void @__gen_ocl_barrier_global() nounwind alwaysinline</div><div> declare void @__gen_ocl_barrier_local_and_global() nounwind alwaysinline</div><div> </div><div>-define void @barrier(i32 %flags) nounwind noduplicate alwaysinline {</div>
<div>+define void @barrier(i32 %flags) nounwind alwaysinline {</div><div> %1 = icmp eq i32 %flags, 3</div><div> br i1 %1, label %barrier_local_global, label %barrier_local_check</div><div><br></div><div><br></div><div>
second :<br><br><div>In file included from /home/evil85/workspace/cpp/beignet_opencl_1_2/src/cl_khr_icd.c:18:0:</div><div>/usr/include/ocl_icd.h:744:5: error: unknown type name ‘cl_device_partition_property’</div><div> const cl_device_partition_property * /* properties */,</div>
<div> ^</div><div>/usr/include/ocl_icd.h:748:5: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘CL_API_SUFFIX__VERSION_1_2’</div><div> ) CL_API_SUFFIX__VERSION_1_2;</div><div> ^</div><div>make[2]: *** [src/CMakeFiles/cl.dir/cl_khr_icd.c.o] Error 1</div>
<div>make[1]: *** [src/CMakeFiles/cl.dir/all] Error 2</div><div>make: *** [all] Error 2</div></div><div><br></div><br></div><div>Solution:<br><br>I applied your CL: back port ICD support to 1.1. branch patch on my 1.2 branch and everything compiled fine :)</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/8 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'm using 3.3.1 which works fine on the 1.2 branch. From the warning messages<br>
you gave below, I doubt there maybe some conflict llvm/clang version problem<br>
on your system. You can see the first warning is totally triggerred by the llvm<br>
and clang's header files. If you have a clean 3.3 clang/llvm installation in your<br>
system, that should not happen.<br>
<br>
Another issue is that now we only support llvm/clang 3.3 but the cmake will find<br>
some earlier version of llvm. Simon already submitted a patch to fix that. I just<br>
modified it slightly and push it to both master branch and opencl-1.2 branch.<br>
<br>
My suggestion for you is to update to the latest opencl-1.2 branch. And make<br>
sure you have a clean llvm/clang 3.3 installation and try it again.<br>
<br>
Thanks for reporting this to us and good luck.<br>
<div><div class="h5"><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: expected<br>
> top-level entity<br>
> declare void @__gen_ocl_barrier_local() nounwind noduplicate alwaysinline<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>
> 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>
> /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 instantiation of ‘T*<br>
> llvm::Optional<T>::getPointer() [with T = unsigned int]’:<br>
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required 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 from<br>
> ‘llvm::Optional<T>::Optional(llvm::Optional<T>&&) [with T = unsigned int]’<br>
> /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:60:14: required 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 rules<br>
> [-Wstrict-aliasing]<br>
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In instantiation of ‘T*<br>
> llvm::Optional<T>::getPointer() [with T = bool]’:<br>
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required from ‘T&<br>
> llvm::Optional<T>::operator*() [with T = bool]’<br>
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:104:7: required from ‘void<br>
> llvm::Optional<T>::reset() [with T = bool]’<br>
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:110:5: required from<br>
> ‘llvm::Optional<T>::~Optional() [with T = bool]’<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 rules<br>
> [-Wstrict-aliasing]<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 fine.<br>
><br>
><br>
><br>
><br>
> --<br>
> Best Regards,<br>
><br>
> Robert<br>
<br>
</div></div>> _______________________________________________<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert
</div>