Giter Club home page Giter Club logo

rocm-rx6600xt's Introduction

AMD ROCm Installation Guide on RX 6600 XT + TensorFlow and PyTorch

What is ROCm?

ROCm is an open-source stack for GPU computation. ROCm is primarily Open-Source Software (OSS) that allows developers the freedom to customize and tailor their GPU software for their own needs while collaborating with a community of other developers, and helping each other find solutions in an agile, flexible, rapid and secure manner. Read More..

Installation Prerequisites

In this guide, I will install AMD ROCm + TensorFlow and PyTorch on Ubuntu 22.04 LTS

Make Sure It's Up to Date

  1. Run the following commands:
sudo apt update && sudo apt upgrade
  1. Reboot if necessary or continue to the next step.

Setting Permissions for Groups

This section provides steps to add any current user to a video group to access GPU resources.

  1. To check the groups in your system, issue the following command:
  2. Add yourself to the render or video group using the following instruction:
sudo usermod -a -G render $LOGNAME
sudo usermod -a -G video $LOGNAME
  1. Use of the video group is recommended for all ROCm-supported operating systems.

To add all future users to the video and render groups by default, run the following commands:

echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf

ROCm Installation

To download and install the amdgpu-install script on the system, run the following commands:

sudo apt update
wget https://repo.radeon.com/amdgpu-install/5.5.1/ubuntu/jammy/amdgpu-install_5.5.50501-1_all.deb
sudo apt install ./amdgpu-install_5.5.50501-1_all.deb

We will install ROCm with Single-version Installation mode, run the following commands:

sudo amdgpu-install --usecase=hiplibsdk,rocm

After everything has been done, reboot your system.

Docker Engine Installation

  1. Install Docker Engine using bash script, run the following commands:
curl -sSL https://get.docker.com/ | sudo sh
  1. The Docker daemon binds to a Unix socket, not a TCP port. By default it’s the root user that owns the Unix socket, and other users can only access it using sudo. The Docker daemon always runs as the root user. Run the following commands:
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

TensorFlow Installation

  1. Pull the latest public TensorFlow Docker image.
docker pull rocm/tensorflow:latest
  1. Once you have pulled the image, run it by using the command below:
docker run -it --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined rocm/tensorflow:latest

PyTorch Installation

  1. Pull the latest public PyTorch Docker image.
docker pull rocm/pytorch:latest
  1. Once you have pulled the image, run it by using the command below:
docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --device=/dev/kfd --device=/dev/dri --group-add video --ipc=host --shm-size 8G rocm/pytorch:latest

Tips and Tricks

Make sure before running any program in either TensorFlow or PyTorch, run the following command:

HSA_OVERRIDE_GFX_VERSION=10.3.0

Results

Screenshot from 2023-06-07 12-18-21 Screenshot from 2023-06-07 12-28-51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.