Skip to content
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5b8d025
ci(ck-tile): add DISPATCHER CI stage for universal GEMM
ThruptiRajLakshmanaGowda Aug 17, 2026
de5766c
ci(ck-tile): add dispatcher universal GEMM search space runner
ThruptiRajLakshmanaGowda Aug 17, 2026
538f4eb
refactor(ck-tile): inline search space logic into runner, remove extr…
ThruptiRajLakshmanaGowda Aug 17, 2026
f5288f4
fix(ck-tile): remove unused DISPATCHER_GEMM_BUDGET CMake var
ThruptiRajLakshmanaGowda Aug 17, 2026
e62b9dd
fix(ck-tile): fix dispatcher CI stage correctness issues
ThruptiRajLakshmanaGowda Aug 17, 2026
25a56b7
style(ck-tile): use result.tflops and result.max_rel directly in runner
ThruptiRajLakshmanaGowda Aug 17, 2026
ff9b8e9
fix(ck-tile): rename run_gemm_search_space.py to satisfy unit-test check
ThruptiRajLakshmanaGowda Aug 18, 2026
94a7827
ci(ck-tile): extend dispatcher CI to cover all ops on gfx942 and gfx950
ThruptiRajLakshmanaGowda Aug 18, 2026
dce2d6f
ci(ck-tile): add dispatcher gemm_universal CI stage for gfx942
ThruptiRajLakshmanaGowda Aug 19, 2026
b471ea8
ci(ck-tile): rename RUN_DISPATCHER_GEMM_UNIVERSAL_TESTS to RUN_DISPAT…
ThruptiRajLakshmanaGowda Aug 19, 2026
b83e435
ci(ck-tile): extend runDispatcherGemmTests to cover batched_gemm and …
ThruptiRajLakshmanaGowda Aug 19, 2026
4c0f0a3
ci(ck-tile): extend dispatcher CI to grouped, multi_d, multi_abd, str…
ThruptiRajLakshmanaGowda Aug 19, 2026
ca79713
fix(ck-tile): correct fp8/bf8 reference, fail on build errors, fix ar…
ThruptiRajLakshmanaGowda Aug 19, 2026
6c095c3
ci(ck-tile): archive gemm-lane JSON, drop redundant gfx950 wrapper
ThruptiRajLakshmanaGowda Aug 19, 2026
3ba53eb
ci(ck-tile): add grouped rowcolquant/tensorquant GPU correctness to g…
ThruptiRajLakshmanaGowda Aug 20, 2026
387db2b
refactor(ck-tile): clarify dispatcher CI parameter names
ThruptiRajLakshmanaGowda Aug 24, 2026
58bce77
refactor(ck-tile): drop duplicated correctness tests from the perf lane
ThruptiRajLakshmanaGowda Aug 24, 2026
85a0f76
ci(ck-tile): split dispatcher CI into smoke and daily tiers
ThruptiRajLakshmanaGowda Aug 24, 2026
f99bb70
fix(ck-tile): match aquant hipcc defines to bquant, correct stale str…
ThruptiRajLakshmanaGowda Aug 25, 2026
6463808
test(ck-tile): add GPU correctness tests for stream-K and aquant GEMM
ThruptiRajLakshmanaGowda Aug 25, 2026
f13b9ea
ci(ck-tile): register bridge GPU correctness tests in ctest and daily…
ThruptiRajLakshmanaGowda Aug 25, 2026
84d70eb
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Aug 25, 2026
c9e7c00
test(ck-tile): add GPU correctness test for ABQuant grouped GEMM
ThruptiRajLakshmanaGowda Aug 25, 2026
8d9c849
ci(ck-tile): extend dispatcher smoke lane to all 11 develop operators
ThruptiRajLakshmanaGowda Aug 25, 2026
1d17f74
ci(ck-tile): add rowcolquant and tensorquant to the dispatcher smoke …
ThruptiRajLakshmanaGowda Aug 25, 2026
df4cd47
ci(ck-tile): add gemm_streamk/aquant/bquant to dispatcher perf lane
ThruptiRajLakshmanaGowda Aug 25, 2026
07d1ab4
ci(ck-tile): drop the daily dispatcher lanes as out of scope
ThruptiRajLakshmanaGowda Aug 26, 2026
87cf063
ci(ck-tile): stop the dispatcher lane reporting false greens
ThruptiRajLakshmanaGowda Aug 26, 2026
c164dd4
fix(ck-tile): make the dispatcher fp8/bf8 encoding follow the target …
ThruptiRajLakshmanaGowda Aug 26, 2026
808d6c4
ci(ck-tile): run Stream-K on gfx950
ThruptiRajLakshmanaGowda Aug 26, 2026
0dce8b6
test(ck-tile): exercise all four Multi-D GEMM layouts
ThruptiRajLakshmanaGowda Aug 26, 2026
818e095
test(ck-tile): exercise bf16 and fp32 in the batched-contraction GPU …
ThruptiRajLakshmanaGowda Aug 26, 2026
c551871
ci(ck-tile): run ABQuant correctness on gfx942
ThruptiRajLakshmanaGowda Aug 26, 2026
38b0f13
ci(ck-tile): run AQuant correctness on gfx942
ThruptiRajLakshmanaGowda Aug 27, 2026
0a04c2f
ci(ck-tile): run BQuant C4 on gfx942; gate H3 (mx_*) to gfx950
ThruptiRajLakshmanaGowda Aug 27, 2026
3af0a3b
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 1, 2026
1c72d8a
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 1, 2026
db6becf
ci(ck-tile): benchmark all 13 dispatcher operators in the perf lane
ThruptiRajLakshmanaGowda Sep 1, 2026
69e0df2
fix(ck-tile): make dispatcher CI lanes configure, skip honestly, and …
ThruptiRajLakshmanaGowda Sep 2, 2026
7d3e269
docs(ck-tile): correct the bquant arch claim in the coverage summary
ThruptiRajLakshmanaGowda Sep 2, 2026
1914a6a
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 2, 2026
ef5618a
Code Cleanup
ThruptiRajLakshmanaGowda Sep 2, 2026
53f7886
Enabling manual trigger for CI Phases
ThruptiRajLakshmanaGowda Sep 2, 2026
b0b7cc4
Changes to Jenkins and Groovy
ThruptiRajLakshmanaGowda Sep 2, 2026
0ece186
Changes to Jenkins file
ThruptiRajLakshmanaGowda Sep 2, 2026
bb6f1a3
refactor(ck-tile): merge dispatcher CI stages into one parallel block
ThruptiRajLakshmanaGowda Sep 2, 2026
d9cc5b3
refactor(ck-tile): clean up dispatcher CI params and switch cases
ThruptiRajLakshmanaGowda Sep 2, 2026
1d4c188
fix(ck-tile): move dispatcher parallel stages to ck.groovy to fix Met…
ThruptiRajLakshmanaGowda Sep 2, 2026
ed95e48
fix(ck-tile): move downstream/FMHA/build-CK parallel stages to ck.groovy
ThruptiRajLakshmanaGowda Sep 2, 2026
ced0661
fix(ck-tile): pass rocmnode into runDispatcherTests, retire tile_engi…
ThruptiRajLakshmanaGowda Sep 8, 2026
733b24b
fix(ck-tile): make tile_engine benchmark drivers report launch outcomes
ThruptiRajLakshmanaGowda Sep 8, 2026
85a8cd3
fix(ck-tile): fix dispatcher sampler, reach the exit-77 skip path, st…
ThruptiRajLakshmanaGowda Sep 8, 2026
e615e9d
fix(ck-tile): expand DISPATCHER_PERF gfx950 to full operator set
ThruptiRajLakshmanaGowda Sep 8, 2026
1b3b6e4
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 8, 2026
b413908
fix(ck): inline runDownstreamTestsStages into Jenkinsfile
ThruptiRajLakshmanaGowda Sep 8, 2026
51ed93b
fix(ck): inline runFMHATestsStages and runBuildCKStages into Jenkinsfile
ThruptiRajLakshmanaGowda Sep 8, 2026
fbd733c
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 11, 2026
c9b97cb
Merge branch 'develop' into users/tlakshma/ck/dispatcher_ci
ThruptiRajLakshmanaGowda Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion projects/composablekernel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,15 @@ RUN set -x && \
wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && rm dumb-init_*.deb && \
# Install packages for processing the performance results
pip3 install --break-system-packages --upgrade pytest pymysql pandas==2.2.3 sqlalchemy==2.0.3 setuptools-rust setuptools sshtunnel==0.4.0 && \
# ml_dtypes is pinned like its neighbours, and for a sharper reason than most:
# it supplies both float8_e4m3fn/float8_e5m2 (OCP) and float8_e4m3fnuz/
# float8_e5m2fnuz (FNUZ), and the dispatcher tests pick between those pairs per
# arch. An unpinned upgrade would silently move fp8 encoding semantics -- and
# the reference values every parity/correctness test compares against -- from
# under CI on an image rebuild. 0.6.0 is what this image already resolved on
# Ubuntu 24.04 / Python 3.12, so this records current behaviour rather than
# bumping it.
pip3 install --break-system-packages --upgrade pytest pymysql pandas==2.2.3 sqlalchemy==2.0.3 setuptools-rust setuptools sshtunnel==0.4.0 ml_dtypes==0.6.0 && \
# Add render group
groupadd -f render && \
# Install the new rocm-cmake version
Expand Down
580 changes: 164 additions & 416 deletions projects/composablekernel/Jenkinsfile

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,40 @@ def expand_sweep(config: dict, dtype: str = "fp16", layout: str = "rcr") -> List
return out


