Repository navigation
fix: use correct GPU architecture list and HIP linker language - #45
Open
david-salinas wants to merge 1 commit into
Open
david-salinas wants to merge 1 commit into
david-salinas wants to merge 1 commit into
Conversation
HIP_ARCHITECTURES was set to "${DEFAULT_AMDGPU_TARGETS}", which is
undefined, leaving the property empty. This was harmless with the
legacy hipcc-based FindHIP but causes a CMake generate error with
the new FindHIP.cmake compatibility shim that tags sources as
LANGUAGE HIP:
CMake Error: HIP_ARCHITECTURES is empty for target "rochpl".
Replace with "${TARGETS}", the arch list already built at lines
91-110 and used to populate HIP_HIPCC_FLAGS.
Also set LINKER_LANGUAGE to HIP when CMAKE_HIP_COMPILER is
available, since the shim-built target needs --hip-link which GCC
does not recognize.
Fixes: ROCM-34604
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HIP_ARCHITECTURES was set to "${DEFAULT_AMDGPU_TARGETS}", which is undefined, leaving the property empty. This was harmless with the legacy hipcc-based FindHIP but causes a CMake generate error with the new FindHIP.cmake compatibility shim that tags sources as LANGUAGE HIP:
CMake Error: HIP_ARCHITECTURES is empty for target "rochpl".
Replace with "${TARGETS}", the arch list already built at lines 91-110 and used to populate HIP_HIPCC_FLAGS.
Also set LINKER_LANGUAGE to HIP when CMAKE_HIP_COMPILER is available, since the shim-built target needs --hip-link which GCC does not recognize.
Fixes: ROCM-34604
Motivation
ROCm 10.3.0-20261116 and later ship a FindHIP.cmake compatibility shim (rocm-systems #15363) that enables CMake's native HIP language for hip_add_executable / hip_add_library callers. This makes CMake enforce non-empty HIP_ARCHITECTURES on targets with HIP sources. rocHPL's CMakeLists.txt has used the undefined variable DEFAULT_AMDGPU_TARGETS since 2022, which is now fatal. The build fails at generate time and no rochpl binary is produced, blocking rocHPL and rocHPL-MxP test suites on very nightly since 10.3.0-20261116.
Technical Details
Two changes in CMakeLists.txt:
Both changes are backward-compatible with the legacy (non-shim) FindHIP.
Related: rocm-systems #15363 (FindHIP shim change that exposed this issue)
Test Plan
Test Result
Build succeeds on the shim path and the legacy path. Full numerical validation (rochpl -P 1 -Q 1 -N 8192 --NB 512, expect PASSED residual) requires the updated FindHIP.cmake shim from rocm-systems #15762 which applies HIP_HIPCC_FLAGS selectively to HIP sources only.
Submission Checklist