-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add VecCore external #497
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
Add VecCore external #497
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
82688d4
Minor indentation fixes to SearchInstalledSoftware.cmake
amadio db17dfc
Follow style of current externals for Vc
amadio d432151
Log build steps of Vc external project
amadio c3187bb
Add VecCore as external project
amadio 37a921f
Add VecCore options to RootBuildOptions.cmake
amadio 28f05ac
List build options in alphabetical order
amadio 0764ca1
Add simple test for VecCore
amadio 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <cstdio> | ||
#include <VecCore/VecCore> | ||
|
||
int main(int, char **) | ||
{ | ||
printf("VecCore available backends: Scalar "); | ||
#ifdef VECCORE_ENABLE_UMESIMD | ||
printf("UME::SIMD "); | ||
#endif | ||
#ifdef VECCORE_ENABLE_VC | ||
printf("Vc"); | ||
#endif | ||
printf("\n"); | ||
return 0; | ||
} |
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.
@amadio, it seems that if I configure with
-Dbuiltin_veccore
we don't getbuiltin_vc
on, thusVECCORE_ENABLE_VC
macro doesn't expanded. In turn, this leads in not being able to compileMath_vectypes.hxx
.@xvallspl and I were discussing and we can diagnose this either in the cxx file or here. Alternatively, we should just enable builtin_vc, saving time and efforts :)
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 made it such that
builtin_veccore
forcesbuiltin_vc
to be ON ifvc
is ON. However, it should be possible to use VecCore without Vc (that's the whole point of having VecCore), so I'm against forcing Vc and VecCore to be locked to be the same, or we will never be able to change the backend later to be either Scalar or UME::SIMD. The macroVECCORE_ENABLE_VC
is in${VecCore_DEFINITIONS}
when the Vc backend is enabled, so targets should rely on that rather than turning it on by hand.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.
Concerning
${VecCore_DEFINITIONS}
I just committed a change to hide this insideMath_vectypes.h
otherwise is unworkable. It means that enybody including a ROOT Math header will need to defineVECCORE_ENABLE_VC
of ROOT was built with Vc and VecCore enabled.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 @peremato, I saw the commit and agree with you that everybody having to define it is not optimal, but the current solution is not great either, because it only works when both VecCore and Vc are enabled. We will need to fix it later to be able to use at least the UME::SIMD backend, which works much better on KNL. At some point, we should require that new developments work with both UME::SIMD and Vc, otherwise there is no point in not just using Vc directly. I think that using
${VecCore_DEFINITIONS}
in combination with#cmakedefine
to create a configuration header is the way to go in this case.