OpenCL doesn't display Nvidia GPU

opencl install
clinfo number of platforms 0 amd
opencl capable gpu
check opencl version ubuntu
opencl linux
install opencl ubuntu
cannot find an opencl icd loader library
opencl on cpu

Hopefully this isn't a duplicate, I did have a look around but correct me if I'm wrong.

I recently installed pyopencl via Anaconda and it runs on my Intel CPU without a problem. However, when I call:

for platform in get_platforms():

ctx = create_some_context()

for dev in ctx.devices:

All I get back is:

Portable Computing Language
Choose platform:
[0] <pyopencl.Platform 'Portable Computing Language' at 0x7f0ff2205020>
>> 0
Choice [0]:0
Set the environment variable PYOPENCL_CTX='0' to avoid being asked again.
pthread-Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz

I have the Nvidia GeForce GTX 1050 Ti, and the driver version is 390.87 with CUDA 9.1, which should be compatible according to the Nvidia release notes. I'm also running Linux Mint 19.1 (if that's relevant), and am also a bit of a noob when it comes to this stuff as my background is in Physics, not computer science.

I read somewhere (I can't remember where) that I should have an nvidia.icd file but all that's present is a pocl.icd file in /home//anaconda3/etc/OpenCL/vendors and I'm not sure how/where to get an nvidia.icd file.

Thanks in advance for any help, and let me know if you need anymore info!

Edit: added the result of get_platforms()

Edit 2: I was able to find an nvidia.icd file in my /etc/OpenCL/vendors directory. I copied this over to the Anaconda directory, /home/<user>/anaconda3/etc/OpenCL/vendors and pyopencl now recognises Nvidia CUDA as a platform, and my GPU as a device.

Unfortunately it's still loading the tasks off to the CPU, but there's a good chance that's because of my code and I haven't properly figured out how to create context on the GPU yet.

This question is a bit stale, but I ran across it while trying to solve exactly this problem, I had a freshly-installed PyOpenCL package inside a Conda environment on Ubuntu Linux, and it was not listing my GPU in the list of platforms and their associated devices.

The 2nd edit by the OP, where he copied over the nvidia.icd file from /etc/OpenCL/vendors worked for me, but it didn't feel right, so I dug a bit deeper into the PyOpenCL documentation, which recommends, in addition to the PyOpenCL package, doing conda install ocl-icd-system. (See the section on "Using vendor-supplied drivers" on that page.)

This works, and gets you all of the system capabilities -- I think it's a cleaner approach than copying .icd files around.

OpenCL doesn't display Nvidia GPU, This question is a bit stale, but I ran across it while trying to solve exactly this problem, I had a freshly-installed PyOpenCL package inside a  I have tried running this ocl kernel but the cl mem buffer doesn't assign the values to the std::vector<Color> so I wonder what I am doing wrong? the code for the opencl api:

Your system has multiple OpenCL platforms and devices, and create_some_context will just choose one. If you want to use a specific device, you need to enumerate the platforms and devices available using get_platforms() and Platform.get_devices().

11 Myths about OpenCL, This does not come free simply by using an OpenCL compiler. from C or C++ source, but an OpenCL application doesn't just consist of the kernel code. There is no OpenCL-package for all the available devices, so you then need to install drivers for each device. CPU-drivers are often included in the GPU-drivers. Read on to find out exactly which processors are supported.

Perhaps my suggestion applies only to laptop PCs (Intel CPU+Nvidia GPU+Linux) and it is not your case. I had this problem while using tensoflow time ago.

In the case Nvidia card does not appear in the available devices (@apemanzilla answer), check if you have enabled the Performance Mode in the nvidia-settings Primes Profiles. Conversely Power Saving Mode only enables the integrated Intel GPU.

Further details about "Prime stuff" :-) in this answer

OpenCL doesn't detect the platforms from Windows Service , Hello, i have some problems with calling the OpenCL functions from windows service environment. I made a small test application which just do  Now you have a clean system, you have to install the latest Catalyst 9.12 hotfix that includes OpenCL support. Actually, Cat 9.12 doesn’t inlcude a standalone OpenCL support: you must install the ATI Stream v2 beta4. Once the Catalyst 9.12 is installed, you have to install the ATI Stream beta4 SDK.

[PDF] OpenCL, The GPU does not have a stack, and so the OpenCL C-ish programming language cannot do recursion and cannot make function calls. opencl The limitation exists because there is/was hardware (mostly GPUs) which only support 32 bit memory writes, meaning that 32 bit packed vector types (char4 for example) were the only way to write out small types. So the standard was engineered to the lowest common denominator and 32 bit write sizes Buildroot custom kernel under 1MB

Troubleshooting OpenCL in case of viewing / processing / exporting , Whilst OpenCL is designed to increase performance in Capture One, after deleting the content, the software still doesn't work properly, and  Blender doesn't detect any OpenCL either. I looked in the registry, there are none of the relevant OpenCL entries, I also looked at directories where the Nvidia OpenCL files should be, nothing. I have tried installing the most recent drivers after running DDU, both the content creator version and the game-ready version (why do they even bother

OpenCL doesn't work any more after D, Posted by Lord_Zarkor: “OpenCL doesn't work any more after Driver update” Great that you found a fix for your OpenCL problem. I would suggest you mark you last comment as "Correct" so others Users in the future will know a possible solution if their GPU card doesn't show OpenCL activated. By the way, When you Reset your Windows, do you need to install all your personal software and programs again?

  • Sorry I should have added this, but when I call a loop over I get just one platform: Portable Computing Language. Which I presume is the pocl platform.
  • @WilfridSomogyi could you double check with clinfo (you may need to install the program with your system's package manager) and maybe try updating your graphics card drivers?
  • Ok, so running that it looks like NVIDIA CUDA is available as a platform and my graphics card is listed as an available device. Which all looks good, but then at the end there's a load of info under NULL platform behavior that I can't decipher.
  • @WilfridSomogyi The NULL platform behavior section shows what happens when certain OpenCL functions are called with NULL - for example, calling clGetDeviceIDs but passing NULL for the platf orm ID may use a "default" platform. You can pretty much ignore this, it shouldn't change what happens when you iterate the platforms/devices manually.
  • My Nvidia card is definitely running. I have 'Performance Mode' selected in the Prime settings, and calling sudo prime-select nvidia tells me the nvidia profile is already set.
  • I'm sorry, your problem seems related to pyopencl, which I never used.