Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move nvidia.icd to /usr/share/OpenCL/vendors ? #75

Open
sndirsch opened this issue Jan 17, 2025 · 2 comments
Open

Move nvidia.icd to /usr/share/OpenCL/vendors ? #75

sndirsch opened this issue Jan 17, 2025 · 2 comments

Comments

@sndirsch
Copy link
Collaborator

sndirsch commented Jan 17, 2025

openSUSE Report -> https://bugzilla.suse.com/show_bug.cgi?id=1235084

nvidia-compute-G06 package installs 'nvidia.icd' below directory "/etc/OpenCL/vendors/"

However, mesa opencl implementation packages like rusticl or clover installs .icd file under "/usr/share/OpenCL/vendors".

When I run 'clinfo', it only detects nvidia platform. But, if I move .icd file of rusticl into "/etc/OpenCL/vendors", it detects both platform well.

My response:
Indeed /etc/OpenCL/vendors/ gets preferred. As workaround you can create symlinks from /etc/OpenCL/vendors/ to /usr/share/OpenCL/vendors or set OPENCL_VENDOR_PATH environment variable to /usr/share/OpenCL/vendors to see only the Mesa CL drivers.

@scaronni-nvidia Any opinion on that? Background: We patch ocl-icd,

Sat Aug 22 16:49:25 UTC 2020 - Stefan Dirsch [email protected]

  • n_UsrShare.patch
    • first try /etc/OpenCL/vendors, then /usr/share/OpenCL/vendors
      (boo#1173005, comment#8)
  • supersedes configure option --enable-custom-vendordir
@scaronni-nvidia
Copy link
Contributor

I think the patch on ocl-icd is not correct, as it should allow to source icd files from both locations, not just one replacing the other.

Having said that, /usr/share/OpenCL/vendors is not standard at all. In some distributions we also allow the Khronos OpenCL ICD Loader (https://github.com/KhronosGroup/OpenCL-ICD-Loader) as a valid package for providing libOpenCL.so.1, and that does not support /usr/share/OpenCL/vendors as a valid location.

If this is what SUSE uses as the standard I think it's fine, but the patch needs to be udpated. If you want to be 100% compliant you should keep on using /etc/OpenCL/vendors or update the patch to allow both locations and submit a patch to the Khronos ICD Loader.

@sndirsch
Copy link
Collaborator Author

Thanks a lot for the input @scaronni-nvidia !

The background is explained here:

https://en.opensuse.org/openSUSE:Packaging_UsrEtc

I opened a bug for Mesa and ocl-icd to address that.

https://bugzilla.suse.com/show_bug.cgi?id=1173005

Later I decide to change location from /usr/etc/OpenCL/vendors to /usr/share/OpenCL/vendors. I can't remember why.

https://bugzilla.suse.com/show_bug.cgi?id=1173005#c5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants