When using an AMD Radeon Pro WX2100 graphic card, run
./amdgpu-pro-install -y --opencl=legacy
Note that use a suitable AMD driver.
Run clinfo
Run glxinfo | grep "OpenGL vendor string" | cut -f2 -d":" | xargs
, or
run glmark2
https://wiki.archlinux.org/title/AMDGPU_PRO#How_to_ensure_you_are_using_AMDGPU-PRO_driver
run sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/lib/libOpenCL.so
https://askubuntu.com/questions/1007591/usr-bin-ld-cannot-find-lopencl
Run dpkg -l
(see dpkg --help
for a reference)
To install 5.4.0-54 do next:
sudo apt install linux-image-5.4.0-54-generic linux-headers-5.4.0-54-generic linux-modules-extra-5.4.0-54-generic
then reboot to 5.4.0-54
then
sudo apt remove linux-image-5.4.0-56-generic linux-image-unsigned-5.4.0-56-generic
(unsigned mentioned here because it tryed to install it for me by some reason.. it just helped)
then do
sudo apt autoremove
then go to /usr/src
and remove linux-headers-5.4.0-56-generic
and linux-headers-5.4.0-56
(if any of them are there)
now you can do
sudo ./amdgpu-install -y
run apt install mesa-common-dev
https://packages.ubuntu.com/bionic/amd64/mesa-common-dev/filelist
Refer to Nvidia SDK named oclSimpleGL
Remeber to used correct OpenCL context.
IIRC, use
cl_context_properties props[] =
{
CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
CL_CONTEXT_PLATFORM, (cl_context_properties)cpPlatform,
0
};