Any insight on how AVX-512 will effect Julia?

631 views
Skip to first unread message

Eric Diaz

unread,
Feb 4, 2015, 9:11:00 PM2/4/15
to juli...@googlegroups.com
Just found out about AVX-512.

http://en.wikipedia.org/wiki/AVX-512#New_instructions_in_AVX-512_foundation

Is there any insight onto how this will effect Julia?

Is this something that Julia code can leverage? or is this something that is going to be compiler dependent?

Stefan Karpinski

unread,
Feb 4, 2015, 11:05:05 PM2/4/15
to Julia Dev
We this kind of thing for free as soon as LLVM adds support. This is one of the great things about LLVM.

Viral Shah

unread,
Feb 4, 2015, 11:44:22 PM2/4/15
to juli...@googlegroups.com
This is exactly the kind of thing Arch has been pushing. I think with Intel taking LLVM seriously, we can expect to get these enhancements even sooner than in the past.

As Stefan said - Julia doesn't have to do too much to benefit. Also, all our various libraries will start using these things even sooner, which we will also benefit from.

-viral

Erik Schnetter

unread,
Feb 5, 2015, 12:08:50 AM2/5/15
to juli...@googlegroups.com
OpenBLAS may need re-tuning. I'm sure they are aware of this.

openlibm will require fundamental changes to see the benefits of AVX-512. Maybe there is an open-source Intel library that we could use instead of openlibm in this case?

-erik
--
Erik Schnetter <schn...@gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/

My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from https://sks-keyservers.net.

signature.asc

Viral Shah

unread,
Feb 5, 2015, 12:22:40 AM2/5/15
to juli...@googlegroups.com
I believe they have been talking at Intel about open sourcing these, but not yet. We can easily incorporate any such projects into openlibm, and have a lower-accuracy mode, speed-accuracy tradeoffs etc.

-viral

Eric Diaz

unread,
Feb 5, 2015, 7:26:47 PM2/5/15
to juli...@googlegroups.com
I just saw this ...

from GCC GNU
and from LLVM

Some of the math stuff looks pretty amazing! For example,
-- AVX-512 exponential and reciprocal instructions contain more accurate approximate reciprocal instructions than those in the AVX-512 foundation; relative error is at most 2-28. They also contain two new exponential functions that have a relative error of at most 2-23

That's some pretty small relative error!

Steven G. Johnson

unread,
Feb 8, 2015, 6:20:10 PM2/8/15
to juli...@googlegroups.com
On Thursday, February 5, 2015 at 4:26:47 PM UTC-8, Eric Diaz wrote:
Some of the math stuff looks pretty amazing! For example,
-- AVX-512 exponential and reciprocal instructions contain more accurate approximate reciprocal instructions than those in the AVX-512 foundation; relative error is at most 2-28. They also contain two new exponential functions that have a relative error of at most 2-23

That's some pretty small relative error!

It's not small in double precision, where epsilon is 2^-52, so these instructions are probably more for graphics and gaming than for scientific computing.

Erik Schnetter

unread,
Feb 8, 2015, 7:02:12 PM2/8/15
to juli...@googlegroups.com
Yes -- these instructions are good for single precision. Some of these can also be used as starting values for iterative algorithms in double precision; if you e.g. use a Newton method that doubles the number of correct digits with each iteration, then one additional iteration will suffice for a double-precision result.

-erik
signature.asc
Reply all
Reply to author
Forward
0 new messages