Skip to content

Fix composable_kernel build with CMake 4.x (ROCM-24848)#4903

Merged
causten merged 1 commit into
developfrom
fix/ck-cmake-policy-version-minimum
May 27, 2026
Merged

Fix composable_kernel build with CMake 4.x (ROCM-24848)#4903
causten merged 1 commit into
developfrom
fix/ck-cmake-policy-version-minimum

Conversation

@srinivamd
Copy link
Copy Markdown
Contributor

@srinivamd srinivamd commented May 21, 2026

Summary

Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to the composable_kernel entry in requirements.txt, fixing the cget build failure with CMake 4.x.

Problem

TheRock 7.14.0 ships CMake 4.x, which removed compatibility with cmake_minimum_required < 3.5. When rbuild build -d depend runs cget install for the pinned ROCm/composable_kernel revision (ad0db05...), the build fails:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

The -DCMAKE_POLICY_VERSION_MINIMUM=3.5 flag on the top-level rbuild command is not forwarded by cget to dependency builds.

Fix

PR #4714 already added -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to the protobuf, nlohmann/json, and msgpack entries in requirements.txt. This PR applies the same pattern to the composable_kernel entry.

Jira

Fixes ROCM-24848 — torch-migraphx image build fails on TheRock 7.14.0 (MI300/MI350, UB22/UB24).

Test

Build MIGraphX dependencies with CMake 4.x:

rbuild build -d depend -DBUILD_TESTING=Off

The composable_kernel dependency should now configure successfully.

CMake 4.x (shipped in TheRock 7.14.0) removed compatibility with
cmake_minimum_required < 3.5. The pinned composable_kernel revision
(ad0db05) still declares an older minimum, causing cget builds to fail.

This matches the existing pattern used for protobuf, nlohmann/json,
and msgpack (added in PR #4714).

Fixes: ROCM-24848
@srinivamd srinivamd requested a review from causten as a code owner May 21, 2026 07:31
@causten causten requested a review from music-dino May 25, 2026 14:08
@causten causten requested a review from kentqian May 25, 2026 14:09
@causten causten merged commit 134a255 into develop May 27, 2026
38 checks passed
@causten causten deleted the fix/ck-cmake-policy-version-minimum branch May 27, 2026 21:15
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.

3 participants