Hi Xiuli
Thanks for the patches. I managed to compile the OCL20 branch and use the
shared virtual memory features. I have looked a bit into the generated Gen
assembly, which is closer to what I need compared to release 1.2, so I am very
happy.
I was not able to compile Beignet itself with the patched LLVM/Clang compiler.
Instead I compiled it using GCC but used headers from the patched compiler to
build Beignet, and then use the patched compiler to compile OpenCL 2.0 programs.
Is this expected? This is the output from compiling with the Clang:
cd /home/s113443/gpgpu/git/ocl20/build/backend/src &&
/home/s113443/gpgpu/llvm38/bin/bin/clang++-3.8
-DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND -DLLVM_38 -Dgbe_EXPORTS
-I/home/s113443/gpgpu/git/ocl20/build -I/home/s113443/gpgpu/git/ocl20
-I/usr/include/libdrm -I/home/s113443/gpgpu/git/ocl20/build/backend
-I/home/s113443/gpgpu/git/ocl20/backend/src/. -funroll-loops -fstrict-aliasing
-msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall -std=c++0x -Wno-invalid-offsetof
-fno-rtti -I/home/s113443/gpgpu/llvm38/bin/include -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-DGBE_DEBUG_MEMORY=0 -DGBE_COMPILER_AVAILABLE=1 -fvisibility=hidden -O0 -g
-DGBE_DEBUG=1 -fPIC -o CMakeFiles/gbe.dir/llvm/llvm_gen_backend.cpp.o -c
/home/s113443/gpgpu/git/ocl20/backend/src/llvm/llvm_gen_backend.cpp
/home/s113443/gpgpu/git/ocl20/backend/src/llvm/llvm_gen_backend.cpp:4067:23:
error: variable length array of non-POD element type 'ir::Register'
ir::Register src[argNum];
^
Thanks,
Jesper
> -----Original Message-----
> From: Pan, Xiuli [mailto:[email protected]]
> Sent: 26. oktober 2016 05:31
> To: Jesper Puge (s113443) <[email protected]>;
> [email protected]
> Subject: RE: [Beignet] Problems compiling the OCL20 branch
>
> Hi Jesper,
>
> The OCL20 branch can only build with LLVM3.8+ for some OpenCL 2.0
> features need frontend support, and for LLVM3.8 we need some patch for
> clang. And for LLVM3.9 there are some change we have not merged into
> OCL20 branch. So if you would try the OCL20 branch, I suggest you build
> a llvm 3.8 and I will provide the patch set for clang in another mail.
>
> Thanks
> Xiuli
>
> -----Original Message-----
> From: Beignet [mailto:[email protected]] On Behalf
> Of Jesper Puge (s113443)
> Sent: Wednesday, October 26, 2016 5:14 AM
> To: [email protected]
> Subject: [Beignet] Problems compiling the OCL20 branch
>
> Hi,
> I am trying to compile the head of the OCL20 branch to test shared
> virtual memory, but it will not compile.
> I have previously compiled the 1.2 release using LLVM 3.6, but I can see
> API changes in the code that suggest a newer version of LLVM is
> required.
> What version of LLVM is known to work with the branch? Do I need to
> supply any special parameters to CMake to make the build work?
>
> I run cmake with the following command:
> CC=clang-3.6 CXX=clang++-3.6 cmake -
> DCMAKE_VERBOSE_MAKEFILE=true -DCMAKE_BUILD_TYPE=Debug -
> DLLVM_INSTALL_DIR=/usr/bin
> -DCMAKE_C_COMPILER=clang-3.6 -DCOMPILER=LLVM --
> DCMAKE_INSTALL_PREFIX:PATH=/path/to/project/bin ../
>
> The first error I encounter is that it does not know atomic_int:
> cd /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl &&
> /usr/bin/clang-3.6 -cc1 -fno-builtin -ffp-contract=off -cl-kernel-arg-
> info -fblocks -triple spir64 -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND -cl-
> std=CL2.0 -I
> /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/be
> igne
> t//include/ -emit-llvm-bc -o
> /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/be
> igne
> t//ocl_atom.bc -x cl
> /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl/src/ocl_atom.cl
> In file included from
> /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl/src/ocl_atom.cl:1
> 8:
>
> /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/be
> igne
> t//include/ocl_atom.h:116:22: error: unknown type name 'atomic_int'
> ATOMIC_GEN_FUNCTIONS(atomic_int, int, 32)
> ^
> I have tried to include stdatomic.h that defines atomic_int, but this
> let to other errors.
>
> Any help on this would be much appreciated.
>
> Best regards,
> Jesper
>
> _______________________________________________
> Beignet mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet