Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #116264

Re: Matmul in VVM (was: Sane(r) SIMD)

From Michael S <already5chosen@yahoo.com>
Newsgroups comp.arch
Subject Re: Matmul in VVM (was: Sane(r) SIMD)
Date 2026-05-03 16:53 +0300
Organization A noiseless patient Spider
Message-ID <20260503165346.00005c6b@yahoo.com> (permalink)
References (5 earlier) <1777672131-5857@newsgrouper.org> <1777687821-5857@newsgrouper.org> <2026May2.182903@mips.complang.tuwien.ac.at> <20260503112918.00001a9d@yahoo.com> <2026May3.132202@mips.complang.tuwien.ac.at>

Show all headers | View raw


On Sun, 03 May 2026 11:22:02 GMT
anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

> Michael S <already5chosen@yahoo.com> writes:
> >On Sat, 02 May 2026 16:29:03 GMT  
> >> I tried clang-22, and it compiled the code.  I also tried clang-11
> >> and gcc-11 and they errored out complaining about the
> >> -march=znver5 flag, because they do not know this architecture
> >> (but still, why report an error for that?).  Deleting that flag
> >> produced SSE2 code on both compilers, as expected.
> >>   
> >
> >Why would you think that the code generated for Zen5 would be
> >different from code, generated for other AVX512 targets with 2 FMA
> >pipes, like any Intel server core starting from Skylake-SP?  
> 
> I did not express anything in that direction.  However, now that you
> ask, my experience is that it is was more difficult than I had
> expected to get gcc (13 IIRC) to produce AVX-512 code, even with
> explicit vectorization.  The actual target was a Rocket Lake machine,
> but using -march=native on that produced AVX-256 code (for the
> programs that I tried).  IIRC I also tried specifying one other Intel
> uarch, and the code was not satisfactory, either, but I don't remember
> the details.  Eventually I tried -march=znver4, and that worked, so I
> stuck with that.
> 
> BTW, one thing that I find unsatisfactory about "x86-64-v4" is that it
> does not include the ADX instructions.
> 
> >Specific targets I would try are:
> >skylake-avx512
> >cascadelake
> >icelake-server 
> >sapphirerapids
> >emeraldrapids
> >graniterapids
> >The last three are likely unsupported by clang-11, which is quite
> >ancient, but with considerably newer gcc11 at least sapphirerapids
> >should work.
> >Any way, cascadelake should be supported by all of them and I don't
> >expect meaningful differences in code generation between cascadelake
> >and znver5.  
> 
> Good to know.  Anyway, I did not try to get older compilers to produce
> AVX-512 for <2026May2.182903@mips.complang.tuwien.ac.at>.  Instead, I
> tried gcc-11 and clang-11 to find out why "most of the compilers in
> godbot take a compile error", as Mitch Alsup claimed.  It appears that
> most of the compilers barf on the flag "-march=znver5".
> 
> - anton


I tried it myself and results were rather unexpected.
In order to convince gcc to generate AVX-512 on skylake-avx512 I had to
go back to gcc7.

cascadelake target is not recognized until gcc9 and for this
particular kernel no version of gcc generates AVX512 code.

icelake-server recognized by gcc8, i.e. earlier than cascadelake,
despite the fact that Icelike server shipped 2 full years later than
Cascade Lake. Here too no version of gcc generates AVX512 code for this
kernel.

sapphirerapids recognized by gcc11. Here too no version of gcc
generates AVX512 code for this kernel.

emeraldrapids recognized by gcc13. Here too no version of gcc
generates AVX512 code for this kernel.

graniterapids is exactly the same as emerald.

So, it's hard to be more wrong than I was in my previous post.
Just saying that Intel people responsible for gcc maintenance screw it
would be big understatement.


Now, I want to know if clang situation is any different.

skylake-avx512: recognized since clang-3.9, generates semi-reasonable
avx512 code with clang-3.9 to 9. Semi-reasonable means using 512-bit
add and mul, but no fma. Good code is produced only by clang-4 with
following flags: -march=skylake-avx512 -Ofast -O3 -ffast-math


cascadelake: recognized since clang-9, Code generation on supported
versions appears to be the same as for skylake-avx512. In effect in
means that good code not generated at all.

icelake-server: recognized since clang-7, i.e earlier than cascadelake.
code generation appears to be the same.

