-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][E2E] Use ROCM_PATH
from the system environment
#18468
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we instead update the CMake code here? When users pass
%hip_options
in tests on Windows it also passes--rocm-path
based on that CMake var here, if needed we could make this happen for Linux tooThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'm seeing now we should already check that envvar to set the cmake var, so maybe the problem is just that we don't pass
--rocm-path
on linux?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for every single test not just when
%hip_options
are passed.There's two different things going on, the
%hip_options
are used specifically for interop tests that use HIP code alongside SYCL code, they're used to link the runtime HIP libraries and include the HIP runtime headers.But then for all SYCL tests, when compiling for AMD,
clang
uses some bitcode libraries provided by ROCm so it also needs to find the ROCm installation.This patch is fixing that second use case, we could potentially use
--rocm-path
instead but that would have to be added to the regular%{build}
substitution not just%hip_options
, which may be slightly cleaner, but usingROCM_PATH
is a bit easier and more flexible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks. i didnt know the rocm path was needed when compiling for amd when not using hip.
i would prefer we minimize environment var usage in tests so i would prefer we remove the passing of
--rocm-path
as part ofhip_options
on Windows and just always add it to the%{build}
substitution on all OSs when compiling for AMD@aelovikov-intel Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, we can use this and remove all
--rocm-path
s. User's env is supposed to haveROCM_PATH
(we copy it from there, after all), so they won't need to add extra env variables when reproducing outside LIT.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it seems like
ROCM_PATH
must always exist and point to the rocm install, i thought it was optional, in that case im fine to use the envvarThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did have a look at the CMake and on top of that the HIP CMake is annoying so it's not straightforward to get the rocm path from it, so this is actually a lot easier.
I don't have a setup with Windows + ROCm, I can remove the
--rocm-path
there, but it's untested, and I'm not sure ifROCM_PATH
works the same on Windows. That's the only place that uses--rocm-path
as far as I can tell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's try removing windows, if it fails just add it back, i vaguely remember the rocm detection on windows in upstream clang being basically non-existent so we might need it there