-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Remove dependency on libdevice binary for sycl-device-lib test #3639
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 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0b0b31f
Remove dependecy on libdevice binary for sycl-device-lib test
jinge90 57fc554
Merge remote-tracking branch 'origin/sycl' into remove_libdevice_test…
jinge90 a433194
configure devicelib binrary path based on sysroot
jinge90 812992b
Add SYCLInstallationDetector
jinge90 60bc311
fix clang-format
jinge90 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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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
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
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.
According to my understanding
SysRoot
default value matchesDir/../
, so probably we can simplify the code and use only one candidate. Right?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.
Hi, @bader
I just checked that if we don't specify "--sysroot=..." in command line, the "TC->getDriver().SysRoot" will be empty string.
So, we have to keep 2 candidates here.
Thanks very much.
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.
Okay. I just noticed that similar logic for HIP/ROCM is implemented in toolchain specific file.
See
RocmInstallationDetector
in https://github.com/intel/llvm/blob/sycl/clang/lib/Driver/ToolChains/AMDGPU.cpp#L171 .@mdtoguchi, should we move this code to https://github.com/intel/llvm/blob/sycl/clang/lib/Driver/ToolChains/SYCL.cpp?
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.
Sure - maybe add a dir vector that holds the known locations in which the libs can be searched for.
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.
Hi, @bader and @mdtoguchi
So, do you mean we need to add a "SyclInstallationDectector" in SYCL.cpp and use it to record search paths for libs, bins, include?
Thanks very much.
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.
@jinge90, I don't think we need to add a full installation detector as everything is provided with the compiler. I think just add the lib search directories when the SYCLToolChain is created.
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.
Hi, @mdtoguchi
I suggest to add a very simple "SyclInstallationDectector" which only provide APIs to query lib search path for now. If we have new request, we can extend the simple "SyclInstallDetector", is it OK?
Thanks very much.
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.
Hi, @mdtoguchi and @bader
I added a very simple SYCLInstallationDetector, there is no much to do in this function since we don't have many requirements for detecting installation structure currently. If we have some requirements in the future such as adding some option like "-fsycl-installation=...", it is easy to extend this class.
Thanks very much.
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.
I thought that Mike suggestion is that we move
addSYCLDeviceLibs
to SYCLToolChain.