At this point I ran out of gas.
But it looks almost certain that clang code generation on all supported
Intel server cores is the same. I.e. newer clang does not generate
AVX512 code and older clang in some random versions generates the same
code as new clang and in other random versions generates AVX512 code
but often not 512-bit wide and at first glance looking like crap.

In this particular case it could be a blessing for Intel, because newer
clang code generated for znver5 used 512-bit SIMD but looks horrible.
I fully expect that it is slower than more conservative code for Intel
targets.


Back to comp.arch | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-26 10:26 +0000
  Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-26 12:27 -0500
    Re: Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-26 19:07 +0000
    Re: Sane(r) SIMD Stefan Monnier <monnier@iro.umontreal.ca> - 2026-04-26 18:30 -0400
      Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-27 13:58 -0500
      Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-27 19:42 +0000
        Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-27 16:42 -0500
      Re: Sane(r) SIMD Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-28 05:46 +0000
  Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-26 18:25 +0000
    Re: Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-26 19:38 +0000
      Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-26 21:27 +0000
        Re: Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-27 05:42 +0000
          Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-27 19:22 +0000
            Re: Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-27 20:22 +0000
              Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-27 17:39 -0500
              Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-28 00:03 +0000
    Re: Sane(r) SIMD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-27 06:56 +0000
      Re: Sane(r) SIMD Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-27 08:48 +0000
        Re: Sane(r) SIMD Michael S <already5chosen@yahoo.com> - 2026-04-27 12:23 +0300
          Re: Sane(r) SIMD Michael S <already5chosen@yahoo.com> - 2026-04-27 17:11 +0300
          Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-27 19:32 +0000
            Re: Sane(r) SIMD Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-27 21:54 +0000
              Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-28 00:11 +0000
                Re: Sane(r) SIMD Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-28 01:17 +0000
                Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-28 18:03 +0000
            Re: Sane(r) SIMD Michael S <already5chosen@yahoo.com> - 2026-04-28 14:36 +0300
              Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-28 17:45 +0000
                Re: Sane(r) SIMD Terje Mathisen <terje.mathisen@tmsw.no> - 2026-04-30 10:02 +0200
          Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-27 15:55 -0500
      Re: Sane(r) SIMD BGB <cr88192@gmail.com> - 2026-04-27 15:27 -0500
  Re: Sane(r) SIMD Terje Mathisen <terje.mathisen@tmsw.no> - 2026-04-27 18:47 +0200
    Re: Sane(r) SIMD Thomas Koenig <tkoenig@netcologne.de> - 2026-04-27 20:02 +0000
      Re: Sane(r) SIMD Terje Mathisen <terje.mathisen@tmsw.no> - 2026-04-30 14:36 +0200
        Re: Sane(r) SIMD Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-04-30 10:35 -0700
          Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-04-30 17:51 +0000
            Re: Sane(r) SIMD scott@slp53.sl.home (Scott Lurndal) - 2026-04-30 18:16 +0000
              Re: Sane(r) SIMD MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-01 00:28 +0000
              Re: Sane(r) SIMD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-01 07:48 +0000
                Re: Sane(r) SIMD Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-01 08:14 +0000
                Re: Sane(r) SIMD George Neuner <gneuner2@comcast.net> - 2026-05-02 00:59 -0400
        Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-01 10:21 +0000
          Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-01 21:48 +0000
            Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-02 02:10 +0000
              Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-02 08:32 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-02 18:46 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-03 07:33 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Michael S <already5chosen@yahoo.com> - 2026-05-03 11:13 +0300
                Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-03 22:28 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-10 06:55 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-10 17:28 +0000
                Re: Matmul in VVM Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-10 16:15 -0400
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-10 08:58 -0700
                Re: Matmul in VVM Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-12 02:17 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-11 20:11 -0700
                Re: Matmul in VVM anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-12 05:14 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-11 23:11 -0700
                Re: Matmul in VVM anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-12 07:23 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-12 18:16 +0000
                Re: Matmul in VVM anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-14 08:05 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-14 18:20 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-13 09:09 -0700
                Re: Matmul in VVM anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-13 17:55 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-13 20:46 +0000
                Re: Matmul in VVM scott@slp53.sl.home (Scott Lurndal) - 2026-05-12 14:33 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-12 18:23 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-12 18:12 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-12 17:08 -0700
                Re: Matmul in VVM scott@slp53.sl.home (Scott Lurndal) - 2026-05-13 14:12 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-13 17:36 +0000
                Re: Matmul in VVM Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-13 02:57 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-13 17:32 +0000
                Re: Matmul in VVM Terje Mathisen <terje.mathisen@tmsw.no> - 2026-05-14 09:39 +0200
                Re: Matmul in VVM Bernd Linsel <bl1-thispartdoesnotbelonghere@gmx.com> - 2026-05-13 14:02 +0200
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-13 09:14 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-13 17:40 +0000
                Re: Matmul in VVM Bernd Linsel <bl1-thispartdoesnotbelonghere@gmx.com> - 2026-05-13 21:35 +0200
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-13 20:52 +0000
                Re: Matmul in VVM Bernd Linsel <bl1-thispartdoesnotbelonghere@gmx.com> - 2026-05-15 00:03 +0200
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-14 16:35 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-15 00:17 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-18 14:22 -0700
                Re: Matmul in VVM Bernd Linsel <bl1-thispartdoesnotbelonghere@gmx.com> - 2026-05-20 10:06 +0200
                Re: Matmul in VVM Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-14 12:19 -0400
                Re: Matmul in VVM anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-15 06:29 +0000
                Re: Matmul in VVM EricP <ThatWouldBeTelling@thevillage.com> - 2026-05-15 09:19 -0400
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-18 14:18 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-12 18:06 +0000
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-12 09:48 +0000
                Re: Matmul in VVM David Brown <david.brown@hesbynett.no> - 2026-05-12 12:59 +0200
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-15 16:59 +0000
                Re: Matmul in VVM scott@slp53.sl.home (Scott Lurndal) - 2026-05-15 22:30 +0000
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-16 10:22 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-16 18:09 +0000
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-16 18:11 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-16 22:59 +0000
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-17 07:51 +0000
                Re: Matmul in VVM scott@slp53.sl.home (Scott Lurndal) - 2026-05-17 18:51 +0000
                Re: Matmul in VVM Thomas Koenig <tkoenig@netcologne.de> - 2026-05-18 09:56 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-18 17:50 +0000
                Re: Matmul in VVM scott@slp53.sl.home (Scott Lurndal) - 2026-05-12 14:29 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-25 12:00 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-25 19:36 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-25 17:52 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-26 17:48 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-26 11:55 -0700
                Re: Matmul in VVM Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-27 10:57 -0400
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-27 11:13 -0700
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-28 07:43 -0700
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-28 07:53 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-28 18:08 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-29 08:50 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-29 16:58 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-06-01 15:45 -0700
                Re: Matmul in VVM Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-28 19:29 -0400
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-29 09:03 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-29 17:04 +0000
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-29 16:55 +0000
                Re: Matmul in VVM Stefan Monnier <monnier@iro.umontreal.ca> - 2026-06-01 14:58 -0400
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-06-01 23:40 -0700
                Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-08 18:15 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-10 07:14 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-11 05:36 +0000
                Re: Matmul in VVM Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2026-05-18 11:02 -0700
                Re: Matmul in VVM MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-18 20:20 +0000
              Re: Matmul in VVM (was: Sane(r) SIMD) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-02 16:29 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Michael S <already5chosen@yahoo.com> - 2026-05-03 11:29 +0300
                Re: Matmul in VVM (was: Sane(r) SIMD) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-03 11:22 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Michael S <already5chosen@yahoo.com> - 2026-05-03 16:53 +0300
                Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-03 14:46 +0000
                Re: Matmul in VVM (was: Sane(r) SIMD) Michael S <already5chosen@yahoo.com> - 2026-05-03 19:07 +0300
                Re: Matmul in VVM (was: Sane(r) SIMD) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-03 14:39 +0000
                More real world matmul kernel Was: Matmul in VVM (was: Sane(r) SIMD) Michael S <already5chosen@yahoo.com> - 2026-05-03 18:30 +0300
          Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-01 22:21 +0000
            Re: Matmul in VVM (was: Sane(r) SIMD) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-02 06:02 +0000
              Re: Matmul in VVM (was: Sane(r) SIMD) MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-05-02 18:33 +0000
            Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-02 06:54 +0000
              Re: Matmul in VVM (was: Sane(r) SIMD) Thomas Koenig <tkoenig@netcologne.de> - 2026-05-02 15:26 +0000

csiph-web