update slides
[libreriscv.git] / simple_v_extension / open_3d_alliance_2019aug26.tex
1 \documentclass[slidestop]{beamer}
2 \usepackage{beamerthemesplit}
3 \usepackage{graphics}
4 \usepackage{pstricks}
5
6 \title{Open 3D Alliance RISC-V}
7 \author{Luke Kenneth Casson Leighton}
8
9
10 \begin{document}
11
12 \frame{
13 \begin{center}
14 \huge{Open 3D Alliance: RISC-V}\\
15 \vspace{32pt}
16 \Large{An open invitation to collaborate on 3D Graphics}\\
17 \Large{Hardware and Software}\\
18 \Large{for mobile, embedded, and innovative purposes}\\
19 \vspace{24pt}
20 \Large{With thanks to Pixilica, GoWin, and Western Digital}\\
21 \vspace{16pt}
22 \large{\today}
23 \end{center}
24 }
25
26
27 \frame{\frametitle{Why collaborate?}
28
29 \begin{itemize}
30 \item 3D is hard. It's also not the same as HPC\vspace{15pt}
31 \item NVIDIA, AMD, Imagination - cannot meet "unusual" needs\vspace{15pt}
32 \item Working together on flexible standards, everyone wins\vspace{15pt}
33 \item Without collaboration: 10-20 man-years development\vspace{10pt}
34 \item With collaboration: cross-verification (avoids mistakes)
35 \end{itemize}
36 }
37
38
39 \frame{\frametitle{What is the goal?}
40
41 \begin{itemize}
42 \item You get to decide! No, really!\vspace{12pt}
43 \item Outlined here: some ideas and cost/time-saving approaches\vspace{12pt}
44 \item Two new platforms: 3D "Embedded", 3D "UNIX"\vspace{12pt}
45 \item Flexible optional extensions (Transcendentals, Vectors,\\
46 Texturisation, Pixel/Z-Buffers - all optional)\vspace{12pt}
47 \item Good software support absolutely essential\\
48 (basically, that means Vulkan)\vspace{15pt}
49 \end{itemize}
50 }
51
52 \frame{\frametitle{Libre RISC-V Team}
53
54 \begin{itemize}
55 \item Small team, sponsored by Purism and the NLNet Foundation\vspace{8pt}
56 \item Therefore, focus is on efficiency: leap-frogging ahead\\
57 without requiring huge resources.\vspace{8pt}
58 \item OpenGL API? Gallium3D / Vulkan is better\vspace{8pt}
59 \item Gallium3D turns out to be a single-threaded interpreter\\
60 (Vulkan is compiled, and can be parallelised)\vspace{8pt}
61 \item Independent teams have provided OpenGL to Vulkan adaptors\vspace{8pt}
62 \item Same approach on hardware: seek highest bang-per-buck\\
63 Save design time, save implementation time\vspace{8pt}
64 \end{itemize}
65 }
66
67 \frame{\frametitle{What (optional) things are needed?}
68
69 \begin{itemize}
70 \item Vectorisation. (SIMD? RVV? Other?)\vspace{12pt}
71 \item Transcendentals (SIN, COS, EXP, LOG)\vspace{12pt}
72 \item Texture opcodes, Pixel/Z-Buffers\vspace{12pt}
73 \item Pixel conversion (YUV/RGB etc.)\vspace{12pt}
74 \item Optional accuracy (embedded space needs less accuracy)\vspace{12pt}
75 \item Options give implementors flexibility. No imposition:\\
76 imposition risks fragmentation (however, collaboration does\\
77 need some hard easily-logically-justifiable rules)
78 \end{itemize}
79 }
80
81 \frame{\frametitle{What is essential (not really optional)}
82
83 \begin{itemize}
84 \item The software, basically. Anything other than Vulkan\\
85 is a 10+ man-year effort\vspace{12pt}
86 \item Respecting that standards are hard to get right\\
87 (and that consequences of mistakes are severe:\\
88 no opportunity for corrections after a freeze)\vspace{12pt}
89 \item Respecting that, for collaboration and interoperability,\\
90 some things go into a standard that you might not "need"\vspace{12pt}
91 \item Mutually respectful open and fully transparent collaboration.\\
92 No NDAs, no "closed forums". We need the help of experts\\
93 (such as Mitch Alsup) in this highly technical specialist area.
94 \end{itemize}
95 }
96
97 \frame{\frametitle{What has our team done already?}
98
99 \begin{itemize}
100 \item Decided to go the "Hybrid" Route (Separate GPUs requires a\\
101 full-blown RPC/IPC mechanism to transfer all 3D API calls\\
102 to and from userspace memory to GPU memory... and back).
103 \item Developed Simple-V (a "Parallelising API)\\
104 (Simple-V is very hard to describe, because it is unique:\\
105 there is no common Computer Science terminology)
106 \item Started on Kazan (a Vulkan SPIR-V to LLVM compiler)
107 \item Started work on a highly flexible IEEE754 FPU
108 \item Started work on a "Precise" CDC 6600 style OoO Engine,\\
109 with help from Mitch Alsup, the designer of the M68000
110 \item Variable-issue, predicated SIMD backend, Vector front-end\\
111 "precise" exceptions, branch shadowing, much more
112 \end{itemize}
113 }
114
115 \frame{\frametitle{Why Simple-V? Why not RVV?}
116
117 \begin{itemize}
118 \item RVV is designed exclusively for supercomputing\\
119 (RVV simply has not been designed with 3D in mind).\vspace{6pt}
120 \item Like SIMD, RVV uses dedicated opcodes\\
121 (google "SIMD considered harmful")\vspace{6pt}
122 \item 98\% of FP opcodes are duplicated in RVV. Large portion\\
123 of BitManip opcodes duplicated in predicate Masks\vspace{6pt}
124 \item OP32 space is extremely precious: 48 and 64 bit opcode space\\
125 comes with an inherent I-Cache power consumption penalty\vspace{6pt}
126 \item Simple-V "prefixes" scalar opcodes (all of them)\\
127 No need for any new "vector" opcodes (at all).\\
128 Can therefore use the RVV major opcode for 3D\vspace{6pt}
129 \end{itemize}
130 }
131
132 \frame{\frametitle{Simple-V "Prefixing"}
133
134 \begin{itemize}
135 \item SV "Prefix" does exactly that: takes RVC and OP32 opcodes\\
136 and "prefixes" them with predication and a "vector" tag\vspace{8pt}
137 \item Three prefix types: SV P32 (prefixed RVC), P48 and P64\vspace{8pt}
138 \item Prefixed RVC takes 3 "Custom" OP32 opcodes.\\
139 P48 takes standard OP32 scalar opcodes and "prefixes" them\\
140 P64 adds additional vector context on top of P48\\
141 \vspace{8pt}
142 \item "Prefixing" is a bit like SIMD. Vectors may be specified\\
143 of length 2 to 4, elements may be "packed" into registers,\\
144 opcode element widths over-ridden.\vspace{8pt}
145 \item Convenient, but not very space-efficient (and VBLOCK is)\vspace{8pt}
146 \end{itemize}
147 }
148
149 \frame{\frametitle{VBLOCK Format}
150
151 \begin{itemize}
152 \item Again: hard to describe. It is a bit like VLIW (only not really)\\
153 A "block" of instructions is "prefixed" with register "tags"\\
154 which give extra context to scalar instructions within the block
155 \item Sub-blocks include: Vector Length, Swizzling, Vector/Width\\
156 overrides, and predication. All this is added to scalar opcodes!\\
157 \textbf{There are NO vector opcodes} (and no need for any)
158 \item In the "context", it goes like this: "if a register is used\\
159 by a scalar opcode, and the register is listed in the "context",\\
160 SV mode is "activated"
161 \item "Activation" results in a hardware-level "for-loop" issuing\\
162 \textbf{multiple} contiguous scalar operations (instead of just one).
163 \item Implementors are free to implement the "loop" in any fashion\\
164 they see fit. SIMD, Multi-issue, single-execution: anything.
165 \end{itemize}
166 }
167
168 \frame{\frametitle{Other Standard Proposals}
169
170 \begin{itemize}
171 \item Ztrans and Ztrig* - Transcendentals and Trigonometrics\\
172 (optional so that Embedded implementors have some leeway)
173 \item ISAMUX / ISANS - stops arguments over OP32 space\\
174 (also allows clean "paging" of new opcodes into e.g. RVC)
175 \item MV.SWIZZLE and MV.X - RV does not have a MV opcode.
176 \item Zfacc - dynamic FP accuracy. Needed for "fast" Vulkan native\\
177 and to switch between fast 3D accuracy and IEEE754 modes.
178 \item These - and more - need your input! 3D is hard!
179 \item The key strategic premise: these are required as \textbf{public}\\
180 standards, because the \textbf{software} is to be public.
181 \item This is \textbf{not} understood by the RISC-V Foundation.\\
182 ("custom" status not appropriate for high-profile mass-volume\\
183 end-user APIs such as Vulkan).
184 \end{itemize}
185 }
186
187
188 \frame{\frametitle{Summary}
189
190 \begin{itemize}
191 \item 3D is hard (and pure Vectorisation gets you 25\% of \\
192 commercially-acceptable performance).
193 \item Layered optional extensions are going to be key to\\
194 acceptance by a wide variety of 3D Alliance Members.
195 \item With a custom specialised SPIR-V (Vulkan) Compiler\\
196 being an absolutely critical strategic requirement,\\
197 RVV and its associated compiler (still not developed)\\
198 is, surprisingly, of marginal value.
199 \item Question everything! Your input, and a willingness to\\
200 take active responsibility for tasks that your Company\\
201 is critically dependent on, are extremely important.
202 \item Public and transparent Collaboration is key. There is simply\\
203 too much to do.
204 \end{itemize}
205 }
206
207
208 \frame{
209 \begin{center}
210 {\Huge \vspace{20pt}
211 The end\vspace{20pt}\\
212 Thank you\vspace{20pt}\\
213 }
214 \end{center}
215
216 \begin{itemize}
217 \item http://lists.libre-riscv.org/pipermail/libre-riscv-dev/
218 \item http://libre-riscv.org/simple\_v\_extension/abridged\_spec/
219 \item https://libre-riscv.org/ztrans\_proposal/
220 \item https://libre-riscv.org/simple\_v\_extension/specification/mv.x/
221 \end{itemize}
222 }
223
224
225 \end{document}