Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Intell compiler 11.1 and AVX

Ravi_Managuli
Beginner
938 Views

Hi,

Idownloadedintel 11.1 compiler to run AVX . However, I am not able to figure out how to compile in in visual studio 2008 with AVX instruction. Where should I set the flag to use AVX instruction set in VS2008?
If I set /arch:AVX it says AVX architecture not found.
Should I set /QxAVX compiler option? How should I set it? I set it in command line and it still cannot compiler.

Also do I need to buy and install Intel Threading Building Blocks (Intel TBB) to run TBB with this new Intel compiler?I purchsedTBB for the previous 10.2 intel compiler.

If somebody has some experience with these issues it will be great.

-Ravi
0 Kudos
7 Replies
Brijender_B_Intel
938 Views

Hi Ravi,
Make sure that intel compiler is selected in property section of the project. In Compiler flags ad /QxAVX.
What error does it give. Can you please paste compiler output for /QxAVX.
Make sure in VS2008 that ICL is integrated right. You can gotoTools/Options and see the paths.
It looks like to meICL and VS2008 didntintegrate proper.
Try ICL shell to compile your code. it is inprogram files/intel

0 Kudos
Ravi_Managuli
Beginner
938 Views
I have selected intel compiler in the property.
I have included in the command line QxAVX as follows:
/c /Og /Oi /Ot /I "C:\Program Files (x86)\Intel\TBB\2.1\\include" /EHsc /MD /GS /fp:fast /FAs /Fa"x64\Release/" /Fo"x64\Release/" /W1 /nologo /Qunroll:2 /Qparallel /Quse-intel-optimized-headers /QxAVX
When I compile I get following error (I get this error for all the instructions related to AVX. I am showing only one isntruction here since it is same for everything)
error: identifier "_mm_inserf128_si256" is undefined
1> x7_x0_256_I= _mm_inserf128_si256(x7_x0_256_I, x3_x0_I);
error: identifier "_mm_inserf128_si256" is undefined1> x7_x0_256_I= _mm_inserf128_si256(x7_x0_256_I, x3_x0_I);
If I don't use AVX instruction set and just use SSE4.2, it works fine. So ICL seems to have integrated well.
0 Kudos
Brijender_B_Intel
938 Views
Did you include immintrin.h?
0 Kudos
Ravi_Managuli
Beginner
938 Views
Yes. I did. But I just found that this header file is not there on my computer. Is this (AVXsupport) something I need to manually select while installing the intel compiler?


0 Kudos
Brijender_B_Intel
938 Views
No, you dont need to manually select anything when installing compiler. The file should be in intel compiler's include folder. in my machine it shows in 11.1/054/include. i beleive 054 is minor version of the compiler release. it is a 32bit machine.
0 Kudos
Ravi_Managuli
Beginner
938 Views
I could get it running.
When I used "intrinsic guide" it mentions to use "_mm_insertf128_si256"
But actually it should be "_mm256_insertf128_si256" according to the immintrin.h header.
Also visual studio hides iimintrin.h header file fromviewing(it says the file not found).
Ihave to go to the specific directory to check the file.
Thanks for your help.
0 Kudos
Kit_Chung__Intel_
939 Views
Hi Ravi,
Can you tell me which version of Intrinsics Guide are you using? The latest version of Intrinsics Guide is v2.5.1 and it shows "_mm256_insertf128_si256" (this typo might have been fixed already).
Kit
0 Kudos
Reply