Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29064 Discussions

Clarity on minimum architecture compiler flags

Cameron
New Contributor I
695 Views

We had asked our original question in this post.

 

We have compiled with /QxAVX but it looks like this option limits runtime to Intel based CPUs. We want the ability for our product to run on AMD chipsets as well. After reading the developer guide reference (and re-reading Steve's response), it seems that we should have used /QaxAVX. Would the following compiler flags be a better solution for cross platform support:

 

 

/QaxAVX /archAVX

 

 

I read the options as doing the following:

  • /QaxAVX generates specific paths for Intel based processors to use for performance benefit.

  • /archAVX then provides a separate path as a baseline for other CPUs to follow. This allows AMD chipsets to run the product, just not with the specific performance benefits that Intel chipsets would gain from /Qax.

 

Labels (1)
0 Kudos
1 Solution
Ron_Green
Moderator
655 Views

That is the correct set of options for your scenario.

 

Keep in mind that these are suggestions to the compiler, as in "you may use AVX".  The compiler may choose 128bit vector SSE4.x or something if it thinks it is more efficient.   For AVX in most cases it does honor your request, as there is almost always an advantage to use AVX over SSExyz 

 

You can also add more paths for Intel processors such as

/QaCORE-AVX2,AVX   /archAVX

 

so on Intel, they choose either AVX2 or AVX, else non-Intel use AVX

 

 

View solution in original post

0 Kudos
1 Reply
Ron_Green
Moderator
656 Views

That is the correct set of options for your scenario.

 

Keep in mind that these are suggestions to the compiler, as in "you may use AVX".  The compiler may choose 128bit vector SSE4.x or something if it thinks it is more efficient.   For AVX in most cases it does honor your request, as there is almost always an advantage to use AVX over SSExyz 

 

You can also add more paths for Intel processors such as

/QaCORE-AVX2,AVX   /archAVX

 

so on Intel, they choose either AVX2 or AVX, else non-Intel use AVX

 

 

0 Kudos
Reply