Skip to content

Replace legacy HGEMM kernels with gfx950 A16W16 universe GEMM - #975

Draft
xytpai wants to merge 1 commit into
mainfrom
xyt/hgemm_layout
Draft

Replace legacy HGEMM kernels with gfx950 A16W16 universe GEMM#975
xytpai wants to merge 1 commit into
mainfrom
xyt/hgemm_layout

Conversation

@xytpai

@xytpai xytpai commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

The existing HGEMM implementation was fragmented across separate split-K and small-M kernels, creating duplicated logic and maintenance overhead. This PR consolidates them into a single gfx950 A16W16 universe GEMM supporting FP16/BF16, all tensor layouts, split-K, slice-K, small-M, and HTI paths, with unified tests and benchmarks.

Supported Features

  • gfx950 target
  • FP16 and BF16 inputs
  • Input-dtype or FP32 output
  • Optional bias
  • NN, NT, TN, and TT layouts
  • Dynamic shapes and leading strides
  • Padded strides and storage offsets
  • Configurable M/N/K tile sizes
  • Configurable pipeline stages
  • Configurable M/N/K wave decomposition
  • Workgroup-local slice-K via k_waves
  • Cross-workgroup split-K with atomic reduction
  • K-tail and split-partition tail handling
  • Small-M and boundary-tile handling
  • Half-tile interleaved scheduling
  • Direct global-to-LDS asynchronous loads
  • Swizzled and transposed LDS layouts
  • Vectorized C-shuffle and global stores
  • Packed FP16/BF16 atomic accumulation
  • XCD-aware block swizzle
  • Configurable group_m
  • Layout-dynamic compilation cache
  • Correctness, padded-stride, and benchmark coverage

@xytpai
xytpai marked this pull request as draft August 6, 2026 10:50
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