rocclr: Prioritize local rocr-runtime headers over system paths#5936
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates ROCclr’s HSA dependency discovery to prefer in-tree / locally built rocr-runtime over headers and libraries found via default system search paths, avoiding accidental picks of outdated HSA installations during HIP/ROCclr builds.
Changes:
- Reordered
find_path()HSA header lookup (Windows + PAL backend) to search localrocr-runtime/staged build outputs first. - Expanded
PATHSentries to include local source and staged build directories.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gandryey
approved these changes
May 8, 2026
Fixes build errors where CMake finds outdated HSA headers in system paths (e.g., C:/opt/rocm) instead of the local rocr-runtime, causing missing constant errors like HSA_STATUS_ERROR_INVALID_DISPATCH_PARAMETERS. Changes applied to all platforms in ROCclrHSA.cmake: - Reorder find_path/find_package to search local rocr-runtime first - Add NO_DEFAULT_PATH to prevent system path searches - Covers Windows (AMD_COMPUTE_WIN), Linux (UNIX), and Windows PAL backend Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
linux is not impacted
04eb979 to
f65ab2b
Compare
systems-assistant Bot
pushed a commit
to ROCm/clr
that referenced
this pull request
May 13, 2026
paths (#5936) Fixes build errors where CMake finds outdated HSA headers in system paths instead of the local rocr-runtime Changes applied to windows builds using ROCclrHSA.cmake: - Reorder find_path/find_package to search local rocr-runtime first - Add NO_DEFAULT_PATH to prevent system path searches - Covers Windows (AMD_COMPUTE_WIN) ## Motivation when building hip, the headers and libs should be obtained locally first then at the system level. User can have multiple rocms installed at system level. During hip build, user expects the local rocr/hsa to be picked first ## Technical Details changing the search order of rocr headers and libs, so the expected Libs/headers are picked for the hip build ## JIRA ID NA ## Test Plan Rock build passes and local hip build passes ## Test Result Rock build passes and local hip build passes ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. [rocm-systems] ROCm/rocm-systems#5936 (commit 198563a)
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.
Fixes build errors where CMake finds outdated HSA headers in system paths instead of the local rocr-runtime
Changes applied to windows builds using ROCclrHSA.cmake:
Motivation
when building hip, the headers and libs should be obtained locally first then at the system level.
User can have multiple rocms installed at system level. During hip build, user expects the local rocr/hsa to be picked first
Technical Details
changing the search order of rocr headers and libs, so the expected Libs/headers are picked for the hip build
JIRA ID
NA
Test Plan
Rock build passes and local hip build passes
Test Result
Rock build passes and local hip build passes
Submission Checklist