Skip to content

Rework constructHipPath so HIP_PATH env var is lower priority. #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: amd-staging
Choose a base branch
from

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented Aug 5, 2025

Progress on ROCm/TheRock#1200. Tested downstream (via a patch) in ROCm/TheRock#1201.

The HIP SDK sets the HIP_PATH environment variable, which hipcc and hipconfig were using instead of neighboring files.

A robust way to handle this would be to stamp all information about related tools into the tools themselves during packaging, rather than use global state like environment variables or heuristics like scanning the file system. I think once we've progressed further towards rolling out the new ROCm "superrepos" and open source CI/CD we can make those deeper changes. For now, I've extended the brittle logic with another special case.

@ScottTodd ScottTodd marked this pull request as ready for review August 5, 2025 22:52
ScottTodd added a commit to ROCm/TheRock that referenced this pull request Aug 5, 2025
Fixes #1200. Sent upstream for
review as well at ROCm/llvm-project#289.

The HIP SDK sets the `HIP_PATH` environment variable, which hipcc and
hipconfig were using instead of neighboring files. This resulted in
errors like this when the HIP SDK was installed:
```
λ .\build\compiler\hipcc\dist\bin\hipcc --version
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
'nvcc' is not recognized as an internal or external command,
operable program or batch file.
Device not supported - Defaulting to AMD
HIP version: 6.2.41512-db3292736
The system cannot find the path specified.
failed to execute:""C:\Program Files\AMD\ROCm\6.2\lib\llvm\bin\clang.exe"  --driver-mode=g++ -O3 -fuse-ld=lld --ld-path="C:\Program Files\AMD\ROCm\6.2\lib\llvm\bin\lld-link.exe" -Llib --hip-link  --version"
```

A robust way to handle this would be to stamp all information about
related tools into the tools themselves during packaging, rather than
use global state like environment variables or heuristics like scanning
the file system. I think once we've progressed further towards rolling
out the new ROCm "superrepos" and open source CI/CD we can make those
deeper changes. For now, I've extended the brittle logic with another
special case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant