Skip to content

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

Open
sstamenk wants to merge 1 commit into
bitsandbytes-foundation:mainfrom
sstamenk:worktree-camping-mainline
Open

fix(rocm): avoid SIMT workgroup-count resonance#2012
sstamenk wants to merge 1 commit 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

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>
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.

1 participant