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

IFX vs IFORT performance difference

DataScientist
Valued Contributor I
2,869 Views

I have not had the time to verify the benchmarks on the following page yet,

https://www.mjr19.org.uk/IT/zscale/

But in the meantime, does anyone have any explanations for the severe performance degradation with IFX compared to IFORT?

0 Kudos
1 Solution
Ron_Green
Moderator
2,836 Views

Ah ha, these are all COMPLEX data types.  Very clever.  We haven't optimized IFX well for COMPLEX.  If you actually use COMPLEX you're better off staying on IFORT for a while.   It's hard to get LLVM to understand much less optimize for Fortran COMPLEX.

In Ifort we had optimized IL0 to understand and tune for this datatype.   Note that FLANG and IFX are both well off the performance of IFORT.  I'm surprised by the gfortran numbers, maybe some options tuning will improve those times. 

 

Nonetheless, this'll give me some test cases to writeup bug reports for our llvm IR optimization team.  Fortran Complex datatypes have not been high on their to-do list. 

 

And it helps me with some training slides Barbara and I are putting together.  IF ( data == COMPLEX ) THEN IFORT

This will also help us to decide when IFX is truly ready to replace IFORT without caveats.

 

A good friday exercise.  Some good learnings. Thanks

 

Ron

View solution in original post

4 Replies
Ron_Green
Moderator
2,851 Views

Well I'd use the 2023 IFX compiler.  There is an update coming out hopefully next week for 2023.1.0.  If I were you, I'd wait for that compiler before testing.

There is no indication of the target CPU, other than -march=skylake

 

The author of this article took a simple set of portable options like -march.  For ifort and IFX that only tells the code gen that it can use AVX512 if it wants to.  IFX will use base LLVM optimizations and no Intel proprietary optimizations unless -x or -flto options are used.  Also, if AVX512 can help we probably oughta call it out.

 

Were I to try this, I'd use IFX and IFORT with these options

Ifort

-O2 -xcore-avx512 -qopt-zmm-usage=high -ipo

 

ifx

-O2 -xcore-avx512 -mprefer-vector-width=512 -flto

 

Might be a fun exercise for a Friday experiment.

Ron_Green
Moderator
2,837 Views

Ah ha, these are all COMPLEX data types.  Very clever.  We haven't optimized IFX well for COMPLEX.  If you actually use COMPLEX you're better off staying on IFORT for a while.   It's hard to get LLVM to understand much less optimize for Fortran COMPLEX.

In Ifort we had optimized IL0 to understand and tune for this datatype.   Note that FLANG and IFX are both well off the performance of IFORT.  I'm surprised by the gfortran numbers, maybe some options tuning will improve those times. 

 

Nonetheless, this'll give me some test cases to writeup bug reports for our llvm IR optimization team.  Fortran Complex datatypes have not been high on their to-do list. 

 

And it helps me with some training slides Barbara and I are putting together.  IF ( data == COMPLEX ) THEN IFORT

This will also help us to decide when IFX is truly ready to replace IFORT without caveats.

 

A good friday exercise.  Some good learnings. Thanks

 

Ron

bwe
Beginner
2,024 Views

This being the case this year, I don't understand how you think you will be ready to retire ifort next year in favor of a product that's not mature this year.

0 Kudos
Ron_Green
Moderator
2,829 Views

For fun, I converted mul_z to real kind=8.

Interestingly, for AVX2 IFORT and IFX are close, IFORT with a mere 7% advantage (with the upcoming 2023.1.0 compiler in early April).

Switching each from AVX2 to AVX512. Ifort goes great with AVX512, IFORT times are about 59% faster than IFORT with AVX2. Put another way, for IFORT going from AVX2 to AVX512 for this case is 59% faster with AVX512.

IFX however only gets about a 19% speedup using AVX512 over it's use of AVX2.  And obviously lagging IFORT for AVX512 by a more substantial margin.  Obviously some tuning needed for IFX for AVX512.

Reply