def default_fp16_config(gfx_arch: Optional[str] = None) -> BatchedContractionKernelConfig:
# Warp tile per dtype, chosen from the XDL allow-list in is_valid(). fp16 and
# bf16 share the same MFMA shape; fp32 has no 32x32x16 instruction and needs
# 32x32x8 instead. Picking a shape outside the allow-list is not an error you
# would notice -- is_valid() just returns False and the config is silently
# dropped from the sweep (test_batched_contraction_bridge.py asserts exactly
# that), so a "default" config with the wrong tile would look like a dtype that
# simply has no instances.
_DEFAULT_WARP_TILE = {
"fp16": (32, 32, 16),
"bf16": (32, 32, 16),
"fp32": (32, 32, 8),
}


def default_config(
dtype: str = "fp16", gfx_arch: Optional[str] = None
) -> BatchedContractionKernelConfig:
"""A known-valid single config for ``dtype``, for smoke tests and defaults."""
try:
wt_m, wt_n, wt_k = _DEFAULT_WARP_TILE[dtype]
except KeyError:
raise ValueError(
f"no default warp tile for dtype {dtype!r}; "
f"known: {', '.join(sorted(_DEFAULT_WARP_TILE))}"
) from None
gfx_arch = _validate_arch(gfx_arch) if gfx_arch else _get_arch()
return BatchedContractionKernelConfig(
dtype="fp16", layout="rcr", pipeline="compv3", epilogue="cshuffle", scheduler="intrawave",
dtype=dtype, layout="rcr", pipeline="compv3", epilogue="cshuffle", scheduler="intrawave",
tile_m=128, tile_n=128, tile_k=64, warp_m=2, warp_n=2, warp_k=1,
warp_tile_m=32, warp_tile_n=32, warp_tile_k=16,
warp_tile_m=wt_m, warp_tile_n=wt_n, warp_tile_k=wt_k,
num_dim_g=1, num_dim_m=1, num_dim_n=1, num_dim_k=1, gfx_arch=gfx_arch,
)


