Skip to content

Add opencl support #2176

Closed
wants to merge 2 commits into from
Closed

Add opencl support #2176

wants to merge 2 commits into from

Conversation

thomas
Copy link
Collaborator

@thomas thomas commented Aug 16, 2021

Can be tested with compiling and running cas-offinder (https://github.com/snugel/cas-offinder).

  #> OCL_ICD_VENDORS=/usr/share/nvidia/460.39/lib/libnvidia-opencl.so.460.39 ./cas-offinder 

Installing libOpenCL.so.1 will clash with links inhere.
 - remove libOpenCL.so.1
 - remove duplicate libnvidia-opencl.so.1 (?)
 - remove remaining unreferenced links

Note: libnvidia-wfb.so.1 and libOpenCL.so.1 _are_ part
of the nvidia-390.87 driver, but no workstation uses this
driver anymore, so drop this cruft.

The tool for checking is named check-nvidia-mxlinks.sh, and can be found
in /project/admin/tools
Minimum required to build and run OpenCL Apps
@pmenzel
Copy link
Collaborator

pmenzel commented Aug 17, 2021

bee shows a conflict:

$ sudo bee update nvidia-mxlinks
installing /src/mariux/beeroot/packages/nvidia-mxlinks-0.13-0.x86_64.bee.tar.bz2 ..
removing nvidia-mxlinks-0.12-0.x86_64 ..
$ sudo bee install OpenCL-Headers ocl-icd
installing /src/mariux/beeroot/packages/OpenCL-Headers-2021.06.30-0.x86_64.bee.tar.bz2 ..
installing /src/mariux/beeroot/packages/ocl-icd-2.3.0-0.x86_64.bee.tar.bz2 ..
    Conflicts with installed package found: nvidia-mxlinks-0.13-0.x86_64:
        /usr/lib/libOpenCL.so.1
installing /src/mariux/beeroot/packages/clinfo-3.0.21.02.21-0.x86_64.bee.tar.bz2 ..

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 17, 2021

Thank you for the analysis. I didn’t check the version numbers. So how to test this properly?

$ sudo bee update nvidia-mxlinks-0.12-1
$ sudo bee install OpenCL-Headers ocl-icd

# SRCURL[0]="https://github.com/OCL-dev/ocl-icd/archive/refs/tags/v${PKGVERSION}.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/7c34ddef4a662f6737e3165ccd417cba/ocl-icd-2.3.0.tar.gz"

# PATCHURL+=()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment can be removed?

SRCURL[0]="https://beehive.molgen.mpg.de/7c34ddef4a662f6737e3165ccd417cba/ocl-icd-2.3.0.tar.gz"

# PATCHURL+=()
PATCHURL[0]="https://beehive.molgen.mpg.de/a2de5a61942a5360560f415cfe0cbd61/0001-Updated-to-support-latest-Khronos-headers.patch.gz"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’d be great if you mentioned in the commit message, where the patch is from.

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 17, 2021

$ diff -u /src/mariux/beeroot/bee-files/nvidia-mxlinks-0.12-0.bee /src/mariux/beeroot/bee-files/nvidia-mxlinks-0.13-0.bee
--- /src/mariux/beeroot/bee-files/nvidia-mxlinks-0.12-0.bee	2020-01-15 10:50:41.000000000 +0100
+++ /src/mariux/beeroot/bee-files/nvidia-mxlinks-0.13-0.bee	2020-01-28 13:16:30.000000000 +0100
@@ -1,6 +1,6 @@
 #!/bin/env beesh
 
-# BEE_VERSION nvidia-mxlinks-0.12-0
+# BEE_VERSION nvidia-mxlinks-0.13-0
 
 EXCLUDE=("^/usr/lib/(X11|xorg)(|/modules(|/drivers))$")
 
@@ -31,16 +31,17 @@
         "libnvidia-ifr.so.1"
         "libnvidia-opticalflow.so.1"
         "libnvoptix.so.1"
+        "libGLX_indirect.so.0"
     )
 
     for i in ${NVLIBS[@]} ; do
-        ln -sv /usr/share/mxgfx/lib/${i} ${D}${LIBDIR}/${i}
+      start_cmd ln -sv /usr/share/mxgfx/lib/${i} ${D}${LIBDIR}/${i}
     done
 
     ln -sv libvdpau_nvidia.so.1 ${D}${LIBDIR}/libvdpau_nvidia.so
 
-    ln -sv /node/usr_share_mxgfx \
-           ${D}${DATAROOTDIR}/mxgfx
+    #ln -sv /node/usr_share_mxgfx \
+    #       ${D}${DATAROOTDIR}/mxgfx
 
     ln -sv /usr/share/mxgfx/drivers/nvidia_drv.so \
            ${D}${LIBDIR}/X11/modules/drivers/nvidia_drv.so

So I suggest to either replace nvidia-mxlinks-0.13-0, or use 0.14-0.

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@pmenzel
Copy link
Collaborator

pmenzel commented Aug 17, 2021

So how to test this properly?
Try some OpenCL software, e.g. clinfo should work now.

Sorry, I just meant, what bee packages to update and to install (and what order). But yes, I tested with clinfo, and it worked.

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 17, 2021 via email

@thomas
Copy link
Collaborator Author

thomas commented Aug 19, 2021

#2180 obsoletes this one, also the chaos around nvidia-mxlinks distracts from the real aim of the PR. So I'm closing this one before it gets really ridiculous.

@thomas thomas closed this Aug 19, 2021
Sign in to join this conversation on GitHub.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants