[Bug] Vulkan backend crashes on AMD GPUs on Windows (0xc0000005)

Aperta
#3,479 22 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva

Direzione di ricerca

Riproduci innanzitutto il comando PowerShell documentato con il backend Vulkan e confrontane il comportamento con la modalità CPU e i workaround GGML_VK elencati. Esamina i report di crash Vulkan upstream collegati e determina quale degli ambiti proposti — documentazione, un’opzione di runtime o la gestione delle funzionalità del driver — può essere supportato; il lavoro è completo quando sono disponibili un risultato riproducibile su AMD/Windows e una mitigazione definita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug help wanted needs feedback

Bug Report: llama-funasr-sensevoice Vulkan Backend Crashes on AMD GPUs on Windows

中文报告

问题描述

在 Windows 系统下,使用 llama-funasr-sensevoice.exe 的 Vulkan 后端(--backend vulkan)时,程序在 AMD GPU 上崩溃,异常代码 0xc0000005(访问冲突)。

环境信息
  • OS: Windows 11
  • GPU: AMD Radeon RX 7600M XT (RDNA3) + AMD Radeon 780M (RDNA3, integrated)
  • AMD 驱动版本: 32.0.31035.1003 (2026年7月24日,最新版)
  • FunASR 版本: runtime-llamacpp-v0.1.9 (funasr-llamacpp-windows-x64-vulkan.zip)
  • 模型: sensevoice-small-f16.gguf + fsmn-vad.gguf
复现步骤
  1. 下载并解压 funasr-llamacpp-windows-x64-vulkan.zip
  2. 下载模型:sensevoice-small-f16.gguffsmn-vad.gguf
  3. 运行命令:
    .\llama-funasr-sensevoice.exe -m models\sensevoice-small-f16.gguf --vad models\fsmn-vad.gguf -a audio\examples\zh.mp3 --backend vulkan
    
预期行为

程序应使用 AMD GPU (Vulkan) 完成语音识别并输出转录文本。

实际行为

程序在 GPU 设备检测后立即崩溃,Windows 事件查看器显示:

Application Error: llama-funasr-sensevoice.exe
Exception Code: 0xc0000005 (Access Violation)
Faulting Module: llama-funasr-sensevoice.exe
Faulting Offset: 0x0000000000271743
已尝试的解决方法
  1. CPU 模式 — 正常工作,转录结果正确
  2. ❌ 设置 GGML_VK_DISABLE_COOPMAT=1 — coopmat 成功禁用(matrix cores: none),但崩溃依旧
  3. ❌ 设置 GGML_VK_DISABLE_COOPMAT=1 + GGML_VK_DISABLE_COOPMAT2=1 — 崩溃依旧
  4. ❌ 设置 GGML_VK_DISABLE_COOPMAT=1 + GGML_VK_DISABLE_COOPMAT2=1 + GGML_VK_DISABLE_INTEGER_DOT_PRODUCT=1 — 崩溃依旧
  5. ❌ 设置 GGML_VULKAN_VALIDATE=1 — 崩溃依旧
  6. ❌ 使用 GGML_VULKAN_DEVICE=01 指定特定 GPU — 崩溃依旧
  7. ❌ 使用不同的驱动版本(从旧到新)— 均崩溃
崩溃分析

该崩溃与上游 ggml 项目中已知的 AMD Vulkan 驱动兼容性问题一致:

FunASR 预编译二进制文件中缺少以下功能:

  • 没有 --no-flash-attn 参数来禁用有问题的 Flash Attention 着色器
  • 仅设置 GGML_VK_DISABLE_COOPMAT=1 不足以解决问题
  • 崩溃发生在固定代码偏移 0x271743,与是否禁用 coopmat 无关
建议
  1. 在 FunASR 文档中注明:AMD GPU 在 Windows 上不支持 Vulkan 后端
  2. 添加 --no-flash-attn 参数支持
  3. 在运行时检测 AMD Windows 驱动并自动禁用有问题的 Vulkan 功能
  4. 或者建议 AMD Windows 用户使用 CPU 版本