def default_fp16_config(gfx_arch: Optional[str] = None) -> BatchedContractionKernelConfig:
"""Thin alias kept for existing callers; prefer :func:`default_config`."""
return default_config("fp16", gfx_arch=gfx_arch)
114 changes: 114 additions & 0 deletions projects/composablekernel/dispatcher/python/dispatcher_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,120 @@ def detect_gpu_arch(fallback: str = "gfx942") -> str:
return fallback


# ============================================================================
# fp8 / bf8 encoding format per architecture
# ============================================================================
#
# CK has two incompatible 8-bit float encodings and picks between them per arch:
#
# OCP (gfx950, gfx12): e4m3fn / e5m2 -- exponent bias 7 / 15
# FNUZ (everything else, notably gfx942): e4m3fnuz / e5m2fnuz -- bias 8 / 16
#
# include/ck_tile/core/config.hpp:361-371 resolves this at compile time, but only
# the *device* pass sees __gfx950__; the host pass of the very same header falls
# back to FNUZ. So a host-side reference encoder that guesses from the header ends
# up disagreeing with the kernel it is validating. Every caller must therefore
# decide from the target arch string, and pass -DCK_TILE_USE_OCP_FP8 explicitly so
# both compiler passes agree. These helpers are the single source of truth for
# both halves of that contract.


