[CK Tile] UniversalGemmKernel silently rejects D tensors whose layout differs from CLayout

Offen
#3,766 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp
Bereich
backend, performance

Rechercherichtung

Start with universal_gemm_kernel.hpp:581-584 and cshuffle_epilogue.hpp:782, then compare the legacy GridwiseGemmMultiD row/column scale handling and the QuantGemmKernel RowColQuant path. Use a CK_TILE_LOGGING run to observe the current rejection. Done means either the D layout is supported in the CShuffle epilogue, the rejection identifies the D index and layout, or the supported RowColQuant route is documented.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

universal_gemm_kernel.hpp:581-584 rejects any D tensor whose layout is not CLayout — and does so silently: no log line, no assert message, the kernel simply does not run. Localizing it took a CK_TILE_LOGGING run plus a source read.

This blocks a natural and otherwise-supported composition: a weight-preshuffled GEMM plus a per-token/per-channel scale epilogue, expressed as two broadcast D tensors —

  • D0 = per-token A scale: an M-vector, ColumnMajor, stride 0 in N
  • D1 = per-channel B scale: an N-vector, RowMajor, stride 0 in M

D1 is accepted; D0 is not, because its layout differs from CLayout. Independently, cshuffle_epilogue.hpp:782 wraps every D window with the (M, N) distribution and has no handling for a column-layout D.

This is exactly the architecture CK's own legacy XDL path ships (GridwiseGemmMultiD with row/col scale Ds), so the operation is well-precedented; only the CK Tile universal path can't express it.

Asks, in increasing order of effort:

  1. make the rejection loud (a static_assert message or a log line naming the offending D index and layout);
  2. relax the check and add column-layout D distribution handling in the CShuffle epilogue;
  3. or, if RowColQuant is the intended route for this shape of problem, document that — it works (see the QuantGemmKernel RowColQuant path) and it is not obvious from the examples.

Context: found while wiring per-token/per-channel FP8 GEMMs on gfx950; the RowColQuant + weight-preshuffle route works and measured +8-11% over the flatmm path at three GEMM shapes, so the composition is worth having.

Vorherrschende Sprache
C++
Sterne
552
Forks
316
Ø Merge
3 T. 14 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ROCm/composable_kernel

Alle Issues in ROCm/composable_kernel

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.