How to install FOSS OpenCL for AMD GPU on Debian 11 (Bullseye)

It is very easy to set up free-and-open-source OpenCL computing support if you have an AMD GPU and Debian 11:

apt install ocl-icd-libopencl1 mesa-opencl-icd

Then use clinfo (from the package clinfo) to display information about your platform.

You can now use /dev/dri and the files in /etc/OpenCL to run OpenCL applications.

(Many thanks to the author of this blog post.)

If you think you found a mistake in this blog post, or would like to suggest an improvement to this blog post, you can write me an e-mail to the address public dot michael at franzl dot name; as subject please use the prefix "Comment to blog post" and append the post title.
Copyright © 2023 Michael Franzl