-
Notifications
You must be signed in to change notification settings - Fork 178
Description
Hi everyone,
I'm fairly new to programming, but after a lot of trial and error I managed to get Abogen running with good performance on AMD GPUs under Linux. I'm sharing the steps I took here in case it helps others — or even gets officially integrated into the project.
✅ Environment
OS: Ubuntu 24.04.2 LTS
GPU: AMD RX 9070 XT
Python: 3.10
ROCm: 6.4
PyTorch: 2.8 (ROCm build)
To install PyTorch with ROCm support, I used the nightly ROCm 6.4 build with the following command:
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.4
import torch
print(torch.version)
2.8.0.dev20250518+rocm6.4
⚙️ Steps I Took
Installed ROCm 6.4 and PyTorch 2.8 with ROCm support (see command above).
The GPU was detected, but performance was very poor.
While digging through GitHub issues, I found this comment on the Kokoro repo mentioning the need to set:
export MIOPEN_FIND_MODE=FAST
To set this directly in Python (in main.py), I added:
import os
os.environ["MIOPEN_FIND_MODE"] = "FAST"
This brought a noticeable performance improvement.
However, the GPU was still not fully utilized. ChatGPT suggested adding:
os.environ["MIOPEN_CONV_PRECISE_ROCM_TUNING"] = "0"
After this, GPU usage jumped to 100%.
Important: ChatGPT said that these commands need to be set at the beginning of main.py.
import os
os.environ["MIOPEN_FIND_MODE"] = "FAST"
os.environ["MIOPEN_CONV_PRECISE_ROCM_TUNING"] = "0"
Sorry for being so verbose. I tried to summarize my steps and sources so that, if needed, someone else can build upon them.