Skip to content

fix(asr): fallback to CPU after Foundry CUDA failure - #945

Open
H-Chris233 wants to merge 2 commits into
Open-Less:betafrom
H-Chris233:beta
Open

fix(asr): fallback to CPU after Foundry CUDA failure#945
H-Chris233 wants to merge 2 commits into
Open-Less:betafrom
H-Chris233:beta

Conversation

@H-Chris233

@H-Chris233 H-Chris233 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

摘要

  • 每次录音仍先使用 Foundry SDK 为 alias 选择的 primary variant;CPU 仅作为当前录音的临时兜底。
  • 仅当 primary 为 DeviceType::GPU、EP 为 CUDAExecutionProvider,且错误命中现有 CUDNN 白名单时回退一次;WinML 核显、NPU、CPU 与其他错误不回退。
  • CPU 重试失败分片并覆盖后续分片;下一次录音重新使用回退前的 exact primary,失效时交回 SDK 按 alias 重选。
  • primary 与 loaded 状态分离,并使用 route epoch 阻止旧恢复/释放任务覆盖新录音、模型设置或 provider 路由。
  • 听写、QA、叠加 QA 均支持取消 CPU 查询、下载、加载与推理;取消静默退出且不启动 primary 后台恢复。
  • keep_loaded_secs > 0 时异步恢复 primary,且恢复耗时不延长原保活窗口;0 秒时留待下一次录音重载。

验证

  • cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml
  • cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml foundry -- --nocapture(55 passed)
  • cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml coordinator:: -- --test-threads=1(178 passed)
  • rustfmt --edition 2021 --check(6 个改动 Rust 文件)
  • git diff --check

Fixes #941

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[asr] 使用foundry local whisper时转写失败

1 participant