- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Intel developers,
I'm using Intel 15 on Intel(R) Xeon(R) CPU E5-2670 processor. I have a problem using FMA instrinsic instruction. My compiler flags are -O3 -xHost. Compilation ends well but when I run my program I get: Program Exception - illegal instruction
I have to suppose FMA is not available on that processor? If yes, why the compiler does not advice me during compilation phase?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The original 2670 did not support fma. If xhost is mistaking it for -v2 you would need to specify avx until a compiler upgrade fixes it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The current compiler doesn't expand fma intrinsic so you will need plain c++ source for automatic instruction selection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim Prince wrote:
The current compiler doesn't expand fma intrinsic so you will need plain c++ source for automatic instruction selection.
Thanks Tim. How can I check at compile time if FMA is supported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may read the following link: https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your xhost option should result in __AVX2__ being set when your build platform supports Fma. so you can use that macro symbol to choose fma at compile time. There is also CPU dispatch facility to choose code path at run time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks to everybody.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page