Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Precision lost when compiled with -xAVX or -xHOST

Sharath_K_1
Beginner
723 Views

Hi all,

My program output is in double and floating point values when i compile without -xAVX or -xHOST options results are correct but most of the loops aren't getting vectorized but when i use -xAVX or -xHOST option most of loops are getting vectorized and even the performance has been improved but the precision is lost. When I execute same program for a larger dataset this small precision loss is resulting in wrong output. I've even tried -fp-model precise/strict options along with -xHOST but still i'm getting wrong output.

Is it because of AVX vectorization or something else?

Thanks

Sharath kumar

 

 

0 Kudos
3 Replies
Bernard
Valued Contributor I
723 Views

Can you provide more details on precision loss?

0 Kudos
Sharath_K_1
Beginner
723 Views

I'm not at the liberty of posting the results.So i can only tell you that out of 6 decimal points, difference is shown in last 2 or 3 decimal points. For a larger datasets the difference also gets increased.

0 Kudos
McCalpinJohn
Honored Contributor III
723 Views

There are certainly lots of places where things can go wrong. 

Do you see a difference in accuracy between these options?

  • -xSSE4.1
  • -xSSE4.1 -no-vec
  • -xAVX
  • -xAVX -no-vec

The third one should be the case that is giving the poor results.  The other three cases may help pin down whether the problem is due to vector width, arithmetic reordering, or something else...

You might need to augment these with changes to the optimization level (e.g., explicitly using "-O1", "-O2", and "-O3") and adding the "-fp-model strict" option to any versions that give trouble.

0 Kudos
Reply