Skip to content
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

Disable DART_ENABLE_SIMD by default #790

Merged
merged 8 commits into from
Oct 13, 2016
Merged

Disable DART_ENABLE_SIMD by default #790

merged 8 commits into from
Oct 13, 2016

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Oct 12, 2016

Motivation

When DART_ENABLE_SIMD is on, DART enables SIMD instructions by adding compiler option -march=native. This compiler option enables all the available SIMD instruction subsets of the local machine. This way has two caveats:

(1) We don't convey the compiler option to the DART dependent projects (e.g., Aikido). So the DART dependent project don't know whether DART is built with SIMD enabled, and it could end up building them with different SIMD options, which may cause segfaults in runtime. I guess #780 is the case.

(2) Even though we pass -march=native to DART and DART dependent projects, still they could be built with different SIMD options if they are built on different machines as @j-rivero mentioned in this comment. This could happen, for example, when Aikido links to DART installed using apt-get (the debian package at ppa:dartsim) and your machine's architecture is not the same with ppa:dartsim's one.

Changes

This PR first pass -march=native as the target compiler option to dart target so that it is automatically added to the consumer project by CMake when DART_ENABLE_SIMD is ON. Secondly, DART_ENABLE_SIMD is now OFF by default. We regard this option is an advanced one and should be used when you know what's happening exactly.

Note

Please let me know if I missed anything.


This change is Reviewable

@jslee02 jslee02 merged commit 277d2a4 into release-6.1 Oct 13, 2016
@jslee02 jslee02 deleted the eigen_mem_align branch October 13, 2016 20:38
@jslee02 jslee02 restored the eigen_mem_align branch October 14, 2016 19:09
@jslee02 jslee02 deleted the eigen_mem_align branch October 15, 2016 14:00
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.

1 participant