You are not logged in.

#1 2025-01-27 15:34:04

Vlazm
Member
Registered: 2025-01-27
Posts: 4

[SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

In the past few days I've been trying to implement GPGPU with C++ and OpenCL

I have a relatively new laptop with NVIDIA GeForce RTX 2050 card and an Intel Alder Lake-P GT2 [Iris Xe Graphics] card
My OpenCL installation works just fine with iris gpu however my nvidia gpu is invisible and does not show on the device list/h/.

Now, my glxinfo -B output suggests that some drivers are missing

name of display: :0
kmsro: driver missing
glx: failed to create dri3 screen
failed to load driver: rusticl
MESA: error: ZINK: vkEnumeratePhysicalDevices failed (VK_ERROR_INITIALIZATION_FAILED)
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 19.1.7, 256 bits) (0xffffffff)
    Version: 24.3.4
    Accelerated: no
    Video memory: 15713MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 25 MB, largest block: 25 MB
    VBO free aux. memory - total: 11483 MB, largest block: 11483 MB
    Texture free memory - total: 25 MB, largest block: 25 MB
    Texture free aux. memory - total: 11483 MB, largest block: 11483 MB
    Renderbuffer free memory - total: 25 MB, largest block: 25 MB
    Renderbuffer free aux. memory - total: 11483 MB, largest block: 11483 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4294949599 MB
    Total available memory: 4294965312 MB
    Currently available dedicated video memory: 25 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 24.3.4-arch1.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 24.3.4-arch1.1
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.3.4-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Following the article at Nouveau - ArchWiki I installed nouveau driver via mesa package for my nvidia card
After that I installed opencl-rusticl-mesa and ocl-icd as was suggested here: GPGPU - ArchWiki
As I understand it this should be enough for my nvidia card to become visible to the OpenCL, but (from the output of the glxinfo -B) it also looks like some drivers are missing...

Unfortunately that's about everything I could get.
I definitely lack a lot of knowledge about drivers, GPGPU and GPUs in general so any helpful comments  would be appreciated smile

Here are my environmental variables from .bashrc

# this line is commented because for some reason it makes iris card (and nvidia?) disapear from 'clinfo -l' output
#export MESA_LOADER_DRIVER_OVERRIDE=rusticl 

export OCL_ICD_FILENAMES=/etc/OpenCL/vendors/rusticl.icd
export OCL_ICD_VENDORS=/etc/OpenCL/vendors/rusticl.icd
export RUSTICL_ENABLE=iris,nouveau,radeonsi

Also here are outputs for some of the commands

clinfo -l

WARNING: OpenCL support via iris driver is incomplete.
For a complete and conformant OpenCL implementation, use
https://github.com/intel/compute-runtime instead
Platform #0: rusticl
 `-- Device #0: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)

pacman -Q | grep opencl

opencl-headers 2:2024.10.24-1
opencl-nvidia 565.77-3
opencl-rusticl-mesa 1:24.3.4-1

pacman -Q | grep nvidia

nvidia-utils 565.77-3
opencl-nvidia 565.77-3

pacman -Q | grep mesa

mesa 1:24.3.4-1

pacman -Q | grep ocl-icd

ocl-icd 2.3.2-2

Last edited by Vlazm (2025-01-29 08:14:50)

Offline

#2 2025-01-27 17:47:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,923

Re: [SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

If you have the nvidia packages you'd normally use the nvidia opencl integration, which you hide via the OCL_ICD_VENDORS variable.

If you want to actually  attempt to use nouveau with rusticl you need to remove nvidia-utils and opencl-nvidia as nvidia-utils will blacklist nouveau.

If you want to use nvidia's integration you need to install the nvidia package matching your kernel and get rid of the OCL variables so all are considered.

MESA_LOADER_DRIVER_OVERRIDE is for GL integration, you absolutely do not want to ever set that to rusticl

Last edited by V1del (2025-01-27 17:50:15)

Offline

#3 2025-01-27 23:58:48

Vlazm
Member
Registered: 2025-01-27
Posts: 4

Re: [SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

Thnx for the reply

V1del wrote:

If you want to actually  attempt to use nouveau with rusticl you need to remove nvidia-utils and opencl-nvidia as nvidia-utils will blacklist nouveau.

Getting rid of the packages fixed the glxinfo -B output, however nvidia card is still missing for the device list.
I don't have much time at the moment, but I will try to get somewhere with nvidia drivers, later in the day.
current glxinfo -B output

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2) (0x46a6)
    Version: 24.3.4
    Accelerated: yes
    Video memory: 7856MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.3.4-arch1.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.3.4-arch1.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.3.4-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#4 2025-01-28 11:24:26

Vlazm
Member
Registered: 2025-01-27
Posts: 4

Re: [SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

Ok, it only gets weirder:
After a couple restarts  I got this from my 'clinfo -l'

WARNING: OpenCL support via iris driver is incomplete.
For a complete and conformant OpenCL implementation, use
https://github.com/intel/compute-runtime instead
Platform #0: rusticl
 +-- Device #0: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)
 `-- Device #1: NV177

Also from the output of the just 'clinfo' the command correctly identifies NV177 as an nvidia card
I have managed to get this output multiple times, however I can not consistently replicate this behavior which is extremely strange
Trying to remove 'iris' from  RUSTICL_ENABLE environment variable didn't really do anything
I will continue testing and sending my results.

On a side note....
This goes out of the scope of the initial problem stated in the article, but why do I still have to manually link OpenCL header directory (via -I option on g++) if I have opencl-headers package installed??
Shouldn't it automatically add the necessary opencl headers to the place where the compiler can find it?

EDIT: I forgot to mention that I am still using my nouveau driver

Last edited by Vlazm (2025-01-28 11:26:58)

Offline

#5 2025-01-29 08:15:14

Vlazm
Member
Registered: 2025-01-27
Posts: 4

Re: [SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

Update:
I tried to use the nvidia package and it actually worked!
Since the main issue is resolved I'll mark the post as solved. I still don't get why do I have to manually include the OpenCL dir even with opencl-headers installed but it isn't such a big deal.
Many thanks for the help smile

Offline

#6 2025-01-29 10:45:19

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,255

Re: [SOLVED] OpenCL rusticl does not acknowladge nvidia gpu

The opencl headers are placed in /usr/include/CL/ and there are also files for cmake in /usr/share/cmake/OpenCLHeaders/ .

If you want to investigate why that compiler doesn't find those headers , you have to show us some compiler output and details about the used compiler .
Starting a new thread, preferabliy in the Programming & Scripting subboard, is best option for that.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB