Skip to content

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 7 commits into from
Apr 11, 2017
Merged

Add VecCore external #497

merged 7 commits into from
Apr 11, 2017

Conversation

amadio
Copy link
Member

@amadio amadio commented Apr 11, 2017

This pull request addresses Pere's comments and adds some more changes like a simple test for VecCore functionality and better support for latest VecCore changes (from version 0.3.2 to 0.4.0). It should be ready for merging, but I'd like to see all tests pass first. I tested on my own machine with several combinations of vc=ON/OFF, builtin_vc=ON/OFF and veccore=ON/OFF, builtin_veccore=ON/OFF. It should all work properly. However, since external VecCore cannot find a builtin Vc, requesting builtin_vc=ON and veccore=ON will trigger builtin_veccore=ON automatically. Please feel free to to make more suggestions for extra changes if necessary.

@amadio amadio force-pushed the veccore-external branch from ad70db1 to 1e508da Compare April 11, 2017 09:12
@amadio amadio force-pushed the veccore-external branch from 1e508da to 0764ca1 Compare April 11, 2017 09:31
@martinmine
Copy link
Contributor

@phsft-bot build!

@amadio amadio requested a review from peremato April 11, 2017 15:10
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1011/native, slc6/gcc49, slc6/gcc62, ubuntu14/native and CMake flags -Dccache=ON -Dimt=OFF

@peremato peremato merged commit fd47ae8 into root-project:master Apr 11, 2017
@amadio amadio deleted the veccore-external branch April 11, 2017 18:08
@vgvassilev
Copy link
Member

@amadio, should we put the veccore enablement options on the web?

VERSION_VAR Vc_VERSION)
endif()

if (vc OR builtin_vc)
Copy link
Member

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 get builtin_vc on, thus VECCORE_ENABLE_VC macro doesn't expanded. In turn, this leads in not being able to compile Math_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 :)

Copy link
Member Author

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 forces builtin_vc to be ON if vc 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 macro VECCORE_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.

Copy link
Contributor

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 inside Math_vectypes.h otherwise is unworkable. It means that enybody including a ROOT Math header will need to define VECCORE_ENABLE_VC of ROOT was built with Vc and VecCore enabled.

Copy link
Member Author

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.

@amadio
Copy link
Member Author

amadio commented Jun 16, 2017

@vgvassilev

should we put the veccore enablement options on the web?

I would prefer to wait until developments using VecCore within ROOT are more stable. In its current form, the targets are not setup correctly, so if you configure ROOT with VecCore=ON and Vc=OFF things are likely to break. That should definitely not be the case in the long term. Either we use Vc directly, or we rely on VecCore and write code that won't break unless Vc is turned ON.

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

Successfully merging this pull request may close these issues.

5 participants