Repository navigation
Update cmake and scripts in preparation for LLVM_ENABLE_PER_TARGET_RU… - #1301
Merged
Merged
Conversation
estewart08
requested review from
frepaul,
jkottiku and
manoj-freyr
as code owners
August 26, 2026 15:57
estewart08
force-pushed
the
users/estewart/llvm-per-target-runtime-prep
branch
3 times, most recently
from
August 26, 2026 21:47
c03ad37 to
78969c3
Compare
Contributor
Author
|
estewart08
force-pushed
the
users/estewart/llvm-per-target-runtime-prep
branch
from
August 28, 2026 15:56
5d3da95 to
f9f34af
Compare
frepaul
requested changes
Aug 28, 2026
estewart08
added a commit
to ROCm/TheRock
that referenced
this pull request
Aug 28, 2026
## Motivation Add support to use LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON. This option is currently disabled by default in ROCm. There is talk upstream of keeping this ON by default and removing the option entirely. This also is a prequel step to using multilib build variants for debug/asan libraries for openmp/offload. The layout change has broad ripple effects: - Host runtimes such as libomp.so move from lib/llvm/lib/ into lib/llvm/lib/\<host-triple\>/. - Clang sanitizer runtimes may report a per-target directory that contains only flang_rt, while compiler-rt remains under lib/linux. - CI scripts, test harnesses, and Python wheel RPATH logic that assumed the flat layout need updating. - Downstream consumers (hipBLASLt, rocprofiler sidecars, RPP tests, etc.) must resolve libomp.so from the new location. Summary of areas changed: - Compiler build: LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON; amd-llvm provides openmp package - Sanitizer / ASAN CI: Runtime dir derived dynamically from clang; hard fail on unresolvable launcher - Test harnesses: rocprofiler-systems, rocprofiler-sdk, and RPP tests updated for host-triple runtime paths - Build deps / graph: mxDataGenerator wired to amd-llvm in BUILD_DEPS and consumer graph - Python wheels: Host-triple dir included in wheel RPATH ## Test Plan Inspect current CI tests with my PR's modifications, which should not show any issues loading libraries found in lib/llvm/lib/x86_64-unknown-linux-gnu or lib/clang/23/lib/x86_64-unknown-linux-gnu. This needs to include asan builds. ROCmValidationSuite (RVS) needs updated as well as the rvs binary uses libomp.so: ROCm/ROCmValidationSuite#1301 Fixes: ISSUE ID: [#6801](#6801) Partially AI Assisted --------- Co-authored-by: Joao P. L. de Carvalho <joao.carvalho@amd.com>
frepaul
approved these changes
Aug 31, 2026
frepaul
requested changes
Aug 31, 2026
…NTIME_DIR This will move libraries like libomp.so/libomptarget.so down one level into a clang target specific directory. For example: lib/llvm/lib/x86_64-unknown-linux-gnu. - Add rvs_llvm_host_runtime_dir function to rvs_nightly_test.sh. This verifies if the llvm runtimes are installed in the triple subdirectory. - Add RVS_LLVM_HOST_RUNTIME_DIR to INSTALL_RPATH - Add RVS_LLVM_HOST_RUNTIME_CORE_DIR to INSTALL_RPATH - Update LD_LIBRARY_PATH to include llvm host triple subdirectory for rvs_nightly_test.sh - Reorganize INSTALL_RPATH for readability. JIRA ID: ROCM-28648
The script was checking on the orchestrator runner instead of the ssh runner. This caused clang not to be found because the ROCm we are interested in is on the ssh runner.
This was a bad conflict resolution and should not be a part of this patch.
estewart08
force-pushed
the
users/estewart/llvm-per-target-runtime-prep
branch
from
September 1, 2026 16:28
824f51c to
80b4a56
Compare
frepaul
approved these changes
Sep 2, 2026
frepaul
pushed a commit
that referenced
this pull request
Sep 11, 2026
#1301) * Update cmake and scripts in preparation for LLVM_ENABLE_PER_TARGET_RUNTIME_DIR This will move libraries like libomp.so/libomptarget.so down one level into a clang target specific directory. For example: lib/llvm/lib/x86_64-unknown-linux-gnu. - Add rvs_llvm_host_runtime_dir function to rvs_nightly_test.sh. This verifies if the llvm runtimes are installed in the triple subdirectory. - Add RVS_LLVM_HOST_RUNTIME_DIR to INSTALL_RPATH - Add RVS_LLVM_HOST_RUNTIME_CORE_DIR to INSTALL_RPATH - Update LD_LIBRARY_PATH to include llvm host triple subdirectory for rvs_nightly_test.sh, rvs_pr_test.sh, rvs_release_test.sh - Reorganize INSTALL_RPATH for readability. JIRA ID: ROCM-28648 * Fix rvs_nightly_test.sh clang query for host triple The script was checking on the orchestrator runner instead of the ssh runner. This caused clang not to be found because the ROCm we are interested in is on the ssh runner. * Fix LLVM_HOST_RUNTIME_DIR detection * Update rvs_pr_test.sh LD_LIBRARY_PATH with llvm host triple * Update rvs_release_test.sh LD_LIBRARY_PATH with llvm host triple * Restore sles/rpm changes to CMakeLists.txt This was a bad conflict resolution and should not be a part of this patch. * Reinstate /opt/rocm, /opt/rocm/core for RPATH
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.
…NTIME_DIR
This will move libraries like libomp.so/libomptarget.so down one level into a clang target specific directory. For example: lib/llvm/lib/x86_64-unknown-linux-gnu.
Motivation
Prepare for LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON.
JIRA ID: ROCM-28648
Assisted by AI.