Skip to content

[ROCm][Windows] Fix LoadHIP handling of environment variable paths. #3991

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: main
Choose a base branch
from

Conversation

ScottTodd
Copy link

See https://cmake.org/cmake/help/latest/command/file.html#path-conversion. Paths stored in environment variables may use / or \ (e.g. on Windows), while cmake-style paths always use /.

This fixes configure errors like:

CMake Error at D:/b/audio_main/build/temp.win-amd64-cpython-312/Release/CMakeFiles/CMakeScratch/TryCompile-y9h2qt/CMakeLists.txt:2 (set):
  Syntax error in cmake code at

    D:/b/audio_main/build/temp.win-amd64-cpython-312/Release/CMakeFiles/CMakeScratch/TryCompile-y9h2qt/CMakeLists.txt:2

  when parsing string

    D:/projects/TheRock/external-builds/pytorch/.venv/Lib/site-packages/_rocm_sdk_devel/cmake/;D:\projects\TheRock\external-builds\pytorch\.venv\Lib\site-packages\_rocm_sdk_devel/lib/cmake/hip;D:/b/audio_main/cmake

  Invalid character escape '\p'.

(note the mixed usage of \ and / in that string)

@ScottTodd ScottTodd requested a review from a team as a code owner July 24, 2025 20:23
Copy link

pytorch-bot bot commented Jul 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3991

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@ScottTodd
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants