Score:0

Installing Mesa OpenCL for Nvidia?

kp flag

Out of curiosity, I've tried to install OpenCL on my Ubuntu 21.04 installation.

I believe there may be OpenCL 1.1 support available in the open-source Nouveau video driver for Nvidia graphics cards. This is the driver I'm using (and am stuck with).

My Nvidia hardware is a dated 9400 GT card, but an upgrade to a 9800 GT is possible.

$ sudo apt install mesa-opencl-icd    # Install opencl, ICD and compilers.

$ sudo usermod -a -G video username   # Add me to the video group for display access.

$ sudo clinfo
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 21.0.1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No devices found in platform [Clover?]
  clCreateContext(NULL, ...) [default]            No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No devices found in platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.14
  ICD loader Profile                              OpenCL 3.0

So, as you can see I'm clueless. What I'm really after is someone who can direct me to appropriate resources, so that I can learn how to setup mesa's OpenCL implementation, as well as how to invoke and use the associated compilers, ICD, etc.?

Any help would be appreciated.

M.

Tried a bunch of other stuff: Checked that /etc/OpenCL/vendors/*.dri file is there, and filled-in correctly. All the requisite packages and files are in place. Why it can't see my GPU, I'm clueless about.

Score:0
kp flag

It appears my particular Nvidia GPU was not yet supported at 31/07/21.

To check progress on support for your GPU, consult https://mesamatrix.net/#OpenCL.

Thanks to all those who viewed my query.

M.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.