English Report

Description

The llama-funasr-sensevoice.exe Vulkan backend (--backend vulkan) crashes with exception code 0xc0000005 (Access Violation) on AMD GPUs under Windows.

Environment
  • OS: Windows 11
  • GPU: AMD Radeon RX 7600M XT (RDNA3) + AMD Radeon 780M (RDNA3, integrated)
  • AMD Driver: 32.0.31035.1003 (July 24, 2026, latest)
  • FunASR Version: runtime-llamacpp-v0.1.9 (funasr-llamacpp-windows-x64-vulkan.zip)
  • Model: sensevoice-small-f16.gguf + fsmn-vad.gguf
Steps to Reproduce
  1. Download and extract funasr-llamacpp-windows-x64-vulkan.zip
  2. Download models: sensevoice-small-f16.gguf and fsmn-vad.gguf
  3. Run:
    .\llama-funasr-sensevoice.exe -m models\sensevoice-small-f16.gguf --vad models\fsmn-vad.gguf -a audio\examples\zh.mp3 --backend vulkan
    
Expected Behavior

Program should transcribe audio using AMD GPU (Vulkan) acceleration.

Actual Behavior

Program crashes immediately after GPU device detection. Windows Event Log shows:

Application Error: llama-funasr-sensevoice.exe
Exception Code: 0xc0000005 (Access Violation)
Faulting Module: llama-funasr-sensevoice.exe
Faulting Offset: 0x0000000000271743
Attempted Workarounds
  1. CPU mode — works correctly
  2. GGML_VK_DISABLE_COOPMAT=1 — coopmat disabled (matrix cores: none), still crashes
  3. GGML_VK_DISABLE_COOPMAT=1 + GGML_VK_DISABLE_COOPMAT2=1 — still crashes
  4. GGML_VK_DISABLE_COOPMAT=1 + GGML_VK_DISABLE_COOPMAT2=1 + GGML_VK_DISABLE_INTEGER_DOT_PRODUCT=1 — still crashes
  5. GGML_VULKAN_VALIDATE=1 — still crashes
  6. GGML_VULKAN_DEVICE=0 or 1 — still crashes
  7. ❌ Various driver versions (old to new) — all crash
Root Cause Analysis

This crash is consistent with known AMD Vulkan driver compatibility issues in upstream ggml:

The FunASR pre-built binary is missing:

  • --no-flash-attn parameter to disable problematic Flash Attention shaders
  • GGML_VK_DISABLE_COOPMAT=1 alone is insufficient
  • Crash occurs at fixed offset 0x271743 regardless of coopmat status
Suggestions
  1. Document in FunASR docs that AMD GPUs on Windows do not support the Vulkan backend
  2. Add --no-flash-attn parameter support
  3. Auto-detect AMD Windows driver and disable problematic Vulkan features at runtime
  4. Or direct AMD Windows users to use the CPU package
  • Thought: 768ms
    $ gh issue create --repo modelscope/FunASR --title "[Bug] Vulkan backend crashes on AMD GPUs on Windows (0xc0000005)" --body-file "D:\funasr-llamacpp-windows-x64-vulkan\bug_report.md" 2>&1
    gh : �޷�����gh����ʶ��Ϊ cmdlet���������ű��ļ�������г�������ơ��������Ƶ�ƴд���������·������ȷ��·����ȷ��Ȼ������
    һ�Ρ�
    ����λ�� ��:1 �ַ�: 1
  • gh issue create --repo modelscope/FunASR --title "[Bug] Vulkan backen ...
  • ~~
    • CategoryInfo : ObjectNotFound: (gh:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Lingua principale
Python
Stelle
20.4k
Fork
2k
Merge medio
4h 55m
PR unite (30g)
169

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelscope/FunASR

Tutte le issue di modelscope/FunASR

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.