bug 1034: making room for crfbinlog/crfternlogi/crbinlog/crternlogi
[libreriscv.git] / openpower / sv / vector_isa_comparison.mdwn
index 6b6947f5d21f00ba92c5d845ef494b816bf16386..45cfd3b22b9c402523843eaa1f18fa4542e65e72 100644 (file)
@@ -29,7 +29,8 @@ adding the various sub-extensions to the Base Scalar Power ISA.
 
 It also has to be pointed out that normally this work would be covered by
 multiple separate full-time Workgroups with multiple Members contributing
-their time and resources.
+their time and resources. In RISC-V there are over sixty Technical Working
+Groups https://riscv.org/community/directory-of-working-groups/
 
 Overall the contributions that we are developing take the Power ISA out of
 the specialist highly-focussed market it is presently best known for, and
@@ -53,15 +54,21 @@ of a Vector Processor. Transcendentals can be added as a sub-RFC.
 # SIMD ISAs commonly mistaken for Vector
 
 There is considerable confusion surrounding Vector ISAs
-because of a mis-use of the word "Vector" in most
-well-known Packed SIMD ISAs.
+because of a mis-use of the word "Vector" in the marketing
+material of most well-known Packed SIMD ISAs of the past 3
+decades. These Packed
+SIMD ISAs used features "inspired" from Scalable Vector ISAs.
 
 * PackedSIMD VSX. VSX, which has the word "Vector" in its name,
   is "inspired" by Vector Processing
   but has no "Scaling" capability, and no Predicate masking.
+  Both these factors put pressure on developers to use
+  "inline assembler unrolling" and data repetition, which in turn
+  is detrimental to both L1 Data and Instruction Caches.
   Adding Predicate Masks to the PackedSIMD VSX ISA
   would effectively double the number of PackedSIMD
-  instructions (750 becomes 1,500)
+  instructions (750 becomes 1,500) even if it were practical
+  to do so (no available 32 bit encoding space).
 * [AVX / AVX2 / AVX128 / AVX256 / AVX512](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions)
   again has the word "Vector" in its name but this in no
   way makes it a Vector ISA. None of the AVX-\* family
@@ -69,8 +76,11 @@ well-known Packed SIMD ISAs.
   in AVX-512.
 * ARM NEON - accurately described as a Packed SIMD ISA in
   all literature.
-* ARM SVE / SVE2 - partially accurately described as a Scalable Vector
-  ISA, but the "Scaling" is, rather unfortunately, a parameter
+* ARM SVE / SVE2 - **not a Scalable Vector ISA**, it is actually
+  a hybrid PackedSIMD/PredicatedSIMD ISA: with 4-operand instructions
+  being overwrite to fit into 32-bit there was no room for a predicate
+  mask.
+  The "Scaling" is, rather unfortunately, a parameter
   that is chosen by the *Hardware Architect*, rather than
   the programmer. The actual "Scalar" part as far as the programmer
   is concerned is supposed to be the Predicate Masks.  However in
@@ -82,10 +92,24 @@ well-known Packed SIMD ISAs.
   going directly against the advice given on ARM's developer
   documentation.
 
+A good analogy explaining why "Silicon-Partner Scalability" is
+catastrophic is to note that the situation is near-identical to when IBM
+extended Power ISA from 32 to 64-bit.  Existing 32-bit systems
+were **unable** to run or trap-and-emulate 64-bit instructions
+**because they were the exact same opcodes** and the "Silicon Scalability"
+of both RVV and ARM SVE/2 is the exact same mistake, but much
+worse.  At least IBM provided an `MSR.SF` bit.
+
+The saving grace of PackedSIMD VSX is that it did not fall to the
+seduction outlined in the "SIMD Considered Harmful" article
+<https://www.sigarch.org/simd-instructions-considered-harmful/>.
+It is clear that it is expected to deploy Multi-Issue to achieve
+high performance, which is a much cleaner approach that has not
+resulted in ISA poisoning such as that suffered by x86 (AVX).
 
 # Actual 3D GPU Architectures and ISAs (all SIMD)
 
-All of these are not Vector ISAs, they are SIMD ISAs.
+All of these are not Scalable Vector ISAs, they are SIMD ISAs.
 
 * Broadcom Videocore
   <https://github.com/hermanhermitage/videocoreiv>
@@ -102,7 +126,6 @@ All of these are not Vector ISAs, they are SIMD ISAs.
   implement a subset of the AMDGPU ISA (Southern Islands), aka a "GPGPU"
   <https://miaowgpu.org/>
 
-
 # Actual Scalar Vector Processor Architectures and ISAs
 
 * NEC SX Aurora
@@ -114,9 +137,21 @@ All of these are not Vector ISAs, they are SIMD ISAs.
 * MRISC32 ISA Manual (under active development)
   <https://github.com/mrisc32/mrisc32/tree/master/isa-manual>
 * Mitch Alsup's MyISA 66000 Vector Processor ISA Manual is available from
-  Mitch on direct contact with him.  It is a different approach from the
-  others, which may be termed "Cray-Style Horizontal-First" Vectorisation.
-  66000 is a *Vertical-First* Vector ISA.
+  Mitch under NDA
+  on direct contact with him.  It is a different approach from the
+  others, which may be termed "Cray-Style Horizontal-First" Vectorization.
+  66000 is a *Vertical-First* Vector ISA with hardware-level
+  auto-vectorization.
+* [ETA-10](http://50.204.185.175/collections/catalog/102641713)
+  an extremely rare Scalable Vector Architecture from 1986,
+  similar to the CDC Cyber 205.
+  Only 25 machines were ever delivered. Page 3-220 of its ISA
+  shows that it had Predicate Masks and Horizontal Reduction.
+  Appendix H-1 shows it is likely a Memory-to-Memory Vector
+  Architecture, and overcame the penalties normally associated
+  with this by adding an explicit "Vector operand forwarding/chaining"
+  instruction (Page 3-69).  It is however clearly Scalable, up to Vector
+  elements of 2^16.
 
 The term Horizontal or Vertical alludes to the Matrix "Row-First" or
 "Column-First" technique, where:
@@ -129,11 +164,13 @@ The term Horizontal or Vertical alludes to the Matrix "Row-First" or
 Vector-type Support by Architecture
 
 
-| Architecture | Horizontal | Vertical  |
-| - | -   |
+| Architecture | Horizontal | Vertical |
+| ------------ | ---------- | -------- |
 | MyISA 66000  |            | X  |
 | Cray         | X          |  |
 | SX Aurora    | X          |  |
 | RVV          | X          |  |
 | SVP64        | X          | X  |
 
+![Horizontal vs Vertical](/openpower/sv/sv_horizontal_vs_vertical.svg)
+