Skip to content

[ROCm] Guard ck_group_gemm on USE_ROCM_CK_GEMM - #182615

Closed
jeffdaily wants to merge 1 commit into
mainfrom
jeffdaily/grouped-mm-ck-gemm-guard
Closed

jeffdaily wants to merge 1 commit into
mainfrom
jeffdaily/grouped-mm-ck-gemm-guard

Conversation

@jeffdaily

@jeffdaily jeffdaily commented May 6, 2026 •

Copy link
Copy Markdown
Collaborator

On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included ck_group_gemm.h and emitted a source-level reference to at::hip::detail::group_gemm_ck(...) inside an always-false if (use_fast_path) branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination hid the unresolved symbol), but the Windows build under enable_language(HIP) in #180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace the bool indirection with explicit #if defined(USE_ROCM_CK_GEMM) / #else, so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from #180485 per @malfet review.

Authored with Claude Code.

cc @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included
ck_group_gemm.h and emitted a source-level reference to
at::hip::detail::group_gemm_ck(...) inside an always-false `if (use_fast_path)`
branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination
hid the unresolved symbol), but the Windows build under enable_language(HIP)
in #180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace
the bool indirection with explicit `#if defined(USE_ROCM_CK_GEMM)` / `#else`,
so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from #180485 per @malfet review.

Authored with Claude Code.
@pytorch-bot

pytorch-bot Bot commented May 6, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182615

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Cancelled Job

As of commit f54973f with merge base 3222b7c (image):

CANCELLED JOB - The following job was cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added ciflow/b200 ciflow/h100 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 module: rocm AMD GPU support for Pytorch labels May 6, 2026
@pytorch-bot

pytorch-bot Bot commented May 6, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@jeffdaily
jeffdaily requested a review from malfet May 6, 2026 05:41
@jeffdaily jeffdaily added the release notes: rocm mandatorylabel label May 6, 2026
@jeffdaily jeffdaily added the ciflow/trunk Trigger trunk jobs on your pull request label May 6, 2026
@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -f "forcing due to canceled unnecessary H100 job; all other CI ok"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included ck_group_gemm.h and emitted a source-level reference to at::hip::detail::group_gemm_ck(...) inside an always-false `if (use_fast_path)` branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination hid the unresolved symbol), but the Windows build under enable_language(HIP) in pytorch#180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace the bool indirection with explicit `#if defined(USE_ROCM_CK_GEMM)` / `#else`, so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from pytorch#180485 per @malfet review.

Authored with Claude Code.

Pull Request resolved: pytorch#182615
Approved by: https://github.com/malfet
@github-actions
github-actions Bot deleted the jeffdaily/grouped-mm-ck-gemm-guard branch June 6, 2026 02:29
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included ck_group_gemm.h and emitted a source-level reference to at::hip::detail::group_gemm_ck(...) inside an always-false `if (use_fast_path)` branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination hid the unresolved symbol), but the Windows build under enable_language(HIP) in pytorch#180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace the bool indirection with explicit `#if defined(USE_ROCM_CK_GEMM)` / `#else`, so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from pytorch#180485 per @malfet review.

Authored with Claude Code.

Pull Request resolved: pytorch#182615
Approved by: https://github.com/malfet
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included ck_group_gemm.h and emitted a source-level reference to at::hip::detail::group_gemm_ck(...) inside an always-false `if (use_fast_path)` branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination hid the unresolved symbol), but the Windows build under enable_language(HIP) in pytorch#180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace the bool indirection with explicit `#if defined(USE_ROCM_CK_GEMM)` / `#else`, so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from pytorch#180485 per @malfet review.

Authored with Claude Code.

Pull Request resolved: pytorch#182615
Approved by: https://github.com/malfet
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
On ROCm builds with USE_ROCM_CK_GEMM=OFF, GroupedBlas.cpp still included ck_group_gemm.h and emitted a source-level reference to at::hip::detail::group_gemm_ck(...) inside an always-false `if (use_fast_path)` branch. The Linux/legacy-CMake build path tolerated this (dead-code-elimination hid the unresolved symbol), but the Windows build under enable_language(HIP) in pytorch#180485 surfaces it as a linker failure.

Gate the include and the call site uniformly on USE_ROCM_CK_GEMM and replace the bool indirection with explicit `#if defined(USE_ROCM_CK_GEMM)` / `#else`, so the fallback path is the only thing the compiler sees when CK is disabled.

Split out from pytorch#180485 per @malfet review.

Authored with Claude Code.

Pull Request resolved: pytorch#182615
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/b200 ciflow/h100 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/trunk Trigger trunk jobs on your pull request Merged module: rocm AMD GPU support for Pytorch open source release notes: rocm mandatorylabel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants