Open urbach opened 12 years ago
They do, they use the same include file
#include <immintrin.h>
and the "introduction to intel avx" from the Intel website explicitly states that all three compilers (icc,gcc and visual studio) use the same syntax.
Relevant data types and operations:
_m256d | 4 doubles, representing one of 16 YMM registers |
_mm256_op_[ps,pd](...) | most intrinsic functions follow this format, ps/pd for 8 single / 4 double |
so, are we talking about the same intrinsics, e.g.
_mm256 _mm256_fmadd_pd(a,b,c)
? Well, I guess I need to try. In the intel docu (which is really really crappy, I have to say) I understood it differently.
so, are we talking about the same intrinsics, e.g.?
Yes, absolutely. Although I'm not sure gcc implements all of them...
If you download the Intel Intrinsics Guide application (Linux,Win,Mac), it has a comprehensive reference of all intrinsics available. It might have been old documentation that you happened upon.
http://software.intel.com/sites/default/files/11MIC15_Intrinsics-Guide-for-Intel-AVX2-Linux__2_.zip
I've read from multiple sources now that both gcc and icc use exactly the same syntax for all SIMD intrinsics.
See: /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include/immintrin.h points to /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include/avxintrin.h
I searched a very long time for a downloadable version, but never found one. For the link you send one needs to install something, I need a PDF, not some Java or whatever crap. Found that before and didn't look at it further (okay, so much about that ;-) ). Maybe I have to...
Don't have gcc-4.5 available here...
Well, yeah, it's a java app with a search function... not completely useless but I agree.
How about this: http://software.intel.com/sites/default/files/m/d/4/1/d/8/319433-011.pdf not the intrinsics but ...
okay, so this Java thingy is at least somehing.
The PDF I've seen also already... I'll certainly read it in my next live... ;-)
what I found most useful (but its badly written, I think) is
so, on my laptop I have gcc-4.6... I cannot find for instance
_mm256_fmadd
in any of the headers in x86_64-linux-gnu/4.6/include
. There are only the gcc intrinsics, which are
__mm256d __builtin_ia32_vfmaddpd256
in the header fma4intrin.h
.
Hmm, seems that the fma intrinsics are not yet supported in intel style by gcc
. Otherwise supports gcc
the intel intrinsics, but icc
not the gcc
intrinsics, of course... The processors on SuperMUC do not support more than AVX, I think not even AVX2. The fat nodes even only SSE4.
So, not sure what to do, the fused multiply-add operations would be quite important...
In the Intel Java app FMA is a special category and it is not supported on my Core Duo desktop, for instance. I haven't checked on my Core2 laptop but before using the fmadd intrinsics one should really check if they're supported at all.
yes, I think the Intel processor supporting FMA does not exist yet... :(
would be great to have the Dirac operator with AVX intrinsic functions...