Announcement

Collapse
No announcement yet.

AMD Zen 5 Compiler Support Posted For GCC - Confirms New AVX Features & More

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by Sonadow View Post
    Processor-specific tunings are a pox and cancer and should never exist on anything except purpose-built appliances that exist to do only a very specific function.

    Everything else should be on -march=x86-64 -mtune=generic
    IMO, most of the benchmarks on sites like Phoronix should use generic targets, but if/when someone can safely use native tuning, it makes a lot of sense to do so.

    It's only through architecture-specific tuning that the compiler can know which instruction sequences or optimizations to prefer and which to avoid.

    Comment


    • #22
      Originally posted by coder View Post
      IMO, most of the benchmarks on sites like Phoronix should use generic targets, but if/when someone can safely use native tuning, it makes a lot of sense to do so.

      It's only through architecture-specific tuning that the compiler can know which instruction sequences or optimizations to prefer and which to avoid.
      Have fun dealing with illegal instructions when copying a binary built on a one processor over to a computer running on another processor.
      Last edited by Sonadow; 13 February 2024, 03:14 AM.

      Comment


      • #23
        Originally posted by Sonadow View Post

        Processor-specific tunings are a pox and cancer and should never exist on anything except purpose-built appliances that exist to do only a very specific function.

        Everything else should be on -march=x86-64 -mtune=generic
        That's just weird. The context was a user who recompiles his own software to optimise for his platform. That's the definition of purpose built, isn't it?
        ​​​

        Comment


        • #24
          Originally posted by Sonadow View Post

          Have fun dealing with illegal instructions when copying a binary built on a one processor over to a computer running on another processor.
          This rarely works on Linux anyway unless you have either exactly the same version of libraries or a statically built binary.

          What's wrong with compiling for your hardware as long as you are aware that changing CPU to a lesser/older version might not work so good?

          Comment


          • #25
            Originally posted by Sonadow View Post
            Have fun dealing with illegal instructions when copying a binary built on a one processor over to a computer running on another processor.
            I know exactly what the downsides are, and I wouldn't do this in a context where I might ever want to run those binaries on a different machine, much less an older or otherwise inferior one.

            Furthermore, I've got some news that sounds like it just might blow your friggin' mind! I actually have machines of multiple ISAs on my network, and I compile code on each of them! Oh noessS!!! The horror! Whatever should I do if I somehow copy over a binary executable to a machine of a different ISA??? Oh, the humanity!
            🤯 😱
            Last edited by coder; 13 February 2024, 04:13 AM.

            Comment


            • #26
              Originally posted by S.Pam View Post
              This rarely works on Linux anyway unless you have either exactly the same version of libraries or a statically built binary.
              Depends. For C++ code, APIs tend not to be designed in a forward-compatible fashion. However, UNIX has a fairly rich tradition of semantic versioning and C libraries which properly implement it.

              If you bring your fragile libraries with the executable (or just statically link them, license-permitting), you can be quite successful in running old binaries on a newer kernel and libc.

              Comment


              • #27
                Originally posted by S.Pam View Post

                This rarely works on Linux anyway unless you have either exactly the same version of libraries or a statically built binary.

                What's wrong with compiling for your hardware as long as you are aware that changing CPU to a lesser/older version might not work so good?
                Good. Please rebuild your current Linux distribution entirely from scratch to target your CPU with -march=native

                Comment


                • #28
                  Originally posted by Sonadow View Post

                  Good. Please rebuild your current Linux distribution entirely from scratch to target your CPU with -march=native
                  Of course. I'm using Gentoo, so that's a given.

                  Comment

                  Working...
                  X