def normalize_arch(arch: Optional[str]) -> str:
"""Lowercase `arch` and strip the target-feature suffix, if any.

rocminfo, hipcc and the HSA runtime all hand back full target triples --
``gfx950:sramecc+:xnack-`` -- while configs, CI parameters and these helpers
are written in terms of the bare name. Every arch predicate below matches on
a prefix, so a triple happens to survive unnormalized, but anything carrying
a leading component (an ``amdgcn-amd-amdhsa--gfx950`` offload target, say)
silently falls through to the FNUZ default. That miss drops
``-DCK_USE_OCP_FP8``, and host and device then disagree on the fp8 encoding
with no diagnostic at all -- the kernel builds and returns wrong numbers.

Normalizing in one place, up front, is what keeps that from depending on
which spelling of the arch a given caller happened to be handed.
"""
a = (arch or "").lower().strip()
# Feature suffix: gfx950:sramecc+:xnack- -> gfx950
a = a.split(":", 1)[0]
# Offload-target prefix: amdgcn-amd-amdhsa--gfx950 -> gfx950
idx = a.rfind("gfx")
return a[idx:] if idx > 0 else a


def fp8_uses_ocp(arch: Optional[str]) -> bool:
"""True iff `arch` uses the OCP fp8/bf8 encoding rather than FNUZ.

Mirrors the __gfx950__ / __gfx12__ test in include/ck_tile/core/config.hpp.
Use this to select the host-side codec (ml_dtypes.float8_e4m3fn vs
float8_e4m3fnuz) so it matches the bytes the kernel actually produces.

Accepts bare names and full target triples alike; see `normalize_arch`.
"""
a = normalize_arch(arch)
return a.startswith("gfx950") or a.startswith("gfx12")


def ocp_arch_defines(arch: Optional[str]) -> List[str]:
"""hipcc defines that pin the fp8/bf8 encoding for `arch`.

Returned for OCP archs only; FNUZ is the default for both compiler passes and
needs no define. Passing these makes the host pass agree with the device pass
instead of silently falling back to FNUZ.
"""
if not fp8_uses_ocp(arch):
return []
return ["-DCK_USE_OCP_FP8", "-DCK_TILE_USE_OCP_FP8"]


def arch_feature_defines(arch: Optional[str]) -> List[str]:
"""`ocp_arch_defines` plus the per-arch feature-enablement defines.

The top-level CMakeLists.txt (:456-512) sets these for a normal build; they
are absent in the standalone hipcc JIT path, so any bridge that compiles a
kernel out-of-tree has to re-supply them. This mirrors that block for the
arches the dispatcher targets:

gfx950 -> CK_USE_NATIVE_MX_SUPPORT, CK_GFX950_SUPPORT
gfx1250 -> CK_USE_GFX1250, CK_USE_NATIVE_MX_SUPPORT, CK_GFX1250_SUPPORT
gfx11/gfx12 -> CK_TILE_USE_WMMA=1 (gfx12 also CK_GFX12_SUPPORT)

CK_TILE_USE_WMMA is the one that must be passed even when it is 0: CMake
always defines it (:480), and the JIT path leaving it undefined only happens
to work because the preprocessor reads an undefined identifier as 0, which is
the right answer on gfx942/gfx950 and the wrong one on every WMMA part.

CK_USE_GFX950 is deliberately *not* emitted -- CMake sets it, but it is read
only by the legacy ck/library conv instances, never by ck_tile, so it is
dead weight on this path.

On the warp tile: these defines do select the branch of
tile_gemm_shape.hpp get_k_warp_tile() (CK_TILE_USE_WMMA outermost, then
CK_USE_GFX1250 / CK_GFX950_SUPPORT), but the emitted kernels never *call*
that function -- codegen writes a literal warp_tile_k, mirroring it in Python
via codegen_common.fp8_warp_tile_k_for_arch. The hazard is therefore a
mismatch between that literal and the warp-gemm the target arch actually has:
there is no 16x16x128 fp8 warp-gemm on gfx942, and asking for one compiles
cleanly and returns all zeros. Keep warp_tile_k arch-aware alongside these
defines, and derive it from the one helper rather than a local copy.
"""
a = normalize_arch(arch)
defines = ocp_arch_defines(arch)
if a.startswith("gfx950"):
defines = defines + ["-DCK_USE_NATIVE_MX_SUPPORT", "-DCK_GFX950_SUPPORT"]
elif a.startswith("gfx11") or a.startswith("gfx12"):
defines = defines + ["-DCK_TILE_USE_WMMA=1"]
if a.startswith("gfx12"):
defines = defines + ["-DCK_GFX12_SUPPORT"]
if a.startswith("gfx1250"):
defines = defines + [
"-DCK_USE_GFX1250",
"-DCK_USE_NATIVE_MX_SUPPORT",
"-DCK_GFX1250_SUPPORT",
]
return defines


# ============================================================================
# Architecture Filter Data
# ============================================================================
Expand Down
Loading
Loading