Skip to content

vulkan: Divide GROUP_NORM workgroup to 2D to avoid maxComputeWorkGroupCount limit - #31930

Merged
0cc4m merged 2 commits into
ggml-org:masterfrom
rillomas:fix-group-norm-crash
Nov 10, 2026
Merged

0cc4m merged 2 commits into
ggml-org:masterfrom
rillomas:fix-group-norm-crash

Conversation

@rillomas

@rillomas rillomas commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Overview

Fixes #31926. We are dividing the GROUP_NORM workgroup to 2D to avoid maxComputeWorkGroupCount limit on Windows Intel GPU.

Additional information

Requirements

@github-actions github-actions Bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Nov 9, 2026
@rillomas rillomas changed the title Divide GROUP_NORM workgroup to 2D to avoid maxComputeWorkGroupCount limit vulkan: Divide GROUP_NORM workgroup to 2D to avoid maxComputeWorkGroupCount limit Nov 9, 2026
@rillomas
rillomas marked this pull request as ready for review November 9, 2026 08:20
@rillomas
rillomas requested a review from a team as a code owner November 9, 2026 08:20

@ServeurpersoCom ServeurpersoCom left a comment

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.

Tested on Vulkan with an RTX PRO 6000 in a rootless container, with maxComputeWorkGroupCount capped at 65535 to match the Intel runner: without this PR GROUP_NORM ne=[3,1,1,65537] hits the same GGML_ASSERT as the CI, and with it the dispatch splits into 65535 x 2 and all GROUP_NORM cases pass.

This fixes the GROUP_NORM assert currently failing gpu-vulkan-intel-windows on master (and gpu-vulkan-intel-linux on #31890), the Apple failure being handled by #31890. I started the CI on this PR: the Intel jobs still need to finish green, which they most likely will.

Note: reusing ggml_vk_nrows_elements would also work here and keep the same 512 x 512 grid and row index as the other per-row ops, at most 511 idle workgroups instead of up to ~65k on a 65535 limit, but both are correct.

@jeffbolznv jeffbolznv left a comment

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.

LGTM, but I didn't test.

@ggerganov

Copy link
Copy Markdown
Member

@0cc4m Bump - would be nice clear the CI error.

@0cc4m
0cc4m merged commit 3837bf0 into ggml-org:master Nov 10, 2026
30 of 31 checks passed
@BrewTestBot BrewTestBot mentioned this pull request Nov 13, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: GROUP_NORM unit test triggers GGML_ASSERT for Vulkan on Windows Intel GPU

5 participants