AMD GPU の世代における FMA、MAD 命令の微妙な仕様と違い 最近 Mesa3D に組み込まれた変更の中に以下のようなコメントがあった。 /* gfx6-8: use MAD (FMA is 4x slower) * gfx9-10: either is OK (MAD and FMA have the same performance) * gfx10.3: use FMA (MAD doesn't exist, separate MUL+ADD are 2x slower) * * FMA has no advantage on gfx9-10 and MAD allows more algebraic optimizations. * Keep FMA enabled on gfx10 to test it, which helps us validate correctn
![AMD GPU の世代における FMA、MAD 命令の微妙な仕様と違い | Coelacanth's Dream](https://cdn-ak-scissors.b.st-hatena.com/image/square/f4d026bc43e146d4937db40194adaf7883537958/height=288;version=1;width=512/https%3A%2F%2Fwww.coelacanth-dream.com%2Ficon.png)