Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

MIC fused multiply add version - FMA3?

Patrick_S_
New Contributor I
808 Views

Hey guys,

simple question. Does the PHI has FMA3?

if yes:

do i need to be aware of the FMA3 destructive operand form using FMA with Intel Intrinsics like:

__m512 _mm512_fmadd_ps (__m512 a, __m512 b, __m512 c)

 

Thanks,

Patrick 

0 Kudos
3 Replies
Kevin_D_Intel
Employee
808 Views

Yes, FMA3 is supported. From what I see in the Intel® Xeon Phi™ Coprocessor Instruction set reference (available on the Intel® Xeon Phi™ Coprocessor site) the intrinsic uses the underlying VFMADD132PS instruction with an MVEX opcode prefix containing NDS indicating a non-destructive source register specifier, which is the first source operand in the 3-operand instruction syntax as per the discussion of the MVEX Prefix discussion.

I will double check with Developers.

0 Kudos
Kevin_D_Intel
Employee
808 Views

Development clarified this is not limited to the VFMADD132PS instruction. They noted:

"The compiler will choose one of the forms of FMA instructions (VFMADD132PS, VFMADD213PS, VFMADD231PS), depending on the context, to generate optimal code.

So, from the user's perspective, the statement ‘x=_mm512_fmadd_ps(a, b, c)’ means just ‘x=a*b+c’, no matter which operand is destructive in the underlying instruction."

Hope that helps.

0 Kudos
Patrick_S_
New Contributor I
808 Views

Thanks for your excellent answer :)

0 Kudos
Reply