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

  • S.Pam
    replied
    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.

    Leave a comment:


  • Sonadow
    replied
    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

    Leave a comment:


  • coder
    replied
    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.

    Leave a comment:


  • coder
    replied
    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.

    Leave a comment:


  • S.Pam
    replied
    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?

    Leave a comment:


  • S.Pam
    replied
    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?
    ​​​

    Leave a comment:


  • Sonadow
    replied
    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.

    Leave a comment:


  • coder
    replied
    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.

    Leave a comment:


  • Sonadow
    replied
    Originally posted by AdrianBc View Post
    I am not a fan of "-march=native", because when you use an older compiler on a newer CPU it may fall back silently to the worst (but safe) options and also because I frequently compile a program on one computer for using it on another computer and it would be a waste of time for me to write an included makefile with appropriate make definitions for tool options that could be used only in special circumstances.

    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

    Leave a comment:


  • AdrianBc
    replied
    Originally posted by coder View Post
    Does anyone know what PREFETCHI does? Is that for prefetching instructions, as opposed to data?

    Also, I looked at a description of the MOVDIRI and I'm a little unclear on the use case for it, to the extent that it differs from that of non-temporal stores. If anyone has insight into what use cases it addresses, please share.

    As you have guessed, unlike older prefetch instructions that were for data, PREFETCHI is for prefetching instructions.

    Unlike the non-temporal stores for vector registers, MOVDIRI is for storing the general-purpose registers. Moreover, there are differences in behavior as written in the Intel manual:

    "Unlike stores with non-temporal hint that allow uncached (UC) and write-protected (WP) memory-type for the destination to override the non-temporal hint, direct-stores always follow WC memory type protocol irrespective of the destination address memory type (including UC and WP types).

    Unlike WC stores and stores with non-temporal hint, direct-stores are eligible for immediate eviction from the write-combining buffer, and thus not combined with younger stores (including direct-stores) to the same address. Older WC and non-temporal stores held in the write-combing buffer may be combined with younger direct stores to the same address."


    The MOVDIRI is not intended to be used in normal software. It is intended for the communication with the hardware accelerators that are included in various Intel SoCs, currently mostly in the Sapphire Rapids and Emerald Rapids Xeon CPUs.






    Leave a comment:

Working...
X