OpenCL Issues

Error

Explanation

Instructions

CL_INVALID_BINARY

This is indicates a problem with your OpenCL device (CPU/GPU) or driver.

  1. Install any pending operating system updates.

  2. Update your GPU drivers to the latest available version.

  3. Verify that your driver supports OpenCL 1.2.

  4. Check the GPU Requirements.

CL_INVALID_QUEUE_PROPERTIES

CL_PLATFORM_NOT_FOUND_KHR

Your system is missing OpenCL drivers.

CL_OUT_OF_RESOURCES

This is indicates a problem with your OpenCL device (CPU/GPU) or driver.

  1. Verify that there are no other programs running that consume memory from this OpenCL device (CPU/GPU).

  2. See Memory Leak in .NET to make sure that you dispose of all objects in your script.

  3. Verify that your driver supports OpenCL 1.2.

  4. Check the GPU Requirements.

  5. If necessary, upgrade your OpenCL device to a model with more resources.

  6. Ubuntu 20.04 only: Linux 5.8 kernel with Intel GPU as rendering device can give openCL errors. Downgrade to the LTS(stable) base Linux kernel 5.4 to fix it.

CL_MEM_OBJECT_ALLOCATION_FAILURE

CL_OUT_OF_HOST_MEMORY

Your computer does not have enough memory to execute the current task.

  1. Verify that there are no other programs running that consume memory from this OpenCL device (CPU/GPU).

  2. Check the GPU Requirements.

  3. If necessary, upgrade your computer’s memory.

CL_INVALID_BINARY

To check if your OpenCL driver is above the required version, you can use clinfo.

  1. Download the clinfo Windows binary file.

  2. Launch the Command Prompt by pressing Win + R keys on the keyboard, then type cmd and press Enter.

    ../_images/run-cmd-windows.png
  3. Navigate to the directory that contains the downloaded file (clinfo.exe) and execute the following command:

    clinfo.exe -l
    

    This will print all available information about all OpenCL platforms on the system and the devices they expose.

    ../_images/cmd_cl_windows.png

    If your GPU is not listed you may need to install the OpenCL drivers and/or graphics drivers.

  4. To check the OpenCL driver version, use clinfo and search for the OpenCL platform version:

    clinfo.exe | findstr "Platform\ Version"
    

    If the version is below OpenCL 1.2, you need to update your graphics drivers.

  1. Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard and install clinfo.

    sudo apt install -y clinfo
    
  2. Run clinfo -l to list all OpenCL platforms.

    sudo /usr/bin/clinfo -l
    

    This will print all available information about all OpenCL platforms on the system and the devices they expose.

    If your GPU is not listed you may need to install the OpenCL drivers and/or graphics drivers.

    ../_images/no-platforms-ubuntu.png
  3. To check the OpenCL driver version, use clinfo and search for the OpenCL platform version:

    sudo /usr/bin/clinfo | grep "Platform Version"
    

    If the version is below OpenCL 1.2, you need to update your OpenCL drivers and/or graphics drivers.

CL_PLATFORM_NOT_FOUND_KHR

On Ubuntu, you may need to add your user as part of the render and/or video groups for OpenCL to work.

OpenCL will not work if your user is not part of the render group and the video group.

OpenCL will not work if your user is not part of the render group and the video group.

OpenCL will not work if your user is not part of the render group.

Note

Support for Ubuntu 18.04 is removed since SDK 2.10. To see Ubuntu 18.04 instructions for an earlier SDK version, change the Knowledge Base version in the top left corner.

Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard, then add your user to the correct group:

sudo gpasswd -a $USER render
sudo gpasswd -a $USER video
sudo gpasswd -a $USER render
sudo gpasswd -a $USER video
sudo gpasswd -a $USER render

Restart your PC:

sudo reboot