Announcement

Collapse
No announcement yet.

GCC 12 Looking At Enabling Its Vectorizer For "-O2" Optimization Level

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    archkde
    Phoronix Member

  • archkde
    replied
    Originally posted by pal666 View Post
    my computer runs fedora and fedora contains gcc 11.2.1 with patches from master. rpm is maintained by one of gcc upstream comaintainers. when i had bugs in my gcc, i was submitting them to fedora bugzilla and they were quickly fixed. fedora is the best distro for development
    That's all fine, as long as there is a fixed version available. The bugs I'm talking about are open upstream.

    Leave a comment:

  • pal666
    Senior Member

  • pal666
    replied
    Originally posted by archkde View Post
    And I have found a deterministic ICE in GCC 11.2 (re-discovery) as well as multiple codegen bugs. So this version is also bad. The interesting question is whether there is a newer version that actually fixes the bug. The answer is no in my case, and I can't tell in your case.
    my computer runs fedora and fedora contains gcc 11.2.1 with patches from master. rpm is maintained by one of gcc upstream comaintainers. when i had bugs in my gcc, i was submitting them to fedora bugzilla and they were quickly fixed. fedora is the best distro for development

    Leave a comment:

  • archkde
    Phoronix Member

  • archkde
    replied
    Originally posted by pal666 View Post
    last version in 9 branch is 9.4. i happen to use 9.3 in current project and i found deterministic ice in it(sometimes it ices but succeeds on rerun, but this one required disabling one optimization pass). i.e. 9.3 is definitely bad version
    And I have found a deterministic ICE in GCC 11.2 (re-discovery) as well as multiple codegen bugs. So this version is also bad. The interesting question is whether there is a newer version that actually fixes the bug. The answer is no in my case, and I can't tell in your case.

    Leave a comment:

  • perpetually high
    Senior Member

  • perpetually high
    replied
    Originally posted by pal666 View Post
    most optimizations are not chip-specific. new complier is always better and it's not limited to optimizations
    not necessarily. sometimes it can be shorter execution time and more bugs found in your program at compile time.
    last version in 9 branch is 9.4. i happen to use 9.3 in current project and i found deterministic ice in it(sometimes it ices but succeeds on rerun, but this one required disabling one optimization pass). i.e. 9.3 is definitely bad version
    Thanks. I think the LTS version is getting the backported fixes (gcc-9/focal-updates,focal-security,now 9.3.0-17ubuntu1~20.04), but I'm gonna look into just using the latest and greatest instead. And will run benchmarks and report back. Glad I asked though.

    Leave a comment:

  • pal666
    Senior Member

  • pal666
    replied
    Originally posted by perpetually high View Post
    someone asked why an old compiler would be best for any chip. My answer is that the optimizations are likely not coming in for Haswell anymore
    most optimizations are not chip-specific. new complier is always better and it's not limited to optimizations
    Originally posted by perpetually high View Post
    and more code = longer execution time
    not necessarily. sometimes it can be shorter execution time and more bugs found in your program at compile time.
    Originally posted by perpetually high View Post
    the last, greatest, stable version (9.3.0 in my case)
    last version in 9 branch is 9.4. i happen to use 9.3 in current project and i found deterministic ice in it(sometimes it ices but succeeds on rerun, but this one required disabling one optimization pass). i.e. 9.3 is definitely bad version

    Leave a comment:

  • brad0
    Senior Member

  • brad0
    replied
    Originally posted by brucethemoose View Post
    Thats an AVX2 chip. You would definitely benefit from a newer compiler
    For the most part that is very unlikely.

    Leave a comment:

  • sdack
    Senior Member

  • sdack
    replied
    Together with the pseudo x86-architectures for GCC's -march= switch that were added some time ago such as x86-64-v3 for AVX2 and x86-64-v4 for AVX512 do I hope to see distros picking up at least x86-64-v3 here and to provide more than the standard 64-bit binary packages.

    By the time GCC 12 becomes stable would it be nice for distros like Debian to a add second x86-64 repository for AVX2-optimised binaries to make these gains available to all the Debian-based x86 distros. Perhaps the multimedia repository could start adding this.

    Leave a comment:

  • carewolf
    Senior Member

  • carewolf
    replied
    Originally posted by jacob View Post
    Which architectures will it support?
    All of them?

    It even have a generic mode that can operate without using SIMD instructions (2/4 16bit integers in 64bit word). Though that mode is naturally limited, and sometimes needs to be halved to deal with overflows.

    Leave a comment:

  • perpetually high
    Senior Member

  • perpetually high
    replied
    Originally posted by jabl View Post

    Most of the work that goes into the compiler is not tuning the pipeline descriptions for some particular CPU, so you're missing out on all that work.

    That being said, in most cases the benefits are not huge, and the least-hassle way is to use the default version that comes with your distro (which is what you're using).
    Yeah, I need to do benchmarks soon to really get to the bottom of this. Appreciate the reply.

    Leave a comment:

  • jabl
    Senior Member

  • jabl
    replied
    Originally posted by perpetually high View Post
    I'm still using gcc 9.3.0 (9.3.0-17ubuntu1~20.04) for my i5-4670K Haswell. Stupid move? Feels like maybe the best compiler for this chip but if anyone strongly disagrees, do share.

    edit: someone asked why an old compiler would be best for any chip. My answer is that the optimizations are likely not coming in for Haswell anymore, and more code = longer execution time on stuff you don't need or gonna use. So I might as well use the last, greatest, stable version (9.3.0 in my case) instead of the bleeding edge 10/11/12. Put dumbly, of course. I'd love to be corrected.
    Most of the work that goes into the compiler is not tuning the pipeline descriptions for some particular CPU, so you're missing out on all that work.

    That being said, in most cases the benefits are not huge, and the least-hassle way is to use the default version that comes with your distro (which is what you're using).

    Leave a comment:

Working...
X