FMA4 instruction set hidden, but is working on AMD Zen processors

Discussion in 'Frontpage news' started by Hilbert Hagedoorn, Oct 15, 2018.

  1. Hilbert Hagedoorn

    Hilbert Hagedoorn Don Vito Corleone Staff Member

    Messages:
    36,779
    Likes Received:
    5,860
    GPU:
    AMD | NVIDIA
  2. nevcairiel

    nevcairiel Master Guru

    Messages:
    649
    Likes Received:
    210
    GPU:
    MSI 1080 Gaming X
    In real-world code there really is no huge performance difference between FMA3 and FMA4, certainly not anything on the scale of 33%. Not sure where that number even comes from. 4 = 3 + 33%? :p

    The comparisons in Wendells video are of AVX vs FMA4, not accounting for FMA3.
     
    Last edited: Oct 15, 2018
  3. RzrTrek

    RzrTrek Ancient Guru

    Messages:
    2,358
    Likes Received:
    640
    GPU:
    RX 580 ❤ MESA 19.2


    There's the full in depth video on the subject. I just love the guys over at Level1Techs.

    They're very open and knowledgeable. Also their weekly news episodes makes me giggle like a girl.
     
  4. Hilbert Hagedoorn

    Hilbert Hagedoorn Don Vito Corleone Staff Member

    Messages:
    36,779
    Likes Received:
    5,860
    GPU:
    AMD | NVIDIA
    No, FMA4 has 33% higher throughput, because it processes four operands per instruction instead of three.
     

  5. BLEH!

    BLEH! Ancient Guru

    Messages:
    5,918
    Likes Received:
    91
    GPU:
    Sapphire Fury
    So Zen could potentially be even faster than it already is???
     
  6. asturur

    asturur Master Guru

    Messages:
    476
    Likes Received:
    114
    GPU:
    Geforce Gtx 1080TI
    in very narrow and particular scenarios where you need tons of multiply add and someone writing software enabled this feature, yes
     
  7. Fediuld

    Fediuld Member Guru

    Messages:
    121
    Likes Received:
    59
    GPU:
    MSI 1080 Armor OC /8GB
    AMD knows only why FMA4 isn't activated. Also is not instruction set but a single instruction doing calculations.
    Maybe because Intel doesn't support FMA3, AMD decided not to "officially" do anything about this either. Or there are issues with the results returned on Ryzen 1xxxx series.
     
  8. BLEH!

    BLEH! Ancient Guru

    Messages:
    5,918
    Likes Received:
    91
    GPU:
    Sapphire Fury
    Could be any number of things.
     
  9. nevcairiel

    nevcairiel Master Guru

    Messages:
    649
    Likes Received:
    210
    GPU:
    MSI 1080 Gaming X
    No, thats not how it works. Both FMA3 and FMA4 calculate the same thing, its always "a * b + c". 3 input operands. The only difference between FMA3 and FMA4 is where the result is being stored.
    In FMA3, you have to store the result in one of the input operands, its called a "destructive" instruction, because it overwrites one of the inputs.
    In FMA4, you have a separate output register, a 4th operand, so its "non-destructive".

    If you wanted to simplify it, you could look at it like this:
    FMA3: a = a * b + c (3 operands)
    FMA4: d = a * b + c (4 operands)

    The math is exactly the same, it saves you the same number of operations, only the location of the result differs.
    This difference can have advantages in some algorithms, but in modern CPUs and the majority of algorithms, the impact from this difference is marginal at best, thanks to features like register renaming. An additional "move" instruction to copy the data into an additional register is often extremely cheap - if its even needed in the algorithm in question.
     
    Last edited: Oct 15, 2018
  10. Alessio1989

    Alessio1989 Maha Guru

    Messages:
    1,454
    Likes Received:
    249
    GPU:
    .
    This is an old news. Moreover seems that using FMA4 under Zen gives wrong results: https://translate.google.it/translate?hl=it&sl=de&tl=en&u=http://www.planet3dnow.de/vbulletin/threads/421433-AMD-Zen-14nm-8-Kerne-95W-TDP-DDR4?p=5147746&viewfull=1

    Intel supports FMA3 since Haswell.
     

  11. Astyanax

    Astyanax Ancient Guru

    Messages:
    4,343
    Likes Received:
    1,257
    GPU:
    GTX 1080ti
    Very very old news.

    https://www.agner.org/optimize/blog/read.php?i=838

    news should be reworded to "in a video that could only be considered clickbaiting, level1techs has reported on something we already knew a year ago"
     
    Last edited: Oct 15, 2018

Share This Page