Initial commit: Documentation Effi v1.0
- Structure complète du projet - Docker compose de production - Documentation organisée par thèmes - Guides d'installation et configuration - Section dépannage détaillée - Journal historique
This commit is contained in:
@@ -0,0 +1,213 @@
|
||||
# 🎮 Dépannage GPU AMD ROCm
|
||||
|
||||
## Erreurs courantes
|
||||
|
||||
### `hipErrorInvalidDeviceFunction`
|
||||
|
||||
**Symptôme :**
|
||||
```
|
||||
RuntimeError: parallel_for failed: hipErrorInvalidDeviceFunction: invalid device function
|
||||
```
|
||||
|
||||
**Cause :** Le build ROCm a été compilé pour une mauvaise architecture GPU.
|
||||
|
||||
**Solution :**
|
||||
1. Vérifier l'architecture de votre GPU :
|
||||
```bash
|
||||
rocminfo | grep gfx
|
||||
# ou
|
||||
docker run --device /dev/kfd --device /dev/dri \
|
||||
-e HSA_OVERRIDE_GFX_VERSION=11.0.0 rocm/dev-ubuntu-24.04:6.3.4-complete \
|
||||
/opt/rocm-6.3.4/bin/rocminfo | grep -E "gfx|Name"
|
||||
```
|
||||
|
||||
2. Modifier le Dockerfile pour votre architecture :
|
||||
```bash
|
||||
cd ~/speaches/src
|
||||
sed -i 's/gfx1101/gfx1100/g' Dockerfile.rocm-ct2
|
||||
```
|
||||
|
||||
3. Rebuilder l'image :
|
||||
```bash
|
||||
docker build -f Dockerfile.rocm-ct2 -t speaches:rocm-ct2 .
|
||||
```
|
||||
|
||||
**Architectures courantes :**
|
||||
- RX 7800 XT / 7900 XTX : `gfx1100`
|
||||
- RX 7700 XT : `gfx1101`
|
||||
- RX 6000 series : `gfx1030`
|
||||
|
||||
---
|
||||
|
||||
### `float16 not supported on CPU backend`
|
||||
|
||||
**Symptôme :**
|
||||
```
|
||||
ValueError: float16 not supported on CPU backend
|
||||
```
|
||||
|
||||
**Cause :** Whisper essaie d'utiliser float16 sur CPU (mode fallback).
|
||||
|
||||
**Solution :** Changer le compute type :
|
||||
```yaml
|
||||
environment:
|
||||
- WHISPER__COMPUTE_TYPE=int8 # ou float32
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `Conv1D on GPU currently requires the cuDNN library`
|
||||
|
||||
**Symptôme :**
|
||||
```
|
||||
RuntimeError: Conv1D on GPU currently requires the cuDNN library which is not integrated in this build
|
||||
```
|
||||
|
||||
**Cause :** CTranslate2 ROCm compilé sans support MIOpen (équivalent cuDNN).
|
||||
|
||||
**Solution :** Ajouter MIOpen dans le Dockerfile :
|
||||
```dockerfile
|
||||
# Dans Dockerfile.rocm-ct2
|
||||
RUN cmake ... \
|
||||
-DWITH_CUDNN=ON \
|
||||
-DCUDnn_LIBRARY=/opt/rocm-6.3.4/lib/libMIOpen.so
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `Unable to find group render`
|
||||
|
||||
**Symptôme :**
|
||||
```
|
||||
Unable to find group render: no matching entries in group file
|
||||
```
|
||||
|
||||
**Cause :** Les noms de groupes ne sont pas reconnus dans le conteneur.
|
||||
|
||||
**Solution :** Utiliser les GID numériques :
|
||||
```yaml
|
||||
group_add:
|
||||
- "44" # GID video
|
||||
- "991" # GID render
|
||||
```
|
||||
|
||||
**Trouver les GID :**
|
||||
```bash
|
||||
cat /etc/group | grep -E "video|render"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ROCm non détecté
|
||||
|
||||
**Symptôme :** `rocm-smi` ne trouve pas de GPU
|
||||
|
||||
**Diagnostic :**
|
||||
```bash
|
||||
# Vérifier que le kernel voit le GPU
|
||||
lspci | grep -i vga
|
||||
|
||||
# Vérifier les modules kernel
|
||||
lsmod | grep amdgpu
|
||||
|
||||
# Vérifier les devices
|
||||
ls -la /dev/kfd /dev/dri
|
||||
```
|
||||
|
||||
**Solutions :**
|
||||
|
||||
1. **Installer ROCm :**
|
||||
```bash
|
||||
# Sur Fedora/Bazzite
|
||||
sudo dnf install -y rocm-dev rocm-smi
|
||||
|
||||
# Sur Ubuntu
|
||||
sudo apt install -y rocm-dev
|
||||
```
|
||||
|
||||
2. **Ajouter l'utilisateur au groupe video :**
|
||||
```bash
|
||||
sudo usermod -aG video $USER
|
||||
sudo usermod -aG render $USER
|
||||
# Déconnexion/reconnexion nécessaire
|
||||
```
|
||||
|
||||
3. **Vérifier les permissions :**
|
||||
```bash
|
||||
ls -la /dev/kfd
|
||||
# Doit être accessible au groupe video
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Faible performance GPU
|
||||
|
||||
**Symptôme :** La transcription prend toujours 10s+ malgré ROCm
|
||||
|
||||
**Diagnostic :**
|
||||
```bash
|
||||
# Vérifier l'utilisation GPU
|
||||
rocm-smi
|
||||
|
||||
# Voir si ROCm est vraiment utilisé
|
||||
docker logs speaches-stt | grep -i "rocm\|cuda\|gpu"
|
||||
|
||||
# Vérifier les variables d'environnement
|
||||
docker inspect speaches-stt | grep -i env
|
||||
```
|
||||
|
||||
**Causes possibles :**
|
||||
1. Mode CPU activé malgré ROCm
|
||||
2. Conflit avec Ollama qui utilise tout le GPU
|
||||
3. Modèle trop gros
|
||||
|
||||
**Solutions :**
|
||||
```yaml
|
||||
# Forcer le device GPU
|
||||
environment:
|
||||
- WHISPER__DEVICE=cuda # ou auto
|
||||
|
||||
# Réduire la charge GPU d'Ollama
|
||||
# Dans Ollama, utiliser moins de couches GPU
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Build CTranslate2 ROCm complet
|
||||
|
||||
### Procédure détaillée
|
||||
|
||||
```bash
|
||||
# 1. Cloner le repo speaches
|
||||
cd ~
|
||||
git clone https://github.com/speaches-ai/speaches.git
|
||||
cd speaches/src
|
||||
|
||||
# 2. Vérifier l'architecture GPU
|
||||
rocminfo | grep gfx
|
||||
|
||||
# 3. Modifier le Dockerfile pour votre architecture
|
||||
# Remplacer gfx1101 par votre architecture (ex: gfx1100)
|
||||
sed -i 's/gfx1101/gfx1100/g' Dockerfile.rocm-ct2
|
||||
|
||||
# 4. Vérifier que MIOpen est activé
|
||||
grep -i miopen Dockerfile.rocm-ct2
|
||||
# Devrait contenir : -DWITH_CUDNN=ON
|
||||
|
||||
# 5. Build (prend 30-60 min)
|
||||
docker build -f Dockerfile.rocm-ct2 -t speaches:rocm-ct2 .
|
||||
|
||||
# 6. Tester
|
||||
docker run --rm --device /dev/kfd --device /dev/dri \
|
||||
-e HSA_OVERRIDE_GFX_VERSION=11.0.0 \
|
||||
speaches:rocm-ct2 \
|
||||
python3 -c "import torch; print(torch.cuda.is_available())"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Ressources
|
||||
|
||||
- [CTranslate2 ROCm Fork](https://github.com/arlo-phoenix/CTranslate2-rocm)
|
||||
- [AMD ROCm Documentation](https://docs.amd.com)
|
||||
- [ROCm GPU Support List](https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html)
|
||||
Reference in New Issue
Block a user