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

@fastmath does not apply muladd #18654

Closed
ChrisRackauckas opened this issue Sep 23, 2016 · 1 comment
Closed

@fastmath does not apply muladd #18654

ChrisRackauckas opened this issue Sep 23, 2016 · 1 comment
Labels
upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@ChrisRackauckas
Copy link
Member

The original goal for @fastmath (#9406) was to add all compiler optimizations to increase the speed of mathematical operations. It makes sense then for it to apply muladd, an operation which is for improving speed #9840. It was assumed that this was happening, but from this julia-users thread we see that @fastmath currently does not apply any fma/muladd instructions.

The summary of the previous discussion is that this should be enabled by compiler flag, though the correct flag for doing so seems to be a more subtle question.

@eschnett @tkelman @yuyichao

@yuyichao yuyichao added the upstream The issue is with an upstream dependency, e.g. LLVM label Sep 23, 2016
@yuyichao
Copy link
Contributor

Unless there's a magic option to specify the needed property on part of the function already, this will need upstream support. (AFAICT it currently requires marking the whole function with the fast math attribute which we can't do)

yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654, Fix #22217
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654, Fix #22217
yuyichao added a commit that referenced this issue Jun 7, 2017
This currently does the replacement as long as one of the instruction allows unsafe arithmetic
mainly because LLVM vectorization pass does not always preserve the fastmath flags.

Fix #18654, Fix #22217
yuyichao added a commit to yuyichao/julia that referenced this issue Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

2 participants