**Title: Step-by-Step Guide to Install ROCm on Ubuntu 22.04 LTS** June 8th 2023 **Introduction** In this post, I will provide the solution that worked on my system on how to install Radeon Open Compute (ROCm) on Ubuntu 22.04 for 6000 series AMD GPU's. ROCm is an open-source software platform that allows GPU-accelerated computation. It's a valuable tool for those needing to perform complex computations and data-intensive tasks (e.g., machine learning / AI models). **Prerequisites** Before you begin, you need the following: - An Ubuntu 22.04 LTS machine - A compatible AMD GPU (Check ROCm's official GitHub page for the compatibility list) - Basic knowledge of the command line and Ubuntu system administration **Step-by-Step Guide** 1. **Update Your System:** First, make sure your system is up-to-date. Open your terminal and run: ```bash sudo apt update sudo apt upgrade ``` 2. **Identify the newest version of ROCm:** You can find the link for the AMD ROCm repository here: ```bash http://repo.radeon.com/amdgpu-install/ ``` In my case the version of ROCm that is supported by PyTorch is **5.4.2** and the apt repo name is **amdgpu-install_5.4.50402-1_all.deb** (TensorFlow worked for me with 5.5.1). 3. **Add the ROCm Repository:** Add the ROCm apt repository to your system by **replacing** 5.X.Y and amdgpu-install_5.X.Y.Z-1_all.deb with the version number and repo name you need (see step 2) in the following commands: ```bash wget https://repo.radeon.com/amdgpu-install/5.X.Y/ubuntu/jammy/amdgpu-install_5.X.Y.Z-1_all.deb ``` 4. **Install ROCm:** Install ROCm by **modifying** the following command with your needed version number: ```bash sudo apt install ./amdgpu-install_5.X.Y.Z-1_all.deb sudo amdgpu-install --usecase=dkms,graphics,multimedia,opencl,hip,hiplibsdk,rocm ``` 5. **Assign yourself to render and video group:** To assign yourself replace **johndoe** with your username in these commands: ```bash sudo usermod -a -G render johndoe sudo usermod -a -G video johndoe ``` 6. **Reboot:** Once the installation is finished, reboot your system: ```bash sudo reboot ``` 7. **Verify Installation:** After rebooting, you can verify the installation by running the `roc-smi` command: ```bash sudo /opt/rocm/bin/rocm-smi ``` and the `rocminfo` command: ```bash sudo /opt/rocm/bin/rocminfo ``` and the `rocm-libs` command: ```bash apt show rocm-libs ``` If you see information about your GPU, congratulations! You have successfully installed ROCm on your Ubuntu 22.04 system. **Troubleshooting** If you have any problems during the installation, make sure your GPU is compatible with ROCm, that you are installing the correct version of ROCm and that your Ubuntu system is up-to-date. Check the official ROCm GitHub page for any known issues and solutions. **Conclusion** This post provided a step-by-step guide on how to install ROCm on Ubuntu 22.04. With ROCm, you can take full advantage of your AMD GPU for complex computational tasks. Let me know if this works for you in the comments below. --- Please ensure to check the current ROCm's official documentation for any updates or changes to the installation process. https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html https://rocm.docs.amd.com/en/latest/