Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 2.4 KB

README.md

File metadata and controls

25 lines (18 loc) · 2.4 KB

ROCm 6.1.3, PyTorch 2.4, Torchvision 0.19 with AMD GFX803 aka AMD Polaris aka AMD RX570/RX580/RX590

This repo provides a docker buildfile based on the original ROCm-Dockerimage to compile PyTorch and Torchvision for the AMD RX570/RX580/RX590 generation. PyTorch, Torchvision and rocBLAS-Library are not compiled to use the GPU-Polaris generation in the original PIP repository. And of course not compiled too in the official ROCm-PyTorch Dockerfile. However, if Polaris 20/21 GPU support is to be used in ComfyUI, there is no way around newly compiled PyTorch and Torchvision whl/wheel python files. And in ROCm 6.X you have to recompile rocBLAS-Library too. That what this Docker Buildfile will do for you.

ROCm-6.1.3 in a Dockerfile

OS linux Python ROCm PyTorch Torchvision GPU
Ubuntu-22.04.2 6.X 3.10.10 6.1.3 2.4.0 0.19.0 RX570/580/590 aka Polaris 20/21 aka GCN 4
  • It is not necessary to install the entire ROCm-Stack on the host system. Unless you want to use something to optimize your GPU via rocm-smi. In my case, I need the rocm stuff to reduce the power consumption of my RX570 GPU to 145 watts with rocm-smi --setpoweroverdrive 145 && watch -n2 rocm-smi every time I restart the container.
  1. install the docker-subsystem / docker.io on your linux system
  2. download the latest file version of this github-repos
  3. build your Docker image via docker build . -t 'rocm61_pt24:latest'
  4. start the container via:
  5. docker run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8188:8188 rocm61_pt24:latest
  6. install ComfyUI and download a Model inside the container
  7. After installing ComfyUI reinstall pytorch and torchvision wheels into your ComfyUI-Python-Environment. you find the Polaris compiled Python-Wheel-Files into the "/pytorch/dist" and "/vision/dist" Directory