The MASM Forum

General => The Campus => Topic started by: Ralphy on November 22, 2022, 04:09:45 AM

Title: New documentation for AMDs new AVX512 instructions?
Post by: Ralphy on November 22, 2022, 04:09:45 AM
Hi all,
   I must be looking in the wrong places but it seems AMD never updated their manuals for the new Zen4 AVX512 extensions.
   Is it accurate to use Intels documentation in the interim?
   If I'm in error maybe someone can let me know as to where the new documentation might be found?
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: greenozon on November 22, 2022, 04:21:57 AM
The only official doc AMD provides is this one
https://www.amd.com/en/support/tech-docs/amd64-architecture-programmers-manual-volumes-1-5 (https://www.amd.com/en/support/tech-docs/amd64-architecture-programmers-manual-volumes-1-5)
it's rather frash (Oct'22)
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: Ralphy on November 22, 2022, 04:38:12 AM
Yes already have these. Volume #4 is about 128 and 256bit instructions dated Nov '21. Not one mention of AVX512 or ZMM registers in any of their documentation.
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: bluedevil on November 22, 2022, 05:09:46 AM
Quote from: greenozon on November 22, 2022, 04:21:57 AM
it's rather frash (Oct'22)

On web site you provided:
Quote
Released
Thu, 03/11/2021 - 12:00

The pdf's last revision
Quote
October 2020 3.23
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: greenozon on November 22, 2022, 05:17:26 AM
@bluedevil

if you click on pdf it'll render different info: 
(https://prnt.sc/fYyi0ciFCraZ)
https://prnt.sc/fYyi0ciFCraZ (https://prnt.sc/fYyi0ciFCraZ)
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: bluedevil on November 22, 2022, 05:32:30 AM
You are totally right. I did the very same thing but I have missed this one. Thank you.
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: greenozon on November 22, 2022, 06:20:29 AM
You are welcome!
but anyway, ZMMs as well as AVX512 ops are still under the hood somehow...
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: hutch-- on November 22, 2022, 06:32:00 AM
As a rough guess, if AMD name extensions as the same as the Intel ones, its probably safe to use those extensions with AMD hardware. This should be current with late SSE, AVX and AVX2 but as far as I know, AVX512 is still developmental with Intel so I would imagine that it would be much the same with AMD as the got their fingers burnt some time back trying to introduce extensions of their own.

Simple approach is to write some test pieces using the Intel documentation and see if they work.
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: Ralphy on November 22, 2022, 07:14:46 AM
Quote from: hutch-- on November 22, 2022, 06:32:00 AM
As a rough guess, if AMD name extensions as the same as the Intel ones, its probably safe to use those extensions with AMD hardware. This should be current with late SSE, AVX and AVX2 but as far as I know, AVX512 is still developmental with Intel so I would imagine that it would be much the same with AMD as the got their fingers burnt some time back trying to introduce extensions of their own.

Simple approach is to write some test pieces using the Intel documentation and see if they work.

That's what I thought. Would be nice to at least have a complete list of instructions they've implemented; that doesn't seem to be available even. Some of it magically does work as older Intel benchmarking software seems to work so correlation between the 2 platforms is at least partially functionally equivalent but details would certainly be nice.

What would be the best reference (based on Intel I suppose) that provides a comprehensive list of extension instructions grouped by functionality (eg. vector arithmetic, gather functions, shift functions, etc)? Also timing information?
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: hutch-- on November 22, 2022, 07:33:58 AM
I would get the multi-manual set directly from Intel. You can download them for free and the architecture manual is worth reading as well as the instruction manual. Just be warned if you are not familiar with them that they are hard going and it takes a while to get the swing of them.
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: Ralphy on November 22, 2022, 08:08:29 AM
Thanks, will try that. Hard going is absolutely right. So far seems like only a huge alphabetically organized list of everything mixed together is all that's available. Could've sworn there was a grouped reference but maybe just a dream.  :bgrin:
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: Ralphy on November 23, 2022, 07:50:04 AM
Found this Japanese site. SIMD instructions from SSE to AVX512 organized by function.

https://www.officedaytime.com/simd512e/ (https://www.officedaytime.com/simd512e/)

Update Jan.12.2023:

AMD seems to have released some documentation on the new instructions, architecture and latencies on January 6th:

https://www.amd.com/en/support/tech-docs (https://www.amd.com/en/support/tech-docs)

Additionally found decent reference from Intel at:

https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html (https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html)

  :bgrin:
Title: Re: New documentation for AMDs new AVX512 instructions?
Post by: hutch-- on November 23, 2022, 10:47:36 AM
Hi Ralphy, with the intel manuals, get the separate ones so you don't have to wade through a mountain of stuff that may not be what you are after. The architecture manual is worth reading by itself but for normal instruction reference, the instruction manual is the best one.

Its good that you have found a source that you like but persevere with the intel manuals as they are the best available and have the most comprehensive data available.