Skip to content

bmezhou/Exercises-Solutions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some tips when configuring AMD Radeon Pro graphic cards


AMDGPU-Pro install with opencl

When using an AMD Radeon Pro WX2100 graphic card, run

./amdgpu-pro-install -y --opencl=legacy

Note that use a suitable AMD driver.


Verify OpenCL installation

Run clinfo


How to ensure that you are using amdgpu-pro

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


Error: /usr/bin/ld: cannot find -lOpenCL

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


List package

Run dpkg -l (see dpkg --help for a reference)


Cannot install amdgpu drivers on Ubuntu 20.04.1 (5.4.0-56-generic)

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

https://community.amd.com/t5/drivers-software/can-t-install-amdgpu-drivers-on-ubuntu-20-04-1-5-4-0-56-generic/td-p/426676


<GL/gl.h> problem

run apt install mesa-common-dev

https://packages.ubuntu.com/bionic/amd64/mesa-common-dev/filelist


OpenCL-OpenGL interoperation

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
    };

About

C, C++ and Python Code for Exercises and Solutions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 53.7%
  • C++ 41.7%
  • Python 2.1%
  • Makefile 2.0%
  • Cuda 0.5%
  • Shell 0.0%