-
Notifications
You must be signed in to change notification settings - Fork 755
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
[SYCL] Do not force LLVM_INCLUDE_TESTS variable #1505
Merged
+0
−7
Merged
Changes from all commits
Commits
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 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.
Let's discuss if we need this code or if we can replace it with something better.
This snippet was added by #585 and it seems to handle the case when SYCL runtime project is built separately from llvm. I don't think we currently support this case, so it can be safely removed.
If we need to support this case we should:
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.
Agree with removing these lines. @bjoernknafla Do you see any reason why we should keep it?
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 have mirrored how Clang does it but am not sure if Clang is a special case compared to the other LLVM projects that deal differently with it, e.g., LLD.
As long as we ensure that
SYCL_INCLUDE_TESTS
is set in the buildbots (as it currently is I see no reason to remove it though.It might surprise users though that suddenly the tests are off, and they might see tests pass because they aren’t tests, if they haven’t explicitly turned the SYCL ones on?
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, as long as SYCL project is build withing LLVM tree, we don't need to set
SYCL_INCLUDE_TESTS
explicitly.I've tried it locally by removing this line, and test target is included.
This code handles the case if LLVM CMake files are not processed before SYCL CMake files and
LLVM_INCLUDE_TESTS
variable is not set. As I mentioned in the comments above, this configuration is not supported and we have a lot of other variables to set in addition toLLVM_INCLUDE_TESTS
to use SYCL project in stand-alone mode.@bjoernknafla, are you building SYCL project separately from LLVM?
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.
@bader I am not building SYCL separately from LLVM. In the future it would be helpful to enable separate building as this could speed up testing, e.g., a compiler change needs to build and run all tests, a runtime change only needs to build and run runtime tests - just a thought and nothing that could inform a variable change right now.
Currently
SYCL_INCLUDE_TESTS
is set automatically toLLVM_INCLUDE_TESTS
: sycl/CMakeLists.txt#L244How did you test after the CMake configuration change, e.g., did you use the buildbot scripts (which set the variable implicitly), and did you delete the CMake cache and run the configuration freshly? (Only asking to prevent turning tests off by accident which has bitten me in the past).
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.
LLVM_INCLUDE_TESTS
default value isON
, so if sycl project is build within llvm tree, cmake parses LLVM project cmake files and setLLVM_INCLUDE_TESTS
variable toON
(unless it's explicitly set toOFF
by user. This means thatSYCL_INCLUDE_TESTS
default value isON
in our current configuration.I removed the whole build directly and removed the line 83 from the configure.py script. Then I run the script to generate Ninja files and run
ninja check-sycl
command, which works as expected.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.
Thank you for helping me see your full picture. Sounds good to me.