← Back to Pull requests

fix(cmake): pin HIP compiler variables in amd-hip toolchain file #5489

Closed
unknown closed this pull request without merging on Aug 10, 2026 17:02 UTC
View on GitHub
unknown unknown commented on May 28, 2026 10:12 UTC
Author

Motivation

Guarantee that subprojects using COMPILER_TOOLCHAIN amd-hip always build
with TheRock's own HIP compiler rather than a system-discovered one.

Technical Details

Subprojects that call project(... LANGUAGES HIP) or enable_language(HIP)
trigger CMakeDetermineHIPCompiler, which scans the system and silently picks
up /opt/rocm-/bin/ when a system ROCm install is present. Inside the
manylinux build container this was latent; on a developer machine with
/opt/rocm-7.3 installed it caused rocr-debug-agent-tests and libhipcxx
to compile against the wrong toolchain.

Emit CMAKE_HIP_PLATFORM, CMAKE_HIP_COMPILER_ROCM_ROOT, CMAKE_HIP_COMPILER,
and CMAKE_HIP_COMPILER_LAUNCHER into the generated toolchain file using
CACHE ... FORCE. The FORCE is required because CMakeDetermineHIPCompiler
runs after the toolchain file is processed and would override plain set()
calls — forcing into the cache makes the values visible to the determine module
so it skips detection entirely. This mirrors the pattern in
examples/CMakeLists.txt (ROCm/TheRock#102).

CMAKE_HIP_COMPILER_LAUNCHER is propagated from CMAKE_CXX_COMPILER_LAUNCHER
so that HIP compilation benefits from ccache, consistent with C/CXX targets.

Test Plan

Tested by observing the HIP compiler used to build the mentioned subprojects.
Also validated with a local script that confirms the CMake variables point at
TheRock's compiler.

Test Result

Confirmed the correct compiler is being used.

ISSUE ID : #102

Diff: 190 lines (+142 / -48) across 2 files Reviewer: Naraenda Review duration: 106970m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 190 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.314
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5489"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.9% (MEDIUM) · Higher = larger blast radius
35.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.2% · Safe to merge
14.2%
Repository