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

Stop hiding math intrinsics from llvm #19640

Closed
Keno opened this issue Dec 18, 2016 · 5 comments
Closed

Stop hiding math intrinsics from llvm #19640

Keno opened this issue Dec 18, 2016 · 5 comments
Labels
maths Mathematical functions simd instruction-level vectorization

Comments

@Keno
Copy link
Member

Keno commented Dec 18, 2016

Currently we hide math intrinsics (e.g. exp, log, etc) from LLVM to avoid it using the wrong libm for constant folding and in the JIT. However, esp on highly parallel architectures such as KNL and probably on GPUs as well, LLVM can vectorize those functions and in fact needs to if we want to get performance. However, this of course doesn't work if LLVM doesn't know that those functions exist. We should find a proper solution to it using the wrong libm and switch back to using the intrinsics.

@simonbyrne
Copy link
Contributor

Dupe of #15265 and/or #12830?

@simonbyrne simonbyrne added maths Mathematical functions broadcast Applying a function over a collection labels Dec 18, 2016
@Keno
Copy link
Member Author

Keno commented Dec 18, 2016

Yes, it's pretty much #12830 + patches to LLVM to tell it which libm to use.

@StefanKarpinski
Copy link
Sponsor Member

Is this a 1.0 issue?

@oxinabox
Copy link
Contributor

See also JuliaMath/Libm.jl#8

@mbauman mbauman added simd instruction-level vectorization and removed broadcast Applying a function over a collection labels Apr 24, 2018
@vtjnash
Copy link
Sponsor Member

vtjnash commented Jun 26, 2019

We don't have as many intrinsics anymore, as many have now been translated into Julia. Additionally, we now use Cassette for this ("should find a proper solution ... and switch back"). Closing in favor of #15265.

@vtjnash vtjnash closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions simd instruction-level vectorization
Projects
None yet
Development

No branches or pull requests

6 participants