Description
There are a huge number of different Linux distributions, custom Linux builds, and so on, so the location of libOpenCL.so.1.0.0 may vary.
I think it will be convenient for a library user to be able to specify exact OpenCL DLL path through environment variable (e.g. BrahmaOCLdllPath="usr/lib/libOpenCL.so.1.0.0") or explicitly by passing a path-string in code.
This could help a lot when using Brahma in uncommon setup (not sure if there is such thing as common setup in Linux)
Provide pre-configuration documentation for others Linux systems
e.g.
Here is my take on making Brahma.FSharp work with proper libOpenCL.so.1.0.0
The instructions bellow were tested on EndevourOS, which is a popular Arch-based linux distribution - so all further steps are most likely the same for others arch-based distros.
Installing opencl dependencies on arch
Installing vendor OpenCL implementation and OpenCL ICD Loader
sudo pacman -Syu nvidia nvidia-utils
sudo pacman -S ocl-icd opencl-headers opencl-nvidia intel-compute-runtime # I have both intel graphics and nvidia gpu
[OPTIONAL] Installing clinfo - which is a simple cli-tool that enumerates all possible (known) properties of the OpenCL platform and devices available on the system.
sudo pacman -S clinfo
Installing OpenCL ICD loaders
sudo pacman -S lib32-ocl-icd lib32-opencl-nvidia # nvidia loader required for NVIDIA CUDA
Configuring OpenCL ICD loader (libOpenCl.so)
To ensure the ICD loader from the ocl-icd package is used we should create a file in /etc/ld.so.conf.d which adds /usr/lib to the dynamic program loader's search directories
Description There are a huge number of different Linux distributions, custom Linux builds, and so on, so the location of
libOpenCL.so.1.0.0
may vary.I think it will be convenient for a library user to be able to specify exact OpenCL DLL path through environment variable (e.g.
BrahmaOCLdllPath="usr/lib/libOpenCL.so.1.0.0"
) or explicitly by passing a path-string in code.This could help a lot when using Brahma in uncommon setup (not sure if there is such thing as common setup in Linux)
Related to Related issue
Alternatives considered
Provide pre-configuration documentation for others Linux systems e.g.
Here is my take on making Brahma.FSharp work with proper
libOpenCL.so.1.0.0
The instructions bellow were tested on EndevourOS, which is a popular Arch-based linux distribution - so all further steps are most likely the same for others arch-based distros.
Installing opencl dependencies on arch
Installing vendor OpenCL implementation and OpenCL ICD Loader
[OPTIONAL] Installing clinfo - which is a simple cli-tool that enumerates all possible (known) properties of the OpenCL platform and devices available on the system.
Installing OpenCL ICD loaders
Configuring OpenCL ICD loader (
libOpenCl.so
) To ensure the ICD loader from theocl-icd
package is used we should create a file in /etc/ld.so.conf.d which adds /usr/lib to the dynamic program loader's search directoriesfor more details ICD read ArchWiki
Now, after rebooting the machine - check if DLLs paths are similar to:
Linking DLLs (+ aliasing std. Debian MultiArch DLL path)
Creating symbolic link:
After all is done - double-check sym-links, should be something like this: