赞
踩
http://portablecl.org/docs/html/install.html#clang-llvm-notes
https://github.com/pocl/pocl/blob/master/doc/sphinx/source/install.rst
NEO in Linux
NEO is available for installation on Ubuntu* 20.04:
sudo apt install intel-opencl-icd #Install NEO OpenCL runtime for Intel GPU
sudo apt install opencl-headers #Install OpenCL API Headers
sudo apt install ocl-icd-opencl-dev #To generate libOpenCL.so
sudo apt install clinfo
sudo apt install cmake cmake-gui git llvm-10 llvm-10-dev llvm-10-examples llvm-10-runtime llvm-10-tools lldb-10 liblldb-10-dev liblldb-10 libclang1-10 libclang-cpp10-dev libclang-cpp10 libclang-common-10-dev libclang-10-dev clangd-10 clang-tools-10 clang-format-10 clang-10-doc clang-10-examples
sudo apt install clang-10 libclang-10-dev libllvm-10-ocaml-dev libclang-cpp10 libclang-cpp10-dev
sudo apt install -y libclang-cpp10-dev libclang-cpp10 llvm-10-dev
sudo apt install -y build-essential ocl-icd-libopencl1 pkg-config ninja-build ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev libhwloc-dev zlib1g zlib1g-dev clinfo dialog apt-utils libxml2-dev

POCL 1.7 Website
http://portablecl.org/docs/html/install.html#clang-llvm-notes
https://github.com/pocl/pocl/blob/master/doc/sphinx/source/install.rst
Setup
Install LLVM-10 and Clang-10
sudo apt install cmake cmake-gui git llvm-10 llvm-10-dev llvm-10-examples llvm-10-runtime llvm-10-tools lldb-10 liblldb-10-dev liblldb-10 libclang1-10 libclang-cpp10-dev libclang-cpp10 libclang-common-10-dev libclang-10-dev clangd-10 clang-tools-10 clang-format-10 clang-10-doc clang-10-examples
sudo apt install clang-10 libclang-10-dev libllvm-10-ocaml-dev libclang-cpp10 libclang-cpp10-dev
sudo apt install -y libclang-cpp10-dev libclang-cpp10 llvm-10-dev
sudo apt install -y build-essential ocl-icd-libopencl1 pkg-config ninja-build ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev libhwloc-dev zlib1g zlib1g-dev clinfo dialog apt-utils libxml2-dev
*.icd
文件复制到/etc/OpenCL/vendors
目录下,即可执行下列步骤# To the issue "Number of platforms 0", you should do the following configuration # Manual configuration: Create a file /etc/OpenCL/vendors/VC4CL.icd with a single line containing the absolute path to the VC4CL library (/usr/local/lib/libVC4CL.so). 执行vi .bashrc,弹出profile文本文件,在最后加入下面的代码 export LD_PRELOAD=/usr/local/lib/libVC4CL.so export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH source .bashrc clinfo - OpenCL reported version different between `Device Version` and `Device OpenCL C Version` NVIDIA has recently announced OpenCL 3.0 support for their graphics cards. I have installed clinfo tool that displays all information regarding OpenCL platforms and devices. When I run it, it dislpays: ```bash Number of devices 1 Device Name NVIDIA GeForce GTX 1080 Ti Device Vendor ID 0x10de Device Version OpenCL 3.0 CUDA Driver Version 470.57.02 Device OpenCL C Version OpenCL C 1.2
What is the difference between Device version & Device OpenCL C version? Will I be able to run OpenCL 3.0 code on my card or it just still support OpenCL 1.2 specs?
A: According to the clGetDeviceInfo specification:
CL_DEVICE_OPENCL_C_VERSION
is the highest OpenCL C language version that the compiler supports for this device.
CL_DEVICE_VERSION
is the OpenCL version supported by the device.
So even though your 1080 Ti supports OpenCL 3.0, you can only compile OpenCL 1.2 code. Note that OpenCL 3.0 basically is identical to OpenCL 1.2 but with better support for optional OpenCL 2.x features. With the lates driver Nvidia has added a few new OpenCL 2.x features, but still has no full 2.x support.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。