Skip to content

[release/2.13] [ROCm] Consolidate CK GEMM arch gating into a single allow-list - #3979

Merged
pragupta merged 1 commit into
ROCm:release/2.13from
alugorey:allowlist_2.13
Nov 9, 2026
Merged

pragupta merged 1 commit into
ROCm:release/2.13from
alugorey:allowlist_2.13

Conversation

@alugorey

@alugorey alugorey commented Nov 9, 2026 •

Copy link
Copy Markdown

Backport of the CK GEMM single-source allow-list to release/2.13. Replaces the gfx1250 blacklist (list(REMOVE_ITEM ... gfx1250 gfx1250-strict)) with a single CMake cache variable TORCH_CK_GEMM_ARCH_LIST (default gfx90a;gfx942;gfx950) that drives the ck_gemm build arch filter (torch_filter_ck_gemm_arches) and is surfaced to C++ via a generated ATen/ROCmCKGEMMConfig.h header.

release/2.13 predates the CK SDPA/GEMM gating split (upstream pytorch#187267) and had no ckGemmSupported() -- only a combined ckSupported(). This adds Context::ckGemmSupported() (parsing TORCH_CK_GEMM_ARCH_LIST via a shared parseArchList helper) and routes the CK blas-backend gate through it, leaving the CK SDPA / flash-attention gates on ckSupported(). The ck_gemm_{half,bfloat16}.hip dispatch calls at::globalContext().ckGemmSupported() instead of an isGPUArch({"gfx9"}) prefix check. TORCH_CK_GEMM_ARCH_LIST is forwarded from the environment via cmake/EnvVarForwarding.cmake.

Squashed backport of upstream pytorch/pytorch pytorch#200307 (base allow-list) and pytorch#201113 (TORCH_CK_GEMM_ARCH_LIST consolidation).

Once these are merged need to revert ROCm/TheRock#9414

Backport of the CK GEMM single-source allow-list to release/2.13. Replaces the
gfx1250 blacklist (list(REMOVE_ITEM ... gfx1250 gfx1250-strict)) with a single
CMake cache variable TORCH_CK_GEMM_ARCH_LIST (default gfx90a;gfx942;gfx950) that
drives the ck_gemm build arch filter (torch_filter_ck_gemm_arches) and is
surfaced to C++ via a generated ATen/ROCmCKGEMMConfig.h header.

release/2.13 predates the CK SDPA/GEMM gating split (upstream pytorch#187267) and had no
ckGemmSupported() -- only a combined ckSupported(). This adds
Context::ckGemmSupported() (parsing TORCH_CK_GEMM_ARCH_LIST via a shared
parseArchList helper) and routes the CK blas-backend gate through it, leaving the
CK SDPA / flash-attention gates on ckSupported(). The ck_gemm_{half,bfloat16}.hip
dispatch calls at::globalContext().ckGemmSupported() instead of an
isGPUArch({"gfx9"}) prefix check. TORCH_CK_GEMM_ARCH_LIST is forwarded from the
environment via cmake/EnvVarForwarding.cmake.

Squashed backport of upstream pytorch/pytorch pytorch#200307 (base allow-list) and
pytorch#201113 (TORCH_CK_GEMM_ARCH_LIST consolidation).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@pragupta pragupta changed the title [ROCm] Consolidate CK GEMM arch gating into a single allow-list [release/2.13] [ROCm] Consolidate CK GEMM arch gating into a single allow-list Nov 9, 2026
@pragupta
pragupta marked this pull request as ready for review November 9, 2026 19:40
@pragupta
pragupta merged commit 958b71a into ROCm:release/2.13 Nov 9, 2026
4 checks passed
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.

2 participants