modelscope / modelscope/FunASR

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

Open
#3,479 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted needs feedback
Dominant language
Python
Stars
20.4k
Forks
2k
Avg merge
4h 55m
Merged PRs (30d)
169

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

First reproduce the documented PowerShell command with the Vulkan backend and compare its behavior with CPU mode and the listed GGML_VK workarounds. Review the linked upstream Vulkan crash reports and determine which proposed scope—documentation, a runtime option, or driver-feature handling—can be supported; done requires a reproducible AMD/Windows outcome and a defined mitigation.

Written by the indexing model from the issue text.

Assessment

Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.