Skip to content

Conversation

@ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented 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.

@ScottTodd ScottTodd merged commit c56088a into main Aug 5, 2025
42 of 46 checks passed
@ScottTodd ScottTodd deleted the users/scotttodd/windows-hipcc-hip-path branch August 5, 2025 23:34
@github-project-automation github-project-automation bot moved this from TODO to Done in TheRock Triage Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Issue]: hipcc fails to run on Windows if the HIP_PATH env var is set from the HIP SDK

3 participants