![]() |
![]() |
#1 |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
266168 Posts |
![]()
I've never writted anything in OpenCL and would appreciate some help from the good folk here. For information: I'm running Ubuntu 19.10 and would prefer to use the C API, though C++ would do at a pinch. The hardware has 6 cores and an Nvidia GTX1060. After wasting many hours trying to get the Nvidia drivers and CUDA working i gave up and reverted to the free nouveau free device driver. I've run apt-get for most everything I can find which refers to OpenCL.
There are two major issues. The show stopper is that clinfo reports "Number of platforms 0". I would have thought that it would have found the cpus at the very least. The other is that I have yet to find a good tutorial for the language which goes beyond presenting the source code of (effectively) "Hello world." I have downloaded the C API spec. Can anyone help? Thanks, Paul Last fiddled with by xilman on 2019-11-13 at 12:17 |
![]() |
![]() |
![]() |
#2 |
"Mihai Preda"
Apr 2015
5·172 Posts |
![]()
Indeed, you want to get clinfo to report more that 0 platforms/devices.
You need an OpenCL implementation even for the CPUs. I seem to remember that Intel offers one for download (for Intel CPUs) but I don't have a link. OTOH I don't expect OpenCL on CPUs to be actually useful other than for trying out/debugging. For an Nvidia GPU, it is my impression that the CUDA *toolkit* brings the OpenCL driver. (I don't have experience with Nouveau) For an AMD GPU, one may use either ROCm, or amdgpu-pro, which both have different OpenCL compilers. So the first step is to get clinfo to recognize something. Afterwards when starting programming, you may have a look at clwrap.h in gpuowl source code for some utils like compiling a kernel etc. |
![]() |
![]() |
![]() |
#3 |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
2·73·17 Posts |
![]()
I think I found the problem. It looks like "apt install mesa-opencl-icd" wasn't successful. Trying it just now indicates that the system gcc is too new for that package --- 9.2.1-9ubuntu2 is installed but 9.1.0-2ubuntu2~19.04 is required.
Ho hum. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
GPUOWL AMD Windows OpenCL issues | xx005fs | GpuOwl | 0 | 2019-07-26 21:37 |
LL with OpenCL | msft | GPU Computing | 433 | 2019-06-23 21:11 |
OpenCL ROCm 2.0 vs. AMDGPU-PRO Linux | SELROC | GPU Computing | 1 | 2019-01-20 07:10 |
Can't get OpenCL to work on HD7950 Ubuntu 14.04.5 LTS | VictordeHolland | Linux | 4 | 2018-04-11 13:44 |
OpenCL for FPGAs | TObject | GPU Computing | 2 | 2013-10-12 21:09 |