hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
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
初學者
1,116 檢視

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 積分
3 回應
Bernard
傑出貢獻者 I
1,116 檢視

Can you provide more details on precision loss?

Sharath_K_1
初學者
1,116 檢視

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.

McCalpinJohn
榮譽貢獻者 III
1,116 檢視

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.

回覆