Skip to content

explicitly link hip::host to fix linking issue on Windows - #559

Merged
bsyrowik merged 2 commits into
amd-stagingfrom
users/bsyrowik/rocwmma_cmake_changes
Oct 26, 2026
Merged

bsyrowik merged 2 commits into
amd-stagingfrom
users/bsyrowik/rocwmma_cmake_changes

Conversation

@bsyrowik

@bsyrowik bsyrowik commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

The ROCm 10.2 rocWMMA package requires OpenMP during package discovery. If OpenMP is unavailable, the examples select a header-only fallback that omits HIP’s host runtime dependencies. On Windows, this can leave __truncsfhf2 and __extendhfsf2 unresolved because compiler-rt builtins are missing from the link command.

Related: ROCM-33266

Technical Details

Link the fallback target to hip::host so HIP supplies the required dependencies. Apply this in both the parent rocWMMA project and each sample to cover aggregate and standalone builds.

Test Plan

Test Result

Validation:

  • Windows, TheRock 10.2.0a20261015, Clang 24, Ninja, Release, gfx1103.
  • Reproduced the original simple_hgemm link failure with CMAKE_DISABLE_FIND_PACKAGE_OpenMP=ON.
  • With the fix and OpenMP still disabled, confirmed that clang_rt.builtins-x86_64.lib appears explicitly on the link command and the build succeeds.
  • Linux: built all 11 samples through the parent project with normal package discovery and forced header fallback.

Added/Updated documentation?

  • Yes
  • No, does not apply to this PR.

Included Visual Studio files?

  • Yes
  • No, does not apply to this PR.

Submission Checklist

@bsyrowik
bsyrowik requested a review from a team as a code owner October 22, 2026 23:51

@zichguan-amd zichguan-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please fill in the description before merging

@bsyrowik
bsyrowik merged commit 5f91316 into amd-staging Oct 26, 2026
21 checks passed
@bsyrowik
bsyrowik deleted the users/bsyrowik/rocwmma_cmake_changes branch October 26, 2026 20:53
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