Skip to content

Fix Vulkan RMSNorm dispatch overflow for long voice references - #1120

Merged
0xShug0 merged 1 commit into
mainfrom
fix/vulkan-rmsnorm-row-overflow
Oct 27, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
fix/vulkan-rmsnorm-row-overflow

Conversation

@0xShug0

@0xShug0 0xShug0 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

VibeVoice aborts while encoding a reference longer than 65,535 samples on Vulkan devices with that X workgroup limit. RMSNorm launches one workgroup per row; a 67,200-sample reference therefore requests an invalid dispatch.

Add a row-stride variant for existing RMSNorm and RMSNorm+multiply, selected only when the row count exceeds the device limit. It caps X and processes the remaining rows with the original reduction math, logical row addressing, and a barrier between iterations.

Shapes that fit, including equality with the limit, retain their original pipelines and dispatch dimensions. Their compiled shader binaries are byte-identical to the baseline. The generic dispatcher and other backends are unchanged.

Closes #1114.

Validation

  • Debug C++17 build.
  • 39 correctness checks on llvmpipe and 37 on RTX 5090 Vulkan, compared with CPU. Coverage includes both sides of the dispatch boundary, multiple row iterations, views, in-place output, batches, and full-sized/broadcast multiplier weights.
  • The original backend aborts at 65,536 rows; the patched backend passes. The real VibeVoice reproduction with a 67,200-sample reference completes and writes non-silent audio on llvmpipe, using its actual 65,535 limit. RX 580 hardware was not available.
  • Nine paired VibeVoice WAVs on RTX Vulkan are byte-identical before/after.

Direct Vulkan operation timestamps for fitting tensors (32 F32 columns, 65,535 rows), median of three sequential alternating-order pairs:

Backend Operation Before After
RTX 5090 Vulkan RMSNorm 0.130 ms 0.127 ms
RTX 5090 Vulkan RMSNorm + multiply 0.143 ms 0.140 ms
llvmpipe RMSNorm 213.94 ms 214.28 ms
llvmpipe RMSNorm + multiply 215.08 ms 215.64 ms

These small variations do not establish a performance change. End-to-end RTF is not used for this comparison.

@0xShug0 0xShug0 added the ggml label Oct 27, 2026
@0xShug0
0xShug0 merged commit a536990 into main Oct 27, 2026
7 checks passed
@0xShug0
0xShug0 deleted the fix/vulkan-rmsnorm-row-overflow branch October 29, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulkan: VibeVoice voice_samples longer than ~2.73 s abort with GGML_ASSERT maxComputeWorkGroupCount (ggml-vulkan.cpp:6842) -- AMD RX 580

1 participant