[[!toc levels=3]] # Current Status [[!table header="no" class="ColorTable" data=""" | **cpu (llvmpipe)** | **nv50** | **nvc0** | **r700** | **Evergreen/NI** | **Cayman** | **Southern/Sea Islands** gallium hw interface | N/A | [[!color background=yellow text=MOSTLY ]] | [[!color background=yellow text=MOSTLY ]] | [[!color background=red text=TODO ]] | [[!color background=yellow text=MOSTLY ]] | [[!color background=yellow text=MOSTLY ]] | [[!color background=yellow text=MOSTLY ]] | handling GPU buffers | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | execute TGSI compute shader | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | N/A | N/A | N/A | execute LLVM-IR compute shader | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | performance profiling | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | global address space | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | local address space | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | private address space | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]]| [[!color background=palegreen text=DONE ]] | constant adress space | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE]] | local sync | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]] | global sync | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] | N/A | [[!color background=orange text=WIP ]] | [[!color background=orange text=WIP ]] | [[!color background=palegreen text=DONE ]] | local atomics | [[!color background=red text=TODO ]] | [[!color background=red text=TODO ]] |[[!color background=red text=TODO ]]| N/A | [[!color background=palegreen text=DONE ]]| [[!color background=palegreen text=DONE ]] | [[!color background=palegreen text=DONE ]]| global atomics | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| N/A | [[!color background=orange text=WIP ]]| [[!color background=orange text=WIP ]]| [[!color background=palegreen text=DONE ]]| 2D image read | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| 3D image read | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| N/A | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| 2D image write | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| 3D image write | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]] | N/A | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| accurate4 arithmetics | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]] | [[!color background=yellow text=MOSTLY7 ]] | [[!color background=yellow text=MOSTLY7 ]] | [[!color background=palegreen text=DONE ]] | OpenCL5 1.0 | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| N/A6 | [[!color background=orange text=WIP ]] | [[!color background=orange text=WIP ]] | [[!color background=yellow text=MOSTLY ]] | OpenCL 1.1 | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| N/A | [[!color background=orange text=WIP ]] | [[!color background=orange text=WIP ]] | [[!color background=yellow text=MOSTLY ]] | OpenCL 1.2 | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| N/A | [[!color background=orange text=WIP ]] | [[!color background=orange text=WIP ]] | [[!color background=orange text=WIP ]] | OpenGL interoperability | [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| [[!color background=red text=TODO ]]| """]] 4 OpenCL defines some level expected accuracy. Some hardware doesn't support it, so we need software emulation 5 OpenCL front-end is a separate project, we aim to support all features needed by the front-end to implement the standard 6 Only partial OpenCL support is possible, support through vertex shaders. 7 Mostly reliable for float and integer types. char, short, long, and double types need more testing. # Hardware ## AMD / Radeon ### Supported GPUs * Evergreen through Sea Islands GPU familes are currently supported. If you are unsure what family your GPU is, you can use this chart: [[http://www.x.o/wiki/RadeonFeature#Decoder_ring_for_engineering_vs_marketing_names|http://www.x.org/wiki/RadeonFeature#Decoder_ring_for_engineering_vs_marketing_names]] to figure it out. ### Supported Linux Kernel Versions * r600g compute is known to work with stable Linux Kernel versions >= 3.1. Versions older than 3.1 may work, but have not been tested. ### How to Install #### Getting the source code * Current Development version: * LLVM / Clang: git clone http://llvm.org/git/llvm.git cd llvm/tools git clone http://llvm.org/git/clang.git * libclc: git clone http://llvm.org/git/libclc.git * Mesa: git clone git://anongit.freedesktop.org/mesa/mesa * Stable Version (NOTE: Gallium Compute is still under heavy development, so the development version is recommended for best results): * LLVM / Clang: wget http://www.llvm.org/releases/3.6.1/llvm-3.6.1.src.tar.xz tar -xJf llvm-3.6.1.src.tar.xz cd llvm-3.6.1.src/tools wget http://www.llvm.org/releases/3.6.1/cfe-3.6.1.src.tar.xz tar -xJf cfe-3.6.1.src.tar.xz mv cfe-3.6.1.src clang * libclc: git clone http://llvm.org/git/libclc.git * Mesa: wget ftp://ftp.freedesktop.org/pub/mesa/10.5.8/mesa-10.5.8.tar.gz tar -xzf mesa-10.5.8.tar.gz #### Building 1. LLVM / Clang: cd llvm/ mkdir build cd build/ ../configure --enable-targets=x86,amdgpu --enable-shared make -j3 && make install * For building versions of LLVM prior to 3.7, replace amdgpu with r600 when configuring. * LLVM builds all supported targets by default, so adding --enable-targets=x86 will speed up the build time. NOTE: Mesa requires the X86 target to be built. * LLVM will try to use clang as its compiler by default. This may not work for you in all cases (e.g. you have an old version of clang installed). You can force llvm to use gcc by appending `CC=gcc CXX=g++` to the configure arguments. 1. libclc: cd libclc/ ./configure.py make make install * libclc's pkgconfig file is installed to ${prefix}/share/pkgconfig, so you will need to make sure this path is added to your PKG_CONFIG_PATH environment variable before you configure Mesa. Also, if you have installed old versions of libclc on your system it is recommended that you remove the old libclc.pc file which is located at ${prefix}/lib/pkgconfig. The default ${prefix} for libclc is /usr/local. 1. Mesa: cd mesa/ ./autogen.sh --with-dri-drivers="" --with-gallium-drivers=r600,radeonsi --enable-opencl make -j3 make install ### Testing * OpenCL examples that mostly work with clover and r600g can be found [[here|http://cgit.freedesktop.org/~tstellar/opencl-example/]]. * [[Piglit|http://cgit.freedesktop.org/piglit]]: * Use the quick_cl.py profile for normal testing. * You can run the [[OpenCV|http://opencv.org]] OpenCL test suite from piglit by adding the path to the opencv_test_ocl test executable to your piglit.conf. Details are in the piglit.conf.example file in the piglit tree. ### Troubleshooting * If see this error message: radeon: Failed to get PCI ID, error number -13, make sure you have permissions to access the device (usually /dev/dri/card0), and get the latest version of mesa from git. Prior to this commit: 044de40cb0c6af54d99252f55145972780362afa, you would have seen this error message when running compute programs and X at the same time. * If you get the error message "cannot find stddef.h" when you try to run a compute program, this means that clang can't find its builtin include files. The solution for this is to make sure that clang and llvm are both installed to the same $(LIBDIR). Clover expects the clang builtin includes to be in $(LLVM_LIBDIR)/clang/$(LLVM_VERSION)/ ### Working Applications NOTE: This is not a complete list * [[bfgminer|http://bfgminer.org/]] v3.1.1 and newer (Mesa >= 9.2, LLVM >= 3.3) If you run bfgminer at high intensities (-I option) you may experience hangs in your desktop system. It is recommended that you run bfgminer without an X server. Not all configurations and kernels work. The recommended options are: ./bfgminer -o mining.eligius.st:3334 -O addr:pass --gpu-threads=1 -I10 -v4 -k phatk * [[pyrit|https://code.google.com/p/pyrit/]] (Mesa >= 10.1, LLVM >= 3.5) ### Todo [[R600ToDo#Compute|R600ToDo]]