4 Replies Latest reply on Sep 28, 2018 11:27 PM by rwd4ever

    Will later CPU's run code compiled for k10 or must I compile for generic x86_64?

    anthonys

      As the question says. Will programs built with gcc -march=k10 run on later generation AMD CPU's? I don't care at all about Intel CPU's.

        • Re: Will later CPU's run code compiled for k10 or must I compile for generic x86_64?
          elstaci

          Phoronix is one of the main Linux Forums for AMD. Here they are testing GCC 8.1 vs GCC 7.3 with both Intel and AMD CPU systems: https://www.phoronix.com/scan.php?page=article&item=gcc-81-benchmarks&num=1

           

          Copied from above link show the five CPU tested with GCC 8.1:

          All five systems were running Ubuntu 18.04 LTS x86_64, but that's about as much as was in common with these five distinct systems used for getting an overall view at the direction of the GCC 8 performance. The test systems came down to:

          Core i7 8700K - The current-generation i7-8700K Coffeelake CPU that is six cores / 12 threads and the system was built with the ASUS PRIME Z370-A motherboard, 16GB of DDR4, 120GB Intel SSD, and Radeon RX Vega 64 graphics card.

          Core i9 7980XE - The high-end Skylake-X system with 18 cores / 36 threads, ASUS PRIME X299-A motherboard, 16GB DDR4, and Intel 256GB 700p SSD.

          2 x Xeon Gold 6138 - The Tyan 1U server with two Xeon Gold 6138 Xeon Scalable CPUs for delivering 40 cores / 80 threads with 96GB of RAM, and 256GB Samsung 850 SSD.

          Ryzen 7 2700X - The new high-end Zen+ CPU with eight cores / 16 threads. This system had the ASUS ROG CROSSHAIR VII HERO motherboard, 8GB DDR4, Samsung 950 PRO 256GB SSD, and Radeon RX 580 graphics card.

          EPYC 7601 - The AMD EPYC 7601 CPU with 32 cores / 64 threads in a single-socket configuration on a Tyan 2U server with 128GB of DDR4 memory and 280GB Intel 900p SSD.

            • Re: Will later CPU's run code compiled for k10 or must I compile for generic x86_64?
              anthonys

              Good information but not what I asked. To be even more specific:

              If I build say Firefox with gcc -march=k10 will that run on say a Ryzen without any crashes from k10 instructions. Or do I have to build way back to k8? I know k8 runs on k10. Windows is built for i686 so that code will run on anything but will a Ryzen, Bulldozer ... run on k10 code.

                • Re: Will later CPU's run code compiled for k10 or must I compile for generic x86_64?
                  elstaci

                  I needed to find out what GCC K10 was. That tells you how little of any knowledge I have on the subject. I thought the link at Phoronix would have shown that maybe AMD Ryzens will run on GCC K10.

                   

                  Sorry if I misunderstood your post. Anyway, Phoronix Linux Forum is a very good place to ask and maybe find out the info you need. I understand now what you are talking about.

                   

                  You might want to post here at AMD Developer's Forum for your technical question on Linux using GCC K10 coding. Newcomers Start Here . Maybe one of the AMD Moderators can answer your question like dipak

                   

                  You may need to be "White listed " first by dipakto have access to that particular Forum.

                   

                  I don't know if AMD Support will be able to answer your Question but it won't hurt to open an AMD EMAIL SUPPORT Ticket and see what they say. : Email Form .

                   

                  Anyways, Hope you find your answer.

              • Re: Will later CPU's run code compiled for k10 or must I compile for generic x86_64?
                rwd4ever

                I think the only oddity with K10 was the SSE4a instructions. There were only half a dozen instructions, maybe less. Ryzen should do those.

                Bigger problem would be 3DNOW instructions, which AMD dropped.