[cmake][docs] Handle AMD code object ABI mismatch for ROCm < 6.3 - #757
Open
zjin-lcf wants to merge 1 commit into
Open
[cmake][docs] Handle AMD code object ABI mismatch for ROCm < 6.3#757zjin-lcf wants to merge 1 commit into
zjin-lcf wants to merge 1 commit into
Conversation
Recent DPC++/LLVM defaults to AMD code object ABI version 6, which is only supported by ROCm 6.3+. Building any domain against an older ROCm fails with "cannot find ROCm device library for ABI version 6". Auto-append -mcode-object-version=5 to the amdgcn compile/link options when ROCm < 6.3 is detected (and the user has not already set the flag), and document the manual workaround in the ROCm build instructions. Fixes uxlfoundation#687 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Hi @abagusetty, Could yo test again for #687 ? Thanks. |
Contributor
|
Hi @zjin-lcf Sure, will give it a spin and let you know soon |
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.
Summary
Recent DPC++/LLVM defaults to AMD code object ABI version 6, which only ROCm 6.3+ supports, so building any domain against an older ROCm fails with
cannot find ROCm device library for ABI version 6(#687).cmake/FindCompiler.cmake: auto-append-mcode-object-version=5to the amdgcn compile/link options when ROCm < 6.3 is detected via.info/version(ROCM_PATH/HIPROOT//opt/rocm), skipped if the user already set the flag.docs/building_the_project_with_dpcpp.rst: document the toolchain issue and the manual-DCMAKE_CXX_FLAGS="-mcode-object-version=5"workaround.Test plan
amdgcnagainst ROCm 6.2.4; confirmed-mcode-object-version=5compiles cleanly (exit 0).FindCompiler.cmakeend-to-end: flag added for ROCm 6.2.4/6.0.3, absent for 6.3.4/7.2.4, opt-out honored when user sets the flag, safe fall-through when no version file is found.Fixes #687