Skip to content

fix(rocm): avoid SIMT workgroup-count resonance#2012

Merged
matthewdouglas merged 4 commits into
bitsandbytes-foundation:mainfrom
sstamenk:worktree-camping-mainline
Jul 20, 2026
Merged

fix(rocm): avoid SIMT workgroup-count resonance#2012
matthewdouglas merged 4 commits into
bitsandbytes-foundation:mainfrom
sstamenk:worktree-camping-mainline

Conversation

@sstamenk

Copy link
Copy Markdown
Contributor

Add one bounds-checked workgroup when a large HIP SIMT grid is an exact multiple of 256, avoiding scheduler underutilization observed on RDNA3 and RDNA4.

The extra workgroup is guarded and does no work:
csrc/gemm_4bit_simt.cu#L196-L197

if (warp_n >= N)
    return;

This addresses the suboptimal performance on certain shapes that was originally noticed in #1979 and achieves up to 3.5x performance improvement at M=1 for specific shapes across fp16, bf16 and fp32.

Not exactly sure of the mechanism that causes the lower-than-expected performance.

gfx1201

fp16

gfx1201_fp16_strongest

bf16

gfx1201_bf16_strongest

fp32

gfx1201_fp32_strongest

sstamenk and others added 3 commits July 19, 2026 02:09
Add one bounds-checked workgroup when a large HIP SIMT grid is an exact multiple of 256, avoiding scheduler underutilization observed on RDNA3 and RDNA4.\n\nCo-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@sstamenk
sstamenk force-pushed the worktree-camping-mainline branch from 77a6686 to b06d03a Compare July 20, 2026 12:42
Co-Authored-By: Claude <noreply@anthropic.com>
@matthewdouglas matthewdouglas added this to the v0.50.0 milestone Jul 20, 2026
@github-actions

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@matthewdouglas

Copy link
Copy Markdown
Member

The test failure is unrelated. LGTM, thanks!

@matthewdouglas
matthewdouglas merged commit dde003b into bitsandbytes-foundation:main Jul 20, 2026
85 of 86 checks passed
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.

2 participants