Skip to content

model: enable HIP backend for Vibe Voice TTS - #168

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:vibevoice-hip-backend
Jul 31, 2026
Merged

model: enable HIP backend for Vibe Voice TTS#168
0xShug0 merged 1 commit into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:vibevoice-hip-backend

Conversation

@IIIIIllllIIIIIlllll

Copy link
Copy Markdown
Contributor

Summary

Removes the ROCm/HIP restriction for VibeVoice TTS after validation on AMD hardware:

  • src/models/vibevoice/session.cpp: add BackendType::Hip to the session
    backend whitelist; align the voice prompt duration cap with CUDA (30 s).
  • src/framework/modules/conv_modules.cpp: enable the conv-transpose1d
    col2im fast path for HIP (used by the VibeVoice acoustic decoder).
  • docs/HIP.md: move VibeVoice TTS out of the "not yet enabled" list and
    record the validation results.

Validation (gfx1151 / Strix Halo iGPU, ROCm 7.14, Linux)

  • Prompt-side fingerprints (text encoding, acoustic encoder, prompt
    embeddings, prefill logits + top-5) match CPU and CUDA within ~1e-3
    relative float noise.
  • ggml test-backend-ops on ROCm0: 11953 OK / 0 FAIL.
  • CUDA graphs on/off and op fusion on/off produce bit-identical output.
  • End-to-end TTS generation works and produces clean audio.

Note on numerical parity: with identical inputs (same seed + injected
diffusion noise), HIP, CUDA, and CPU all agree for the first ~34
autoregressive steps, then diverge at a near-tie argmax step. Crucially,
CUDA diverges from CPU the same way (one step earlier than HIP), so
this is inherent bf16 summation-order noise amplified by autoregressive
generation — not a HIP-specific defect.

AI usage : I reviewed the VibeVoice logic, designed a workflow, and had Kimi K3 run tests separately on my servers (equipped with 2080TI, 3090, and GFX1151). I confirmed that there are no significant differences between the HIP and CUDA backends.

Output:
out_hip.wav

Allow the VibeVoice session on the HIP backend and align its voice
prompt cap with CUDA (30 s), and enable the conv-transpose1d col2im
fast path for HIP.

Validated on gfx1151 (ROCm 7.14, Linux):
- prompt-side fingerprints (text encoding, acoustic encoder, prompt
  embeddings, prefill logits/top-5) match CPU/CUDA within ~1e-3
  relative float noise
- ggml test-backend-ops passes 11953/11953 on ROCm0
- residual end-to-end divergence vs CPU is the same chaotic argmax
  amplification that CUDA shows vs CPU, not a HIP-specific defect
@IIIIIllllIIIIIlllll IIIIIllllIIIIIlllll changed the title vibevoice: enable HIP backend for TTS sessions model: enable HIP backend for Vibe Voice TTS Jul 31, 2026
Comment on lines 47 to 53
if (options.backend.type != engine::core::BackendType::Cpu &&
options.backend.type != engine::core::BackendType::Cuda &&
options.backend.type != engine::core::BackendType::Hip &&
options.backend.type != engine::core::BackendType::Vulkan &&
options.backend.type != engine::core::BackendType::Metal) {
throw std::runtime_error("VibeVoice session supports only CPU, CUDA, Vulkan, and Metal backends");
throw std::runtime_error("VibeVoice session supports only CPU, CUDA, HIP, Vulkan, and Metal backends");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given these are all the backends, can we just remove this check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, that's how the original author wrote it, and I didn't change it.

@0xShug0
0xShug0 merged commit 788253b into 0xShug0:main Jul 31, 2026
4 checks passed
@0xShug0

0xShug0 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

@IIIIIllllIIIIIlllll Merged, thanks!

mpulukkinen pushed a commit to mpulukkinen/audio.cpp that referenced this pull request Aug 2, 2026
Allow the VibeVoice session on the HIP backend and align its voice
prompt cap with CUDA (30 s), and enable the conv-transpose1d col2im
fast path for HIP.

Validated on gfx1151 (ROCm 7.14, Linux):
- prompt-side fingerprints (text encoding, acoustic encoder, prompt
  embeddings, prefill logits/top-5) match CPU/CUDA within ~1e-3
  relative float noise
- ggml test-backend-ops passes 11953/11953 on ROCm0
- residual end-to-end divergence vs CPU is the same chaotic argmax
  amplification that CUDA shows vs CPU, not a HIP-specific defect
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.

3 participants